I tried out the method u mentioned but no luck. Probably because I don't know how to setup my texture / render target right. Have you implemented that way before?
About the dual-paraboloid, I'll look into it but probably it will take a while since he wrote it in C#.
Hey NemoKradXNA, thanks to your help I was able to implement the glass shader :D. However, since I only do sample from the sky box, other objects are not visible through the glass. Do you know how to fix this issue? Thanks.
Well, like any reflection/refraction, it's a common problem.
You could render the scene without your refraction object first, then pass that as the refraction texture, then render the scene again, but put the camera at the same position of the reflective model but have it rotated back out to the viewer and use that image for the reflection.
Hi thanks for your help. I wonder if you can help me with spherical mapping for texture. I just want to know what algorithm you use the generate spherical coordinate for mapping let say a teapot. Thanks.
That is all done in the model. If it has been UV mapped. IF your model is not UV'd then you wont get good results. In my sample, when I create the flag, I have to set the UV manually this is done by setting the TexCoords in the vertex array
Oh I see. So I should use like Maya or 3dsMax to texture the teapot, then export the .x file right ? I just wonder let say I want to change the texture on the fly, is it possible to swap the original textures with the new one in my application ?
I'm looking at FX Composer 2.5 and it looks like they don't have it anymore. Anyway, I'll try to look into your solution, even though I'm using C++, not C#. Thank you.
Hey NemoKradXNA,
I just finish implementing true reflection / refraction using dynamic cube mapping. Visit my Youtube channel or my blog if you have time :D.
cgAddict 2 years ago
Nice one, I'll take a look :)
NemoKradXNA 2 years ago
Hey NemoKradXNA,
I tried out the method u mentioned but no luck. Probably because I don't know how to setup my texture / render target right. Have you implemented that way before?
About the dual-paraboloid, I'll look into it but probably it will take a while since he wrote it in C#.
cgAddict 2 years ago
OK, if I get time I will have a crack at implementing a true reflection/refraction.
Keep an eye on the channel or my blog and I will post it once I crack it (time willing)
NemoKradXNA 2 years ago
Hey NemoKradXNA, thanks to your help I was able to implement the glass shader :D. However, since I only do sample from the sky box, other objects are not visible through the glass. Do you know how to fix this issue? Thanks.
cgAddict 2 years ago
Well, like any reflection/refraction, it's a common problem.
You could render the scene without your refraction object first, then pass that as the refraction texture, then render the scene again, but put the camera at the same position of the reflective model but have it rotated back out to the viewer and use that image for the reflection.
NemoKradXNA 2 years ago
Or you can build the cubemap on the fly, but that will take 4 renders,
You might want to look at Dual-Paraboloid Reflections, GraphicsRunner has a good post on that.
NemoKradXNA 2 years ago
Hi thanks for your help. I wonder if you can help me with spherical mapping for texture. I just want to know what algorithm you use the generate spherical coordinate for mapping let say a teapot. Thanks.
cgAddict 3 years ago
That is all done in the model. If it has been UV mapped. IF your model is not UV'd then you wont get good results. In my sample, when I create the flag, I have to set the UV manually this is done by setting the TexCoords in the vertex array
NemoKradXNA 3 years ago
Oh I see. So I should use like Maya or 3dsMax to texture the teapot, then export the .x file right ? I just wonder let say I want to change the texture on the fly, is it possible to swap the original textures with the new one in my application ?
cgAddict 3 years ago
Yes, I would recoment Blender 3D as it is free :)
Yes, you can change the texture passed to the shader, as long as it follows the UV map it should look good.
NemoKradXNA 3 years ago
Hi,
I'm looking at FX Composer 2.5 and it looks like they don't have it anymore. Anyway, I'll try to look into your solution, even though I'm using C++, not C#. Thank you.
cgAddict 3 years ago
PM me your email address and I will send you the shader.
NemoKradXNA 3 years ago
Hi,
Can I ask where do u find this shader? I look up on Nvidia and couldn't find it anywhere. A link would help a lot. Thanks.
cgAddict 3 years ago
There is a link at the end of the clip. Failing that I know it shipped with FX Composer 1.8 as one of the samples on there.
NemoKradXNA 3 years ago
Nice.. prism effect and all!
DrJBN 3 years ago
Great job that looks awesome.
BlackSpiderWolf 3 years ago
really nice reflection and refraction man! Great work!5*s for you:)
gtxx 3 years ago
WOW! Thanks, not all my shader though, it originates from NVIDIA.
NemoKradXNA 3 years ago
thats so sweet man great job
Chavez3d 3 years ago