Whenever I encounter something new and exciting I always want to know how it works. I want to know why it was built the way it is or how it can be customized. When using the program Adobe After Effects, I am stunned by how the preset objects (spheres, particles, lights) look realistic and physically accurate. I wanted to know how a computer could generate objects that incorporated scientific factors like light, reflection, shadows, and physics. Through an independent study with Ithaca College professor Paul Dickson, I got answers.
I worked for a semester with Paul to build a Ray Tracing Graphics Renderer. While that may be a mouthful it is actually a pretty simple concept that translates to complicated coding. The ray tracer that I built used object oriented programming. An object, in this case, is a class that has attributes, accessors, and mutators.
For example, a sphere object:
For example, a sphere object:
attributes: position, radius, color
accessors: getPosition, getRadius, getColor
mutators: setPosition, setRadius, setColor
Image created from my ray tracing graphics renderer featuring planes. |
All of these elements together give us an object or blueprint that we can create instances of. Once we have this outline we can have one sphere that is at position (0,0) with a radius of 5 and is red in color, as well as a green sphere at (8,10) with a radius of 2, etc.
Images from my ray tracing graphics renderer before an after adding a light point in addition to ambient lighting. |
https://en.wikipedia.org/wiki/User:Timrb/Ray_tracing |
When all of the rays have been sent then every pixel of the image should be colored and you will have final images like these:
Ray traced spheres with added camera effects like focal point and blur. |
This was ray traced and it makes me laugh. |
ROBLOX is driven by a growing membership base of more than 300,000 creators who generate an infinite variety of highly immersive experiences.
ReplyDeleteThese experiences range from 3D games and contests, to interactive adventures where friends can take on new avatars to discover what it feels to be a dinosaur, a miner working a mine or an astronaut out in space.