User Tools

Site Tools


dragengine:modules:opengl:envmaps

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dragengine:modules:opengl:envmaps [2012/12/03 22:38] – created dragonlorddragengine:modules:opengl:envmaps [2012/12/03 23:55] (current) dragonlord
Line 9: Line 9:
  
 The updating is currently done by rendering the world into a cube map using the render code used also for conventional rendering from cameras. This is a temporary solution as the performance is not optimal. To compensate for this during each frame update only **one cube map face** is rendered. Hence updating an entire environment map requires 6 frame updates in total. This distributes the updating of environment maps across many frames. The next environment to update is picked according to the **location of the camera**. This updates environment maps near the camera before updating more remote environment maps. While this puts less strain on the frame rate the reaction time to quick changes in the world lighting as for example in fast forwarding time is not good. This will be tackled later on with a new rendering code geared for environment map updates. This is though something for a rainy day right now. The updating is currently done by rendering the world into a cube map using the render code used also for conventional rendering from cameras. This is a temporary solution as the performance is not optimal. To compensate for this during each frame update only **one cube map face** is rendered. Hence updating an entire environment map requires 6 frame updates in total. This distributes the updating of environment maps across many frames. The next environment to update is picked according to the **location of the camera**. This updates environment maps near the camera before updating more remote environment maps. While this puts less strain on the frame rate the reaction time to quick changes in the world lighting as for example in fast forwarding time is not good. This will be tackled later on with a new rendering code geared for environment map updates. This is though something for a rainy day right now.
 +<WRAP center 100%>
 +<WRAP center box 550px>
 +{{ :dragengine:modules:opengl:dynenvmap.png |Same environment map probe at night and day}}
 +<WRAP centeralign>Same environment map probe at night and day. The content changes dynamically with the lighting conditions and is rendered straight from the world as you see it.</WRAP>
 +</WRAP>
 +</WRAP>
  
 ====== Environment Map Placement ====== ====== Environment Map Placement ======
 Placing environment maps dynamically is the final goal. Dynamic placement though is also difficult to achieve. For now the placement of the environment maps is done by the level designer. The final way on how to do this is not yet written in stone. For the time being this is achieved using a special texture property. A component with a texture containing this texture property name turns into an environment map probe and thus becomes invisible to rendering. This solution is quite hacky but for some reason it is a nice solution. Using texture properties this additional "feature" is fully legit while not interfering with level design or other engine parts. Furthermore it allows to simply defined a new element class the level designer can simply add to his world and get manual environment map placement without adding extra code to the editor or any other place. Maybe this solution will be kept, maybe not. It certainly works and I like how it works right now. Placing environment maps dynamically is the final goal. Dynamic placement though is also difficult to achieve. For now the placement of the environment maps is done by the level designer. The final way on how to do this is not yet written in stone. For the time being this is achieved using a special texture property. A component with a texture containing this texture property name turns into an environment map probe and thus becomes invisible to rendering. This solution is quite hacky but for some reason it is a nice solution. Using texture properties this additional "feature" is fully legit while not interfering with level design or other engine parts. Furthermore it allows to simply defined a new element class the level designer can simply add to his world and get manual environment map placement without adding extra code to the editor or any other place. Maybe this solution will be kept, maybe not. It certainly works and I like how it works right now.
dragengine/modules/opengl/envmaps.1354574280.txt.gz · Last modified: 2012/12/03 22:38 by dragonlord