Hey Guys, in my engine (found here) I've used an octree to subdivide the world and i've implemented frustum culling. Now I have a few questions relating to speed:
1. Can anyone point me to a decent site on Occlusion Culling?
2. How do I draw the nodes in back-to-front order?
3. At the moment i'm using display lists for each node but im not splitting polys when they cross nodes, so some polys are drawn twice, would it be worth the effort to spilt the polys when building the octree?
4. When I add them should I store transparent polys in a separate polygon list in each node so that they can be drawn after the opaque ones?
I'm sure I'll think of some more but thats it for now.
Hyperdev
"To err is human, to really mess up requires a computer"
[edited by - Lukerd on March 29, 2003 11:13:07 AM]
Optimisation questions
There is a good article somewhere on gamasutra that will tell you a few good occlusion culling techniques...
Google for it!
Google for it!
for question 3
Why don''t you just make a boolean flag in each poly that u set true once you have drawn it. And every time you draw a polygon u check if that polygon has been drawn already.
Why don''t you just make a boolean flag in each poly that u set true once you have drawn it. And every time you draw a polygon u check if that polygon has been drawn already.
By the way... I cant run your engine. It says can''t find MSVCR70.dll
"I''ve read about...doom being used to manage unix programs(you "kill" the processes)" dede
"I''ve read about...doom being used to manage unix programs(you "kill" the processes)" dede
ahh yeah I forgot to include that in the zip file, i''ll fix that asap. I did originally put a boolean flag in when I was rending with triangles but now i''m using display lists it wont work coz everythings pre-compiled 
thanks anyway
Hyperdev
"To err is human, to really mess up requires a computer"

thanks anyway
Hyperdev
"To err is human, to really mess up requires a computer"
"To err is human, to really mess up requires a computer"
Hey,
im looking for an engine programmer, paid job of course. Are you interesest? And can i have your contact info? so that i can give you the details.
im looking for an engine programmer, paid job of course. Are you interesest? And can i have your contact info? so that i can give you the details.
1) Try HOM
2) Search google for anlytic octree transversal
3&4) You should never draw triangles twice. Try overgrowing nodes a bit and split triangles that still cant fit into nodes. Then sort triangles by shader and try seding big chunks of geometry to GPU at once.
snisarenko : boolean flags are very bad desing for modern HW. you should never touch individual triangles.. just chunks of them. the biger chunks the better.
You should never let your fears become the boundaries of your dreams.
[edited by - _DarkWIng_ on March 30, 2003 2:06:19 PM]
2) Search google for anlytic octree transversal
3&4) You should never draw triangles twice. Try overgrowing nodes a bit and split triangles that still cant fit into nodes. Then sort triangles by shader and try seding big chunks of geometry to GPU at once.
snisarenko : boolean flags are very bad desing for modern HW. you should never touch individual triangles.. just chunks of them. the biger chunks the better.
You should never let your fears become the boundaries of your dreams.
[edited by - _DarkWIng_ on March 30, 2003 2:06:19 PM]
You should never let your fears become the boundaries of your dreams.
Adding a flag to each poly is bad idea. This way you have to draw each poly separately what would be very slow. Instead store your geometry in one big array and use VAR or VAO if possible. In each node store element arrays of polygons with different shaders presented in this node. Then if you want to render the scene, you draw only the polygons in a view frustum sorted by shader they use. Using display lists will produce a lot of state changes if you don't have a display list for each shader in each node. Also I suggest you to divide polys by separating planes of the octree to minimize overdraw.
Drawing your nodes from back to front isn't very clever. It produces a lot of overdraw because of z-buffer inefficiency. Instead draw solid polys in reverse order, that is from front to back and then the polys that use transparent shaders from back to front.
to sempressimo:
What type of engine do you want to implement?
[edited by - QWERTY on March 30, 2003 3:09:02 PM]
Drawing your nodes from back to front isn't very clever. It produces a lot of overdraw because of z-buffer inefficiency. Instead draw solid polys in reverse order, that is from front to back and then the polys that use transparent shaders from back to front.
to sempressimo:
What type of engine do you want to implement?
[edited by - QWERTY on March 30, 2003 3:09:02 PM]
If your engine is mostly indoors (and it looks like it is) then instead of looking for a good occlusion culling algorthim why not use a BSP tree instead of an octree?
Also when building your display lists you could only add the polys that are more than 50% inside the node. This way you won''t add polys to multiple nodes.
Also when building your display lists you could only add the polys that are more than 50% inside the node. This way you won''t add polys to multiple nodes.
MSN: stupidbackup@hotmail.com (not actual e-mail)ICQ: 26469254(my site)
Thanks guys, i''ll start working on poly splitting tomorrow.
neXius: Although the test map is indoors I am planning to have a lot of outdoor environments (stuff like weather systems, skyboxes, open fields) thats why i''m using octrees and not BSP.
sempressimo: I''m not sure i''m good enough for any paid work, i''m still learning, in fact this is the first engine attempt that actually seems to be getting somewhere (i''ve tried to write about 6). But feel free to e-mail me at Lukerd@lineone.net
I only uploaded my site last week, i''ve had 100+ hits today! I''m assuming they''re all from here
if anyone does visit feel free to post on the shoutbox then I know that my counter isnt just messed up :D
I haven''t had an answer for my 4th question. Is that the best way to go about transparent polys? Store them in a separate display list from the opaque ones? Because they have to be drawn last right?
Hyperdev
"To err is human, to really mess up requires a computer"
neXius: Although the test map is indoors I am planning to have a lot of outdoor environments (stuff like weather systems, skyboxes, open fields) thats why i''m using octrees and not BSP.
sempressimo: I''m not sure i''m good enough for any paid work, i''m still learning, in fact this is the first engine attempt that actually seems to be getting somewhere (i''ve tried to write about 6). But feel free to e-mail me at Lukerd@lineone.net
I only uploaded my site last week, i''ve had 100+ hits today! I''m assuming they''re all from here

I haven''t had an answer for my 4th question. Is that the best way to go about transparent polys? Store them in a separate display list from the opaque ones? Because they have to be drawn last right?
Hyperdev
"To err is human, to really mess up requires a computer"
"To err is human, to really mess up requires a computer"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement