Hey, I was wondering whether these things could be done to enhance the in engine fog (or whether I can just use pixel shaders for them)
1) Height Volume Fog. Basically, Create a fog volume starting at this height and ending at this one (if not, this one should be a quick enhancement to the setFog function (just 2 more params and an enum)
2) Fogmapping. I know this isn't implemented yet, so I'm going to try at some point (b4 december and once i get multiplayer basically up)
3) Varying Fog Density. I'm 75% sure this isn't in. But if it is, yay, if not, i will try to implement it.
I will try my best to implement these things at some point
Fog Enhancements
- Robomaniac
- Hobgoblin
- Posts: 508
- Joined: Tue Feb 03, 2004 6:39 am
- Antiarc
- Greenskin
- Posts: 120
- Joined: Thu Jan 23, 2003 8:40 am
- Contact:
- Kencho
- OGRE Retired Moderator
- Posts: 4011
- Joined: Fri Sep 19, 2003 6:28 pm
- Location: Burgos, Spain
- x 2
- Contact:
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
Fog is a per-vertex or per-pixel effect, APIs only typically support simple range-based fog but it's usually per-pixel in most cards which makes it look quite nice. To go beyond that per-vertex you either need to use vertex colours (for cards with no vertex shader support), or vertex shaders, but you'd better make sure your tesselation is pretty good. The best approach is pixel shaders of course, and for that you can use things like the perlin noise volume used in the Fresnel shader to give the impression of billowing, variable density fog.
- Robomaniac
- Hobgoblin
- Posts: 508
- Joined: Tue Feb 03, 2004 6:39 am
Ok, i've been trying to do stuff w/ shaders and since this kinda relates, i'm gonna go ot a bit and post it here. Ok, for example, i'm trying to implement a water caustics effect into the game (i already dl'ed a shader) and i'm confused about which materials to apply it to. The ocean water, the ocean floor? something else? Same goes for fog. I'm just having some conceptual issues w/ what to apply where :\
- Antiarc
- Greenskin
- Posts: 120
- Joined: Thu Jan 23, 2003 8:40 am
- Contact:
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
I am preparing to implement half-space pixel fog in Ogre.
I found a simple shader and a demo which uses a pixelbuffer of some sort.
Can I use the pixelbuffer in Ogre - how do I render it?
There is no material to apply either, so I might have a problem telling Ogre to use this shader? All I want (for now) is some simple pixel fog done in hardware. Can I manually load and run a shader via the cg plugin?
Or should I really have to wait on some kind person doing a fog demo in Ogre?
[edit]
I am raising this question here, because it is directly related to robomaniacs questions.
I searched for it - and realised that it's under feature requests ..
[/edit]
I found a simple shader and a demo which uses a pixelbuffer of some sort.
Can I use the pixelbuffer in Ogre - how do I render it?
There is no material to apply either, so I might have a problem telling Ogre to use this shader? All I want (for now) is some simple pixel fog done in hardware. Can I manually load and run a shader via the cg plugin?
Or should I really have to wait on some kind person doing a fog demo in Ogre?
[edit]
I am raising this question here, because it is directly related to robomaniacs questions.
I searched for it - and realised that it's under feature requests ..
[/edit]
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
It looks like I can utilize the pixel buffer code from the dyntex demo, and let the shader do what julia.h does.
I have some trouble understanding how to get that shader in here...
Is it possible to construct a material (with a program) from my manually created image?
I have some trouble understanding how to get that shader in here...
Is it possible to construct a material (with a program) from my manually created image?
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
I think that what I am really asking here is:
How do I create new things using a shader?
If I create a material, using a program, utilising a fog.tga texture - how do I create something using shaders?
I have no trouble understanding how to attach materials with shaders to meshes, but I want my shader to create decals, billboards, pixels, vertices.
I looks so damn easy in OpenGL code, using shaders - Ogre is a different beast.
How do I create new things using a shader?
If I create a material, using a program, utilising a fog.tga texture - how do I create something using shaders?
I have no trouble understanding how to attach materials with shaders to meshes, but I want my shader to create decals, billboards, pixels, vertices.
I looks so damn easy in OpenGL code, using shaders - Ogre is a different beast.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.