jPCT-AE - a 3d engine for Android > Support

multiple worlds and clipping planes

(1/3) > >>

dutch_delight:
Hi all

Just a quick question about multiple worlds and clipping planes.

I've got 2 worlds, one is my terrain and skydome and has a large clipping plane (200000) and I have a second world for my scenery objects with a clipping plane of 5000. The terrain object is about 4000 polygons and is my entire playing world.

My objects sit on top of the scenery but when my objects get in range, they seem to slowly emerge from beneath the terrain and visa versa if I move away from them, they look like they sink beneath the terrain.
I am not sure what is happening, if i have all my terrain and objects in the same world, they are fine but putting them in the second world it looks like they are moving in the Y axis.

I know, I know, I probably shouldnt use a clipping plane that large but I need the world to be as big as possible. And I dont want to draw all my objects in the same world because they would all be drawn even if they're miles away.

If there is no solution to this, is there perhaps another way to cull objects when they are a certain distance from the camera without having to loop through all of them?


Thanks for any suggestion and help
Rich

EgonOlsen:
I'm not sure what the exact problem is...might be a zbuffer accuracy issue. IIRC, my own tried with such a far away clipping plane weren't very successful von Android either. Maybe a screen shot will help...

dutch_delight:
Sorry for the late reply. doing stupid overtime at work so had no time to work on my game.

And sorry for the poor screenshot but here it is:
http://www.richterdesigns.co.uk/stuff/clipping.jpg

The ground surface has a large clipping plane and the objects are in a different world with a much lower clipping plane.
The building on the left is nearby but when i move backwards, it looks like it's sinking into the surface object. (the right image)
If i put all objects into the surface world, it's all fine and visa versa if i put everything into the objects world.

K24A3:
If you change the FOV does that make a difference?

Are you changing the origins of the objects or translating everything from 0,0,0?

EgonOlsen:
Honestly, i'm not really sure what i'm seeing in this screenshot... ??? Anyway, it might be related to different scalings of the zbuffer. If that's the case, there's no other option than using one clipping plane for both worlds. Does it work if you set them both equal?

Edit: If you want to cull objects on your own, there's no other way than looping through all of the. That's not a big deal though. I'm doing this for the terrain scene in An3DBenchXL too, where i'm only rendering tress in view and at a limited distance. At that visibility border, the trees fade in softly.

Navigation

[0] Message Index

[#] Next page

Go to full version