[EMAIL PROTECTED] wrote: > Hi to everyone. > > I need to visualize a huge scene, but I should be able to go near > every detail... I tried to set a near plane of 1.0 and a far plane of > 1e9 o more, but there were precision issues because of the loss of > precision in the perspective projection matrix. Is there a simple way > to solve this? I heard that this should be done by using two linked > cameras with different near/far planes and two viewports, but I hope > there is a simpler way... > Not really. It might even be more difficult, but not overly so. To do it correctly I think you need to read up on large scene visualization (solar systems etc), which aims to solve the two problems you are having:
1. Depthbuffer precision (24-bits, so you need far/near to below 1000-10000 to avoid precision problems) 2. Floating point precision & numerical errors that occur at larg scales. So, two cameras & viewports, using the same beacon for both cameras, ought to solve the first problem. (1 to 0.5e5 and 0.5e5 to 1e9 would work for you). > Also, I have another dumb question :) ... I use more than one node to > specify the position of a 3d model (eg. if the model is in (1e9,0,0) I > use 3 nodes, each with a traslation of (1e3,0,0)), instead than a > single node. Do I get more precision by using more than one node (as I > think)? > No. Quite the opposite. This relates to point 2 above. Since you're dealing with large values, you are bound to get some floating point precision problems. (32-bit floats, which OpenGL & hence also OpenSG uses, has about 1e6 significat digist, so something at around 1e9 has a minimum precision of 1e3 (if you're counting meters here, you can place something 1 billion m away from origo, but only to 1km precision). For dealing correctly with large scenes, it has been discussed before, both here (a little) and probably elsewhere on the net and/or in academia. I think you ought find some good tips & info if you search a bit, and maybe other readers can give you good links? I don't have much knowledge about the technique used, but I think it involves having the camera at the origin always, and calculating the position of other objects relative to the camera in higher precision (double or more) then setting each transform matrix (that users 32-bit floats) each frame. Hope it helps. :) Cheers, /Marcus ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
