JTracer - Textures, Noise & Stuff
This past week I added in support for file textures in the color channel of materials. I also built out a few procedural generators including an implementation of Perlin noise (original perlin, I just read through the 2002 update paper, so Iāll fix that soon), a simple checkerboard, stripes, and a wavy weird noise-ish thing.
Additionally I also fixed a couple things that were standing out, such as transparent objects casting full shadows and a few small improvements for speed during the adaptive subdivision refinement. I also altered my sphere class constructor so I can shove spheres into my scene list more effectively so I can do more populated layouts. It was a very simple change, and one Iāve been meaning to make for several weeks.Ā
The above image shows the following materials: Chrome, Glass, Checkered Lambert, Striped Lambert, Red Glossy Plastic, Glossy Gold (kinda), Red Clay and file based materials for Earth, Mars, Jupiter and the Moon.
As always, getting here involved a lot of iteration:
Gotta get high rez bunny in here, sphere in the back has the odd wavy texture, itās based on a stack of sines.
Bunny with noise - and my file texture reading rendering inverted:
Adaptive sampler keeps doing itās job:
This is where I started my day:
Checker is straight forward, itās a solid checker so checking the sign of the sin in 3-space:
Picking the wrong objects to ignore trace shadows:
Fixed it, added texture maps using the stb_image header - itās great:
Perlin noise implemented, but not interpolated:
Now with tri-linear interpolation:
Moved to a bigger space to help see, and added smoothing:
Add multiple frequencies to create turbulence:
Making a loop with a loop:
Random material selection: