Joshua Trees

Jack Quinn



Ray Tracer Features


Tree Generation

 

The main part of this project was tree generation.   From a random number seed and a bunch of parameters a unique tree is grown.  The algorithm starts by placing points along a trajectory which starts at  the bottom and moves up sometimes undergoing random deflections and sometimes branching into two paths.   The direction of the paths is also random but it is biased in the up direction.  That collection of points is then turned into a bunch of triangles (about 10,000 per tree).  The picture on the right shows the paths which were followed, and one of the branches that has been made into triangles.  Part of the  grid structure is also visible.
After the tree is made into triangles, it can be rendered.  Here is an example of an early tree.  Next I adjusted the parameters such as branch radius and average branching angle to make it look more like a Joshua tree.  
Leaves were made by sticking a bunch of triangles on a sphere.  The picture on the right shows one of the first tests with leaves.  The sphere in the middle of the leaves isn't there yet.  Also this picture has a Worley noise bumpmap on the trunk.  Next I played around with the textures and colors, and also added displacement mapping on the tree, which was also based on Worley noise, but at a lower frequency.  Some examples are below.   I used two different random number seeds so I got two different trees, but I used the same two seeds in both pictures.
Next I added an environment map of some clouds, and adjusted the tree positions and lighting.  The ground is also a Worley noise texture.  

This image has one directional area light (the sun).  I like how the trees are almost just silhouettes,  and it was going to be my final image, but I decided to add an extra point light in front of the trees.  This image is more realistic though I think.  I'm still not sure which one I like better.  

 

 


Bonus Images

Glass Teapot

Granite Cow texture map test

Joshua Trees with coyote statue

Joshua Trees with different environment map

I also experimented with Worley noise generated clouds.  This is an example. My numbers don't seem very random.

Another Worley noise bumpmap test.