Galaxy Blender Model -------------------- This is still a rather simple model of a spiral galaxy inspired mostly by this picture: http://apod.nasa.gov/apod/image/0611/andromeda_gendler.jpg It is composed of thousands of halos, most of which are generated by a script. The file and script was created using and for Blender 2.5 (alpha and beta versions). Usage ------- The .blend file is ready to render. If you want to re-create some of the particle meshes, you need to do the following: 1) Get Python and PIL so you can generate dust_pattern.csv from dust_pattern.png using mk_dust_pattern.py. I used standalone Python 2.6 for the task. 2) Open Blender and load Galaxize.py into the script editor window. 3) Select a particle mesh and run the script. Making adjustments ------------------ The particle meshes have custom properties controlling the spread of particles. See the script to find out which they are. Some of the meshes are generated completely randomly, the dust is read from the .csv file. Therefore by editing dust_pattern.png and re-generating, you can control the shape of the arms. The code does not add any vertices because I don't know how to code it :) It just moves all the vertices in the mesh. Known problems -------------- 1) It all could be better automated. 2) Reading dust_pattern.png should be done from inside blender without any intermediate tools. 3) It still does not look as good as the image (more detail and randomness needed)! 4) Unfortunately the size of halos increase as you get closer to them which is a problem for the stars which need to stay small. Therefore galaxy fly-through is not yet possible. Licence --------- The files are licenced under a BSD licence. Copyright (c) 2010, Roman Plasil All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.