Simulating reflections
Nice work sio, unlucky about that opengl annoyances (im still working with .09 i think ....or version .14)
The ony bad thing i see compared to other method is aliasing, maybe a guassian filter might hide it, or if thats too slow, buffer the last frame's texture too, then multiply that with the current frames's texture but each frame sort of "wiggle" the fov or the rotation of the camera, this way you sort of have a free antialiasing on your reflection texture.
looking forward to the demo
The ony bad thing i see compared to other method is aliasing, maybe a guassian filter might hide it, or if thats too slow, buffer the last frame's texture too, then multiply that with the current frames's texture but each frame sort of "wiggle" the fov or the rotation of the camera, this way you sort of have a free antialiasing on your reflection texture.
looking forward to the demo
"Irrlicht is obese"
If you want modern rendering techniques learn how to make them or go to the engine next door =p
If you want modern rendering techniques learn how to make them or go to the engine next door =p
Show the pic, it was a bit weird since your first pic didnt look like afcielies's one even though it should yeild the same results.
Btw how did you apply the shader to the floor only? is it in a sperate meshbuffer or saved as a diffrent mesh? or is the whole thing "shadded" with some flag telling it to go into floor mode
Btw how did you apply the shader to the floor only? is it in a sperate meshbuffer or saved as a diffrent mesh? or is the whole thing "shadded" with some flag telling it to go into floor mode
"Irrlicht is obese"
If you want modern rendering techniques learn how to make them or go to the engine next door =p
If you want modern rendering techniques learn how to make them or go to the engine next door =p
Hehe, i love these threads ; the ones where we discus diffrent techniques for effects .
It is also cool how artists can make effects in ways coders never think of.
I hope sio sends the morphine before we all go mad.
It is also cool how artists can make effects in ways coders never think of.
I hope sio sends the morphine before we all go mad.
"Irrlicht is obese"
If you want modern rendering techniques learn how to make them or go to the engine next door =p
If you want modern rendering techniques learn how to make them or go to the engine next door =p
Here's the demo and the source code. The shader file is an external file (floorReflect.hlsl) for easy playing with.
This is a first step, not production code. There are some issues that need looking at, but take a look first and play around at will - all the source is there.
Do not forget to read the "readme.txt" file"!
http://www.sio2.g0dsoft.com/giroom.zip
Note: A big thanks to Afecelis for the room mesh. It's the only reason my demo looks any good.
This is a first step, not production code. There are some issues that need looking at, but take a look first and play around at will - all the source is there.
Do not forget to read the "readme.txt" file"!
http://www.sio2.g0dsoft.com/giroom.zip
Note: A big thanks to Afecelis for the room mesh. It's the only reason my demo looks any good.
yaaaaaaaaaaaaaay! me happy! thanks to you and Omaremad for getting interested and involved with the project! Omaremad is my Shader Idol, and now you...too....hehehehhee. But now I'm too excited to keep on flattering your work, I GOTTA SEE THE DEMO NOW!!! hehehehhe.
Thanks Sio, hope to see you around.
Ps. Is the hlsl easily convertible con Glsl? I think there's a converter, right?
[nervous mode]checking the demo...checking the demo..now..now...more caffeine please...[/nervous mode]
Thanks Sio, hope to see you around.
Ps. Is the hlsl easily convertible con Glsl? I think there's a converter, right?
[nervous mode]checking the demo...checking the demo..now..now...more caffeine please...[/nervous mode]
I converted the shader code from GLSL to HLSL, so you could just grab the original GLSL source from my Code Snippet. I had trouble with Irrlicht/GLSL so I ditched OpenGL for D3D9.afecelis wrote: Ps. Is the hlsl easily convertible con Glsl? I think there's a converter, right?
Note: I'm posting all my Irrlicht code/demos to my new website hosted by g0dsoft. I've posted four - another four demos to go.
http://sio2.g0dsoft.com - see my Download section
beautiful! amazing! superb! outstanding! I could kiss you! heheheheheh, kidding! But I'm all happiness now!
When I ran it directly from your bin folder I was getting some missing functions from the dll and I got sad and though it was my video card (a Geforce FX 5900 Ultra 256mb, which is DX9 compliant) so then I ran it on my other PC with a 6800 GT (also DX9) and same error! I thought: "man! my pcs are outdated!" hehehe, but then I thought you used your own dll, so I used your source and recompiled and it ran beautifully!! I still gotta get a newer PC, but I knew for sure this stuff should still run on my cards
It looks great! Only notice 1 thing as weird: Things that are reflected at the level of the floor like this:
show up ok, but if I then rotate my camera up/down around the X axis they get separated:
I'm sure you're aware of this, but I'm curious to know why it happens. Besides that, it's perfect!!!
One quick last question; should I have a sphere, suspended right in the middle of the gallery, with your shader applied to it, would it reflect the environment? (as in cubemapping) check this small screenie:
http://www.blitzbase.de/grafik2/gfx_cubemapping.jpg
or better said: is there liek a super chromed shader that reflects 100%?
regards and a million thanks!
Alvaro
ps. BTW, very cool site! nice apps! The giroom is a nice addition there! Do all of them contain their sources? Downloading now.
When I ran it directly from your bin folder I was getting some missing functions from the dll and I got sad and though it was my video card (a Geforce FX 5900 Ultra 256mb, which is DX9 compliant) so then I ran it on my other PC with a 6800 GT (also DX9) and same error! I thought: "man! my pcs are outdated!" hehehe, but then I thought you used your own dll, so I used your source and recompiled and it ran beautifully!! I still gotta get a newer PC, but I knew for sure this stuff should still run on my cards
It looks great! Only notice 1 thing as weird: Things that are reflected at the level of the floor like this:
show up ok, but if I then rotate my camera up/down around the X axis they get separated:
I'm sure you're aware of this, but I'm curious to know why it happens. Besides that, it's perfect!!!
One quick last question; should I have a sphere, suspended right in the middle of the gallery, with your shader applied to it, would it reflect the environment? (as in cubemapping) check this small screenie:
http://www.blitzbase.de/grafik2/gfx_cubemapping.jpg
or better said: is there liek a super chromed shader that reflects 100%?
regards and a million thanks!
Alvaro
ps. BTW, very cool site! nice apps! The giroom is a nice addition there! Do all of them contain their sources? Downloading now.
Strange. What were the errors? Did you install the VS2005 Redist from my site (as I mention in the readme)?
As I mention in the readme, the reflections are out a bit. The shader is converted from GLSL but the reflections looks the same in OpenGL (before I ditched OpenGL). The GLSL shader is used in two other Code Snippet demos for reflective water.
The reflections are done in a different way to how I usually do them. In this method the camera is moved to the reflecting plane when drawing to the rendertexture. I usually use the viewing camera to generate an inverted scene for reflections; I may try that when I have time.
The other issue is that Irrlicht doesn't currently have user-clip-planes. When drawing the reflections it would be nice to clip all geometry. Something else to add to Irrlicht...
How to integrate this (or just plain use with) Irrlicht is the next question. I modified your room mesh to split the floor into a separate mesh for easy manipulation. The source is with the demo so anyone who wants to play around can do so.
All the current demos on my site have source except the Doom3 loader. Still working on this.
Right there, sitting...sio2 wrote: The other issue is that Irrlicht doesn't currently have user-clip-planes. When drawing the reflections it would be nice to clip all geometry. Something else to add to Irrlicht...
Great stuff. Thanks for the "heads up". Pity this hasn't been integrated into svn yet, though (but don't hold your breath).mandrav wrote:Right there, sitting...sio2 wrote: The other issue is that Irrlicht doesn't currently have user-clip-planes. When drawing the reflections it would be nice to clip all geometry. Something else to add to Irrlicht...
There is one issue with user clip planes, in that on some hardware each clipplane enabled reduces the texture units by one. This is because it does one of the various "cheats".
I'll take a look at your patch.