Horde3D

Next-Generation Graphics Engine
It is currently 13.05.2024, 20:25

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 01.06.2010, 21:16 
Offline

Joined: 18.09.2009, 07:44
Posts: 17
I have a scene with approximately 1 million triangles which renders fine at ~60fps (artificially limited to this) when not calling pickNode each frame. If I do enable pickNode calls each frame, my framerate takes a significant dive with pickNode taking in excess of 160ms.

I've searched the forum and see that the pickNode implementation was done for convenience, so I'm now wondering the best way to optimise it.

Some brief searching has turned up ideas such as colour coding, but before writing code I was hoping for advice from others who may have experience in this area.

I guess one alternative is to call pickNode in a separate thread so as to not affect framerate, but I'd like to try and avoid that if possible.


Top
 Profile  
Reply with quote  
PostPosted: 01.06.2010, 21:22 
Offline

Joined: 24.03.2010, 10:17
Posts: 55
I'd recommend to use a collision library like bulletphysics to do the raycasts, at least for static meshes.
If you have skinned geometry things get a bit more tricky, to do proper raycasts you would have to do SW skinning.
But all depends on the level of granularity you need (object id might be enough for your case, or do you need proper intersection points and normals?)


Top
 Profile  
Reply with quote  
PostPosted: 02.06.2010, 14:56 
Offline

Joined: 08.11.2006, 03:10
Posts: 384
Location: Australia
Yeah, this isn't specific to horde: but in every game I've worked on there's been two representations for each (solid) model -- the graphical representation and the physical representation. We never cast rays against the graphical representation.

The graphical representation might be tri-meshes with millions of triangles.
The physical representation is either low-detail tri-meshes, and/or primitive shapes (boxes, spheres, capsules, convex-polyhedra etc).

When doing ray-casts, you could load low-poly meshes into horde and only ray-cast against these (instead of the regular high-poly versions) but don't render them (still render the high-poly ones as usual), or as Alex suggests, it will be much faster to use something like Bullet, which supports many kinds of object representations.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group