@3run
pretty hard question to answer. crazy

This exercise starts with that maze generator and it depends on it. I built a 3d level from its result with floor, wall, ceiling and pillar entities.

You may recall that I added doors to the result of the maze generator. I wrote a system that uses those doors witch open and close automatically as portals for geometry culling, so they are automatically shown or hidden by groups.

All those geometry construction pieces share their texture in order to merge them in a single entity by group.



I built those pieces with a secondary uv set with no overlapping in order to render the lightmap. In the merge process, I sorted them as you can see in the second image: a 2048x1024px lighmap for one single group.

I render the lighmap transforming the resulting sorted uv set to clip space instead of transforming the object space vertex coordinates. I used a previously rendered depth cubemap per light to calculate the shadows.

It takes its time to finish but the result is as fast as wind because there are very few entities and no shadow calculations on the flow.

I got some troubles rendering cubemaps because sometimes misteriously are not rendered properly. For now, I'm looking for a workaround...

Last edited by txesmi; 10/05/13 16:57.