DarkHorizon
30-10-2008 14:51:43
This is a follow-up to the post (click) on the regular Ogre forums. Since I found the problem to be related to Caelum (not necessarily due to it!), I am continuing discussion here.
Versions:
Ogre: 1.6 SDK
Hydrax: 0.4
Caelum: 0.4 (reverted to 0.3 in this thread)
OS: Windows XP SP2 x86
Video: GeForce 7600 GS/PCI/SSE/3DNOW! (AGP)
Driver: 178.24
GL Version: 2.1.2
Hello,
I recently found a problem when loading various Ogre components (Terrain Scene Manager, Caelum, Hydrax) and models into my app scene.
The problem seems to be that materials don't show up, or alternatively the default Ogre white material is applied to models that are treated as lit. This problem only occurs on models, and terrain IF I use a custom material which causes the terrain to use lighting. (If the terrain is unlit it appears as expected.) Caelum sky and Hydrax water appear as expected. Caelum's resource group, along with my own resources, is 'General'; Hydrax's is 'Hydrax'.
This morning I came up with the idea that perhaps scene fog was set to white, and near/far values were close together, hence rendering everything white. Alternatively, perhaps Caelum does something to the Ogre material manager which causes it to deallocate materials or apply the default material to everything. I'm not experienced enough with the internals of Caelum/Ogre to prove or debug this problem, but I have narrowed the behavior down to:
- problem occurs after adding CaelumSystem object as an Ogre frame listener
- also occurs only in v0.4; I reverted back to 0.3 last night, and the problem was not present
- in v0.3 code, there is much initializing of different portions of the Caelum system, whereas in 0.4 I am leaving the system defaults alone. I definitely am not touching scene fog settings in 0.4, which might be the root of the problem.
If you have any info or experience on this issue, I'd appreciate any help.
--- SOLUTION ---
Turns out that enabling the CaelumSystem scene fog manager WHILE using Hydrax results in insane amounts of fog. Using the following code:
...resolves this problem.
Versions:
Ogre: 1.6 SDK
Hydrax: 0.4
Caelum: 0.4 (reverted to 0.3 in this thread)
OS: Windows XP SP2 x86
Video: GeForce 7600 GS/PCI/SSE/3DNOW! (AGP)
Driver: 178.24
GL Version: 2.1.2
Hello,
I recently found a problem when loading various Ogre components (Terrain Scene Manager, Caelum, Hydrax) and models into my app scene.
The problem seems to be that materials don't show up, or alternatively the default Ogre white material is applied to models that are treated as lit. This problem only occurs on models, and terrain IF I use a custom material which causes the terrain to use lighting. (If the terrain is unlit it appears as expected.) Caelum sky and Hydrax water appear as expected. Caelum's resource group, along with my own resources, is 'General'; Hydrax's is 'Hydrax'.
This morning I came up with the idea that perhaps scene fog was set to white, and near/far values were close together, hence rendering everything white. Alternatively, perhaps Caelum does something to the Ogre material manager which causes it to deallocate materials or apply the default material to everything. I'm not experienced enough with the internals of Caelum/Ogre to prove or debug this problem, but I have narrowed the behavior down to:
- problem occurs after adding CaelumSystem object as an Ogre frame listener
- also occurs only in v0.4; I reverted back to 0.3 last night, and the problem was not present
- in v0.3 code, there is much initializing of different portions of the Caelum system, whereas in 0.4 I am leaving the system defaults alone. I definitely am not touching scene fog settings in 0.4, which might be the root of the problem.
If you have any info or experience on this issue, I'd appreciate any help.
--- SOLUTION ---
Turns out that enabling the CaelumSystem scene fog manager WHILE using Hydrax results in insane amounts of fog. Using the following code:
m_lpCaelumSystem->setManageSceneFog(false);
...resolves this problem.