View Full Version : camera collision detection
03-26-2006, 11:01 PM
Read about this post earlier but havent found any answers so far. Ive got a problem that needs solving. At the moment were trying to render out some passes but everything keeps crashing due to to heavy geometry. What i need to do is create a script that picks the objects that are visible to the camera and then sets the subdivision levels based on the distance to the camera and also if the objects are visible or not. The not visible objects can all pretty much have a subdivision level of 0, and the visible from (3), 2, 1 and 0 based on the distance from the camera.
But the problem is creating a collision detection scripts that figueres out wether or not an object is actually visible to the camera and if so how far away it is to the camera.
Any help on this issue would be appreciated!
03-26-2006, 11:26 PM
For LODing in general you can use Mayas LOD nodes (who would've thought ;))
But in your case, if you're using MentalRay, I'd suggest creating an approximation node and setting the sampling to Length/Distance/Angle.
As for the clipping: The renderer should actually perform culling on its own... I'm not sure tho how Maya Software/MentalRay handle their memory when it comes to culled geometry...
I'd try to use LODing and see how it works out...
03-27-2006, 12:01 AM
as far as ive understood the lod node is just a grouping device. You group your object under a node depending on their polyresolution then the objects gets switched depending on how far away they are from the camera. That doesnt work very well in my case since im using references and what not, need a lot more versatile system without having to redo my whole scene importing scheme
03-27-2006, 08:20 AM
I'm not really sure what you mean by more versatile, but LODing always comes at a cost.
You can use approximation nodes as said before, but using static meshes that dont have to be tesselated every frame will save you precious CPU cycles...
btw: What rendering system are you using?
03-27-2006, 08:20 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.