When I first saw the Hubble ultra deep field photos, I was in awe. Our brief glimpses out into the universe brings a certain deep peace to my mind. A mysterious and majestic connection to the cosmos. So I undoubtedly needed to create a galaxy field in Maya…
The galaxy distribution currently has a randomized layout. Meaning I used a MEL script to randomize the translateXYZ and rotateXYZ of each galaxy (more info below). So it does not currently mimic the cosmic web. In this first iteration of creating a galaxy field, the goal was simply to fly among the galaxies in 3D. But in postproduction you could easily put a real Hubble ultra deep field photo as the backdrop of everything, just to help the illusion.
There are 68 different galaxies images that have been photoshopped to paint out the background stars/galaxies. It is important to have the image edges fade to true black or else the image edges might be visible and ruin the effect.
I didn’t know if using 68 images would be enough to create a galaxy field and still feel dynamic in the amount of unique galaxies, but it works surprisingly well. Every so often two duplicate galaxies will appear close to each other and you can simply delete or move one of them away.
maya scenes (using mental ray, redshift, vray, maya software) – galaxy field experiments
About the Different Options
Every project has its own demands. Sometimes you need to fly through a bunch of galaxies and other times just a few. There are four options for amounts of galaxies:
— 100 galaxies
— 1,000 galaxies
— 10,000 galaxies – Only navigate in wireframe or smooth-shade mode.
— 100,000 galaxies – Be wary of opening this scene. It will bog down your computer and use ~6GB RAM. Only navigate in wireframe mode.
There is also three types of galaxies/layouts:
— FlatGalaxyField_GridLayout – Flat galaxies in a grid. Fun for art experiments.
— FlatGalaxyField_VolumeLayout – Flat galaxies that have a randomized layout.
— ParabolaGalaxyField_VolumeLayout – Parabola galaxies that have a randomized layout. Using a parabola as the galaxy poly helps the galaxy to not feel paper-thin. Of course this adds a hundred times the amount of total polygons; so the 100,000 galaxy amount isn’t possible for this option.
— If you want to re-distribute the galaxies to be more or less densely laid out then check out SMO_RandomizeXForm. If you want to randomize the shaders then check out RandomShader. These are the tools I used. FYI, both of these MEL scripts are included in the download above.
— Every galaxy has its own poly (not an instance). This allows us a few advantages, such as being able to use animation deformers or a lattice to play with the galaxies themselves. You can also edit the poly of an individual galaxy and it won’t affect all the others.
— Each galaxy image is mapped into the color, transparency, and incandescence of its own lambert shader. It could have been done procedurally, but now we have the freedom to tweak a specific shader without affecting every galaxy.
— The galaxy photos themselves can be found in this folder: galaxy_project/sourceimages
Adding Your Own Galaxy Images
— Notice how all the images are square? Well this makes working with them in Maya much easier since all the planes are square. Otherwise your galaxy images will get stretched to fit the Maya plane. Also, I scale down any images to a max of 4096px to save on memory in Maya. Even this is a little large.
— Know that incandescence and transparency have a particular relationship where even if an area is completely transparent, the incandescence will still be visible and be see-through. So the image edges MUST fade to true black or else you’ll see the image edges in your Maya renders.
In the future, I’ll experiment with how to give each galaxy an actual thickness and not look paper-thin. This is actually a pretty tricky thing to accomplish using the image as the a driver for a volume/fluid and still render quickly. I also want to create custom luminosity maps for each galaxy shader so that they appear more dense at the center of each galaxy. And most importantly, instead of a randomized layout of galaxies I would love to mimic the cosmic web and have the look of clusters, filaments, and voids. This is a work in progress and anyways I can’t give away the secret sauce!