Hi guys, I saw in the example lighting shader system with texture. I wonder to know how can I remove fog distance and the background because when I load the Scene and terrain, and the character moving forward, the fog and background will cut off the object and the Scene making the Scene isn't clear. In the video that you can see the fog distance will replace by background of the skydome, so how could I do that?
How to remove fog distance and background in Scene?
-
- Halfling
- Posts: 45
- Joined: Tue Aug 09, 2022 7:55 am
- x 1
-
- Bronze Sponsor
- Posts: 487
- Joined: Sun Jan 18, 2015 4:20 pm
- Location: Buenos Aires, Argentina
- x 170
Re: How to remove fog distance and background in Scene?
I don't know how the background is being drawn there, perhaps it is in another render queue.
Because the kind of fog you are seeing there is a very basic equation that shades everything that is a certain distance from the camera.
It is not like the real fog or the fog in modern videogames that lies on the ground but more like the fog in Dark Souls II the forest area where you can't see anything besides some point.
ThinMatrix tutorial might be a better explanation than mine:
-
- Halfling
- Posts: 45
- Joined: Tue Aug 09, 2022 7:55 am
- x 1
Re: How to remove fog distance and background in Scene?
I know what you want to say, but I just want to know do we have any way to remove the fog or the background, or maybe make them transfer to transparent layer. I did see somewhere with named clipping far distance. Because when I load the scenenote, It was automatically render a black background and clip off the object that far from the character. So I want to remove that from camera or make It be come to a transparent layer that can see through.
-
- Bronze Sponsor
- Posts: 487
- Joined: Sun Jan 18, 2015 4:20 pm
- Location: Buenos Aires, Argentina
- x 170
Re: How to remove fog distance and background in Scene?
If you are using RTSS or the Fixed Function Pipeline (or your shaders are taking parameters from OGRE) then you can tune all that stuff with the SceneManager:
https://ogrecave.github.io/ogre/api/lat ... nager.html
There is a function called: setFog() that allows you to disable/configure the fog.
And there is a function called: setSkyBox() that allows you to disable/configure the SkyBox.
-
- Halfling
- Posts: 45
- Joined: Tue Aug 09, 2022 7:55 am
- x 1
Re: How to remove fog distance and background in Scene?
What is the cpp file that contain those function?
-
- Bronze Sponsor
- Posts: 487
- Joined: Sun Jan 18, 2015 4:20 pm
- Location: Buenos Aires, Argentina
- x 170
Re: How to remove fog distance and background in Scene?
It depends on how the developers set up OGRE.
If you have the source code you could use grep to find a "setFog" or "setSkyBox" string in the source. (findstr in windows)
But remember that this depends on the developers using FFP, if they use shaders then things will be different.