Page 1 of 2

z-buffer? ugly stairway steps

Posted: Mon May 24, 2004 2:45 pm
by LordNaikon
i don't know how this effect is called in english so my tries to search of a solution were without success.

Image

i have this ugly effect if i try to set water within my terrain
from a closer view it look's like that.

Image

and far away so

Image

what can i do ? it should be a straight coastal line without these ugly edge

Posted: Mon May 24, 2004 4:26 pm
by Peter Müller
don't know how to avoid this. perhaps you could cut off the landscape under the wather.
And then you draw the water first and than the landscape.

Posted: Mon May 24, 2004 4:40 pm
by LordNaikon
I HAVE IT !!

the fullscreen mode iss the rogue ! if i run it in windowed mode i have nice coastal line !!

the 2nd error or strangely thing with the fullscreen mode!
Image

Posted: Tue May 25, 2004 12:32 pm
by Peter Müller
Sorry, don't know, what could matter this effect

Posted: Wed May 26, 2004 9:48 pm
by Marcus
Hi, sorry dass ich auf deutsch antworte, aber ich hab keine Ahnung wie ich das mit meinem besch*** englisch ausdrücken soll.
Ich kenne dein problem. Habe ich selber gehabt als ich meine TerrainEngine für OpenGL programmierte. Letztendlich hat nur die erhöhing der Z Buffer tiefe und die erhöhung der Pixeltiefe auf jeweils 32bit abhilfe geschaft.
du kannst es ja mal versuchen, ich bin mir aber nicht sicher es funktioniert, dass es aber im fullscreenmode nicht und im windowed schon funtioniert deutet schon darauf hin.

Marcus

Posted: Thu May 27, 2004 12:41 am
by dingo
Not following the deutsche 100% but I beleive in English the term would be an Artefact.

And I think it might be to do with the fact that the fullscreen z-buffer and windowed z-buffer are usually set separately.

I'd just double check the setup of the fullscreen mode and it's screen attributes (zbufer, coulour depth, stencil etc)

BTW make sure you have enough resolution in the z-buffer. ie don't include the zbuffer in calcs less than 1. It takes too much of the resolution for stuff near the camera.

BTW you could use the stencil buffer to explictly turn pixels off or on from drawn polys.

Hope that helps

Posted: Thu May 27, 2004 5:09 am
by LordNaikon
thx @Marcus & dingo

i was searching for a funktion or a flag in the docu but i don't find them.
i only find a boolean flag how enabled or disabled the zbuffer in

driver->beginScene(...., true, ....) // the second parameter

:? i think you use this funktion so can you tell mell how?

Posted: Fri May 28, 2004 4:10 pm
by Peter Müller
@LordNaikon:
You wrote an terrain engine? Please, let me see!

Posted: Fri May 28, 2004 8:00 pm
by LordNaikon
You wrote an terrain engine? Please, let me see!
NO i don't! i only used the engine included terrain secene node

Posted: Fri May 28, 2004 11:11 pm
by Peter Müller
LordNaikon wrote:
You wrote an terrain engine? Please, let me see!
NO i don't! i only used the engine included terrain secene node
Is the terrain scene node an standard node of the Irrlicht Engine 0.6? Never seen this in the documentation :?

Posted: Sat May 29, 2004 3:00 am
by Unarekin
Peter Müller wrote:
LordNaikon wrote:
You wrote an terrain engine? Please, let me see!
NO i don't! i only used the engine included terrain secene node
Is the terrain scene node an standard node of the Irrlicht Engine 0.6? Never seen this in the documentation :?
Yes, it is. It's a bit buggy, though.

Posted: Sat May 29, 2004 6:51 am
by LordNaikon
wow never seen so many quotes at all :P


Code: Select all

video::IImage* iHeightMap = driver->createImageFromFile("terrain.JPG");
video::IImage* iTerrain = driver->createImageFromFile("terrain_texture.jpg");

scene::IAnimatedMesh* iTerrainMesh = smgr->addTerrainMesh("iTerrainMesh", iTerrain, iHeightMap,core::dimension2d< f32 >(100.0f, 100.0f),5000.0f); 
scene::ISceneNode* iTerrainNode = smgr->addOctTreeSceneNode(iTerrainMesh);

Posted: Sat May 29, 2004 2:49 pm
by Peter Müller
Year, actually playing a bit with the ITerrainSceneNode.

@Unarekin:
You call this http://irrlicht.sourceforge.net/phpBB2/ ... php?t=2551 a bit buggy ;)

Posted: Sat May 29, 2004 5:59 pm
by Unarekin
Peter Müller wrote:Year, actually playing a bit with the ITerrainSceneNode.

@Unarekin:
You call this http://irrlicht.sourceforge.net/phpBB2/ ... php?t=2551 a bit buggy ;)
Sure. :)

Posted: Sat May 29, 2004 7:13 pm
by Peter Müller
What sould the detail map do? There's no difference between using it and setting NULL.