Ways of splitscreen with water scene node [SOLVED]
I downloaded the source to the demo and compiled it as-is with Irrlicht 1.5: frame rate 460 fps.zillion42 wrote: see the (very old) example from sio2 'dynamic reflection' to learn about bad frame rates...
I then used setHardwareMappingHint() to put the meshes in a static buffer: frame rate 1104fps.
Code changes:
Code: Select all
// Room scene - no floor
IAnimatedMesh* giMesh = smgr->getMesh("./data/giroom_no_floor.b3d");
//ISceneNode* giNode = smgr->addOctTreeSceneNode(giMesh->getMesh(0));
IMesh *pMesh = giMesh->getMesh(0);
pMesh->setHardwareMappingHint(irr::scene::EHM_STATIC);
ISceneNode* giNode = smgr->addMeshSceneNode(pMesh);
giNode->setMaterialFlag(EMF_LIGHTING, false);
// Floor only - this will be hold the reflections
IAnimatedMesh* giFloorMesh = smgr->getMesh("./data/giroom_floor.b3d");
pMesh = giFloorMesh->getMesh(0);
pMesh->setHardwareMappingHint(irr::scene::EHM_STATIC);
ISceneNode* giFloor = smgr->addMeshSceneNode(pMesh);
giFloor->setMaterialFlag(EMF_LIGHTING, false);
giFloor->setVisible(false);
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
well, finally I get to speak to you in person... No in fact the framerate wasn't bad at all, the framerate of the reflection seemed to be bad... Or at least the symptoms were that the reflection generally lagged behind and wasn't properly alligned, you can even see that when looking at the picture from your website... look at the chair reflection...

another issue: When turning on AA the reflection of quite a few objects simply disappears... any clue about that...
edit: I helped myself and made quite a similar shader based on the waterscene node... I borrowed your room for testing...
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=32135


another issue: When turning on AA the reflection of quite a few objects simply disappears... any clue about that...
edit: I helped myself and made quite a similar shader based on the waterscene node... I borrowed your room for testing...
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=32135

hmmm... very interesting static meshes!
but the on animate function doesn't seem to work. And I run on OpenGL, so im trying to translate your shaders into GLSL for floor.
P.S. Sio2 what are your computer specs???
EDIT: static mesh flag does not boost my fps.
but the on animate function doesn't seem to work. And I run on OpenGL, so im trying to translate your shaders into GLSL for floor.
P.S. Sio2 what are your computer specs???
EDIT: static mesh flag does not boost my fps.
Last edited by devsh on Sat Feb 14, 2009 5:45 pm, edited 2 times in total.
I started to play around with the shader for water and added a reflectivity factor. I.e the bigger it is the more of the reflection you see (original is 0.25). But When I go over 1 with the reflectivity factor, i start to get this really fun effect that i'd call "Radio-active water" this is basically the colours becoming over saturated.
I still cant get the water scene node to work by calling OnAnimate() without having put : ISceneNode(smgr->getRootSceneNode(),
EDIT: WAIT DO I HAVE TO OVERRIDE THE RENDER METHOD???
P.S. I wont be here for a week, but please dont stop posting, maybe i will finally get somewhere.
EDIT: I doesnt even work when i render it using the mesh buffer. Maybe the shader material flag is beyond repair???
EDIT: WAIT DO I HAVE TO OVERRIDE THE RENDER METHOD???
P.S. I wont be here for a week, but please dont stop posting, maybe i will finally get somewhere.
EDIT: I doesnt even work when i render it using the mesh buffer. Maybe the shader material flag is beyond repair???
1. if you're using octree nodes then the setHardwareMappingHint won't have an effect, since they are dynamic meshes. Look at my snippet - I changed the octree mesh to a standard mesh. did you test to see where your meshes ended up?devsh wrote:EDIT: static mesh flag does not boost my fps.
2. grab my reflections demo and change the code as per my above post. See what frame rate difference you get. You should get a big boost regardless of video card.
Debug it and fix it. Have you traced it through the debugger with a debug build of Irrlicht?devsh wrote:I tried everything, disabling shader, disabling RTT. And it JUST WONT DRAW ITSELF by just using OnAnimate.
what to do now??
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
Maybe you're forgetting to set the world transform? Or returning an invalid bbox?
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
I think i got it
Water->OnAnimate();
Water->OnRegisterSceneNode();
Water->render();
but there is a slight proble, since render() is a pure virtual function it has been overriden by elvman and its empty.
ok sorry for n00by question
i have a pointer to the mesh (which is a hillplane mesh) that is under private data.
so in the render function what do i call??
P.S. if I call drawmeshbuffer and i feed in WaterMesh->getMeshBuffer() will it draw the texture on it too??
Water->OnAnimate();
Water->OnRegisterSceneNode();
Water->render();
but there is a slight proble, since render() is a pure virtual function it has been overriden by elvman and its empty.
ok sorry for n00by question
i have a pointer to the mesh (which is a hillplane mesh) that is under private data.
so in the render function what do i call??
P.S. if I call drawmeshbuffer and i feed in WaterMesh->getMeshBuffer() will it draw the texture on it too??