OctTree and moving objects
#2
Why you don't use the hit-testing that is part of the Ab3d.DXEngine? 

OctTree in DXEngine is designed for organizing triangles inside complex meshes so hit testing can work very fast - without checking the ray to triangle intersection for each triangle in the mesh (that can have millions of triangles). It cannot be used to store many objects and do a hit test on them.

But usually number of objects does not go into millions. If you have a few thousands of objects, then you can do manual hit testing with checking if ray hits the bounding box (checking all objects) and then in case of intersection do a mesh intersection test. This should be still very fast on a modern CPU.

If you use transformations to animate your objects, then you do hit testing in such a way that you transform the original camera's ray with the inverse world transform of the object.
Andrej Benedik
  


Messages In This Thread
OctTree and moving objects - by janovrom - 04-20-2020, 04:23 PM
RE: OctTree and moving objects - by abenedik - 04-21-2020, 11:30 AM
RE: OctTree and moving objects - by janovrom - 04-21-2020, 11:59 AM
RE: OctTree and moving objects - by abenedik - 04-24-2020, 11:14 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)