Data structures for a raytracer scene
category: general [glöplog]
Hello,
sure
Hello, I've been thinking in a good solution for the structure of a raytracer scene.
Until now I use a list of objects. So, my rays tries all the object in the list, and the nearest one is the hit, thats all.
But the problem comes with boolean operations over objects. Then lists are not enough to represent it.
So I could add the object "composite" or something like that, wich produce a boolean operation between 2 lists of objects.
This looks like a good solution, but then I have to manage a list of objects and a boolean tree object type too.
Then I've been thinking, and maybe only a boolean tree type would work... but I'm not yet sure.
Can you help me with this? Thanks
Until now I use a list of objects. So, my rays tries all the object in the list, and the nearest one is the hit, thats all.
But the problem comes with boolean operations over objects. Then lists are not enough to represent it.
So I could add the object "composite" or something like that, wich produce a boolean operation between 2 lists of objects.
This looks like a good solution, but then I have to manage a list of objects and a boolean tree object type too.
Then I've been thinking, and maybe only a boolean tree type would work... but I'm not yet sure.
Can you help me with this? Thanks
noone cares about coding here anymore. they are jsut making intro by clicking.
forget it man!
forget it man!
yeah try OSRT.
Pohar: no Sir, some people still code their demos/intros from scratch and even enter object coordinates and timelines manually in their code if tons of IFs!
WITH tons of IFs :)
WAS?
When you know what you want to raytrace, then probably you will know what to search for what to really trace. Until then: Say hello to to your little brothers sister!
I would go with the "infinite monkeys" approach to raytracing - you generate a screen full of random pixels, then you pop up a dialog and ask the user "Is this OK?" Saves you a lot of hard work.
keops: Wouldn't case statements be more efficient?
its these replies to threads like this one that make me not give a shit to further update this website.
scene spirit, dead.
scene spirit, dead.
texel : I think you have the right idea with your "composite objects".
Some friendly advice; This isn't the best place to ask technical questions. You're better off asking on www.gamedev.net, www.ompf.org or somewhere like that.
Some friendly advice; This isn't the best place to ask technical questions. You're better off asking on www.gamedev.net, www.ompf.org or somewhere like that.
You're right. Build a tree structure:
root--->operation--->object(s)
If you have an octree or whatever for ray traversal you don't need to do boolean operations for objects that won't touch...
root--->operation--->object(s)
If you have an octree or whatever for ray traversal you don't need to do boolean operations for objects that won't touch...