🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Untitled

posted in DruinkJournal
Published November 22, 2007
Advertisement
Woo! Raytracer goodness!

Here's the scene definition file (Lua script):
-- Test script-- Set camera (pos, lookat, up, fov (Degrees))set_camera({0, 0, 0}, {0, 0, 1}, {0, 1, 0}, 60);-- Set output data (filename, width, height)set_output_file("out.bmp", 320, 200)-- Init materials (material name, texture filename, diffuse)init_material("matTest", "test.bmp", {1, 1, 0});-- Create a sphere (pos, radius, material)create_sphere({0, 0, 15}, 5, "matTest");


And here's the first ever image produced by it:

Nothing fancy, but it shows that there were intersections happening.

Then, adding a hard coded directional light with a normal of (-1, 0, 0):


Now I just need to do, uhh, well, everything.
Previous Entry Untitled
Next Entry Untitled
0 likes 2 comments

Comments

_the_phantom_
Nice [grin]

I was going to refactor my raytracer to use Lua to define things as well.. well, at some point anyways [grin]
November 22, 2007 02:07 PM
Evil Steve
I really want to change my scene file a bit, so materials and things are easier to define. At the moment, you'll probably have one material per object anyway, which makes it a bit pointless.
November 23, 2007 04:21 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement