sry my link is dead tooVirion wrote:i thought geocities has closed?
http://news.portalit.net/fullnews_yahoo ... _2268.html
Realistic water scene node
new link RealisticWaterSceneNode015.zip
http://www.mediafire.com/download.php?jayfdrjz0mt
http://www.mediafire.com/download.php?jayfdrjz0mt
I'm using this water scene node with xeffects and it seems to have some problems with:
RealisicWater.cpp
With these lines screen is just black. Commenting them makes water ugly but there's some image on the screen.
First of all i tryed commenting:
Because that rendered texture should pass through xeffects but that makes no difference. Screen is black. Have anyone using it with diferent postprocessing? How?
RealisicWater.cpp
Code: Select all
VideoDriver->setRenderTarget(RefractionMap, true, true, video::SColor(0,0,0,255)); //render to refraction
VideoDriver->setRenderTarget(ReflectionMap, true, true, video::SColor(0,0,0,255)); //render to reflection
First of all i tryed commenting:
Code: Select all
VideoDriver->setRenderTarget(0,true,true,video::SColor(255,255,255,255));
I had this node working a week or 2 ago (got a few warnings on compile tho) then I switched from codeblocks to dev-cpp and now I have this lovely stuff
EDIT: I managed to make the errors go away and the water looks pretty good except for the small detail that the water plane is perpendicular to the terrain.
Code: Select all
Irrlicht Engine version 1.5.1
Microsoft Windows XP Professional (Build 2600)
Using renderer: OpenGL 2.1.1
GeForce 7025 / NVIDIA nForce 630a/PCI/SSE2/3DNOW!: NVIDIA Corporation
OpenGL driver version is 1.2 or better.
GLSL version: 1.2
Generated terrain data (1025x1025) in 2.0030 seconds
Loaded texture: E:\ALLNEW\tools\irrlicht-1.5.1\media2\output1.jpg
Loaded texture: E:\ALLNEW\tools\irrlicht-1.5.1\media\detailmap3.jpg
Loaded texture: E:\ALLNEW\tools\irrlicht-1.5.1\media\skydome.jpg
Loaded texture: E:\ALLNEW\tools\irrlicht-1.5.1\media2\waterbump.png
GLSL shader failed to compile
(39) : warning C7502: OpenGL does not allow type suffix 'f' on constant literals
(43) : warning C7502: OpenGL does not allow type suffix 'f' on constant literals
(43) : warning C7502: OpenGL does not allow type suffix 'f' on constant literals
(44) : warning C7502: OpenGL does not allow type suffix 'f' on constant literals
(44) : warning C7502: OpenGL does not allow type suffix 'f' on constant literals
(50) : warning C7502: OpenGL does not allow type suffix 'f' on constant literals
(50) : warning C7502: OpenGL does not allow type suffix 'f' on constant literals
(51) : warning C7502: OpenGL does not allow type suffix 'f' on constant literals
(51) : warning C7502: OpenGL does not allow type suffix 'f' on constant literals
(59) : warning C7502: OpenGL does not allow type suffix 'f' on constant literals
(65) : warning C7011: implicit cast from "int" to "float"
(67) : error C0000: syntax error, unexpected '=' at token "="
(67) : error C0501: type name expected at token "="
(67) : warning C7011: implicit cast from "int" to "float"
EDIT: I managed to make the errors go away and the water looks pretty good except for the small detail that the water plane is perpendicular to the terrain.
Code: Select all
Water->setPosition(core::vector3df(0,0,0));
irrlicht is missing one small feature... it is getting the current render target... it causes problems
render to 0 or some rtt in case of xeffects
then render to refraction (which is fuckloads inefficient because the render target above could be copied to this one)
then render to reflection
then its supposed to render to screen!!!! or to the "some rtt"
render to 0 or some rtt in case of xeffects
then render to refraction (which is fuckloads inefficient because the render target above could be copied to this one)
then render to reflection
then its supposed to render to screen!!!! or to the "some rtt"
@devsh,
It's not in my refraction demo but I didn't find it too hard to render the scene, preserve the depth buffer and then render the transparent refraction object without having to do another pass, all you do is not clear the zbuffer, copy the rtt to another (Using a screenquad or something) and then use the copy to refract. The only issue is the clipping, but there're ways around that.
We do plan to add faster, low level copying functions so you don't have to use the screen quad. There was a snippet on the forums for "copyBackbufferTo" which I use quite frequently in my own projects as it allows me to do anti-aliasing on the backbuffer (Not allowed on RTTs in D3D9) and copy it over. You could use this for copying the refraction aswell. I couldn't get the OpenGL implementation working though which I posted in the same topic but I feel that I was very close.
Cheers
It's not in my refraction demo but I didn't find it too hard to render the scene, preserve the depth buffer and then render the transparent refraction object without having to do another pass, all you do is not clear the zbuffer, copy the rtt to another (Using a screenquad or something) and then use the copy to refract. The only issue is the clipping, but there're ways around that.
We do plan to add faster, low level copying functions so you don't have to use the screen quad. There was a snippet on the forums for "copyBackbufferTo" which I use quite frequently in my own projects as it allows me to do anti-aliasing on the backbuffer (Not allowed on RTTs in D3D9) and copy it over. You could use this for copying the refraction aswell. I couldn't get the OpenGL implementation working though which I posted in the same topic but I feel that I was very close.
Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Wrong work in nVidia
This code wrong work on 1.6 irr with nVidia card... 9600Pro
-
- Posts: 199
- Joined: Wed Nov 29, 2006 4:07 am
-
- Posts: 199
- Joined: Wed Nov 29, 2006 4:07 am
Hey I got it!
I had to change a line in onAnimate
from
to
because of my wacky camera setup.
Thank you!
OpenGL seems fine here in irrlicht 1.5, from some angles ...
I had to change a line in onAnimate
from
Code: Select all
CurrentCamera->getPosition();
Code: Select all
CurrentCamera->getAbsolutePosition();
Thank you!
OpenGL seems fine here in irrlicht 1.5, from some angles ...
Signature? I ain't signin nuthin!
Hi!
Haven't visited this forum for about 2 years. Had to do my own things. Sorry for not replying to your messages. I don't know what happened here for all this time, but it seams that you are still using this scene node. So I guess my duty is to make it up to date and fix things I didn't fix back then. Whenever I have some free hours, I will try to fix it, if still needed of course.
Haven't visited this forum for about 2 years. Had to do my own things. Sorry for not replying to your messages. I don't know what happened here for all this time, but it seams that you are still using this scene node. So I guess my duty is to make it up to date and fix things I didn't fix back then. Whenever I have some free hours, I will try to fix it, if still needed of course.
Sorry I had to
Nice to see you again elvman
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net