Archived

This topic is now archived and is closed to further replies.

Need help on culling with octree

This topic is 5798 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Now, I''ve done dividing my scene into an octree with many nodes and let just say that I''ve got a camera placing in a certain node with a certain FOV and yaw, pitch, roll data. how can I tell if a node is within my view frustum ?? Is there any algorithms to do that ?? to traverse my tree and do the frustum culling ?? I''ve been browsing as far as I can go but I think all of the octree tutorial and articles fail to explain about this one.. thxxx

Share this post


Link to post
Share on other sites
Check flipcode.com and gamasutra.com. They have a few of articles on octree culling and they contain
description of how to calculate this. They are rather short but you will get the general idea.



"A witty and slightly sarcastic quote from an unkown source"
-- The generic SIG

/trysil

Share this post


Link to post
Share on other sites
trysil : I''m not posting this thread before I checked those sites . I''ve dozens of articcles about it but none of them has a good explanation esspecially with implementation.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I don''t know what API you are using, but the D3D8 examples
have a program called cull that explains exactly how to cull
against the camera frustrum. It''s not the speediest way to do
it, but it''s effective in getting the point across.

HTH,
Squid56

Share this post


Link to post
Share on other sites
Well, I''m using a Direct3D, now I know how octree works and I''m trying to implement it
I''m trying to split my scene mesh into a smaller part for the octree..
Can somebody tellme how to this in Direct3D, I''m trying to use D3DXSplitMesh function, but having trouble making it works,
can somebody tell me what is this Adjancy things ?? and what theri purpose ??

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hi,

Basically, from the data you have, you can calculate 6 planes that describe the frustum. Then you simply check against those planes: if any of the 8 points that form a node are inside all 6 planes, the node is (probably partially) visible. Thats it.

Calculating the planes from the fov isn''t that hard, but I don''t remember :D ok, bad answer. Have a look at the Quake source code, I found it in there and it isn''t really hard. Also, Carmack has three different functions called BoxOnPlaneSide to improve frustum culling speed. One is rather simplistic (C), another is more optimized (C, too). The one being used in Quake is the ASM-Version. But that''s just a gimmick. Hope that helps,

Chris

Share this post


Link to post
Share on other sites