Problems with Linear Fog

dhscompguy

01-12-2005 04:39:49

Running through the excellent beginner tutorial #3 and stumbled upon this quirk --

This works...
self.sceneManager.setFog(ogre.FOG_EXP, fadeColour, 0.003)

And this works...
self.sceneManager.setFog(ogre.FOG_EXP2, fadeColour, 0.005)
PS -- is this what it's supposed to say in the tutorial? It still says FOG_EXP, although a suggestion to try EXP2 is listed in close proximity to the code snippet.

But this crashes immediately...
self.setFog(ogre.FOG_LINEAR, fadeColour, 0, 50, 500)

Any ideas?

Thanks,
Denny

dhscompguy

01-12-2005 04:48:24

However, this example code works without problems --

self.sceneManager.setWorldGeometry("terrain.cfg")

fadeColour = (0.9, 0.9, 0.9)
self.sceneManager.setFog(ogre.FOG_LINEAR, fadeColour, 0, 50, 515)
self.renderWindow.getViewport(0).backgroundColour = fadeColour

self.sceneManager.setSkyDome(True, "Examples/CloudySky", 5, 500)

dhscompguy

01-12-2005 04:50:29

Well, obviously the problem is that self.setFog should be self.sceneManager.setFog. :) I was copying and pasting mindlessly. Is the wiki open to the public? If so, I'll just fix these typos real quick.

Thanks,
Denny

Clay

01-12-2005 05:31:06

Ah whoops. Yeah the wiki is open after you register.

I fixed it, thanks.