The Occlusion challenge

Blitz3D Forums/Blitz3D Programming/The Occlusion challenge

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Yeah, I wouldn't use entity visible since it only operates on the center point of an entity. That's where portals come in handy here. Using cubes as an example, I perfect example would be how that game Descent ( 1 & 2 ) used portals. Imagine two cubes next to each other where the sides that the two cubes touch share the same vertices. Instead of having polygon sides there, use that vertice data for portal data. You can imagine those sides as a portal where it's now invisible. Say we are standing in one cube and the side that is now a portal is in our camera's viewing frustum. So with preconfigured portal data, the engine would take the portal data from that portal we see in view and display the cube that is next to the cube we are standing in.

Edit: didn't see above post. But, what you said above with your grid stuff can be done with a "trigger box". You can select all rooms that can be seen from one room manually or find some complex pre-calculation to do it for you. Then have a "box" or something in the doorways of each cube ( or room ) and set states to AlphaEntity 0 or 1 other rooms when you walk/run through them. But that wouldn't be precise as portals are. And ofcoarse you can go the BSP route as stated below.