Skybox uses Z-Buffer?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Skybox uses Z-Buffer?

Post by Andi|xng »

After solving my z-buffer problem ( http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=10776 ), I have encountered a new one, that is caused by the soultion of the last problem.

When I change the near clipping plane to 100 units, the sky box (created with addSkyBoxSceneNode) can not be seen any more. Is this a bug? Of course I have called skybox.setMaterialFlag(E_MATERIAL_FLAG.EMF_ZBUFFER, false).

When I switch back to the 1 unit near plane, I can see it again, with 10 units near plane I can see a part of it, with 100 units nothing.

Any idea?
ProSoft
Posts: 59
Joined: Thu Sep 08, 2005 10:55 am
Location: Brasil

Post by ProSoft »

I have the same problem... may be a internal math probl.
Baal Cadar
Posts: 377
Joined: Fri Oct 28, 2005 10:28 am
Contact:

Post by Baal Cadar »

By default the skybox is a cube with a side length of 10 units. So if you have a a larger near clip plane, you have to scale the skybox node accordingly.

Edit: The side length is 20 actually, but the nearest distance to the camera is 10.
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Post by Andi|xng »

Thanks for your idea, but it did not solve the problem. I tried already before to scale the skybox, but there was no effect. The skybox seems to have the same size as before.

Is there another solution but creating my own skybox model?
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Post by Andi|xng »

I solved the problem by changing the Irrlicht sources. When I set the skybox size to 1000 units, everything works again.
Thanks for your idea, Baal Cadar!
Post Reply