DepthPartition

23 views
Skip to first unread message

Infinite Reality

unread,
Jan 12, 2020, 1:57:16 PM1/12/20
to OpenSceneGraph Users
Hi,
I have some problem(I guess it as depth issue) on rendering huge scene(solar system) using OpenSceneGraph.
But I found your depth partitioning can resolve it and it uses for rendering huge scene.
I tried to understand your internal implementation of depth partitioning using slave camera, but I was difficult to understand it clearly.
Can you explain how to works depth partitioning shortly?
Or any helpful reference is good for me.
Thank you in advance.
Cheers!

MS

unread,
Jan 12, 2020, 10:50:36 PM1/12/20
to osg-...@googlegroups.com
Depth partition for long distances is a very old(90s-early 2000s) way to do this type of effect. 
Google reverse zbuffer and logarithmic depth buffer. The later can give you galactic distances. 

--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/4077cce7-a88a-445d-b436-44a726e61753%40googlegroups.com.


--
***********************
Maxim Serebrennik
Software Architect | Leidos

Infinite Reality

unread,
Jan 13, 2020, 11:47:32 PM1/13/20
to OpenSceneGraph Users
Thank you for your reply.
What is the principle of Depth Partition?


On Monday, January 13, 2020 at 4:50:36 AM UTC+1, MS wrote:
Depth partition for long distances is a very old(90s-early 2000s) way to do this type of effect. 
Google reverse zbuffer and logarithmic depth buffer. The later can give you galactic distances. 

On Sun, Jan 12, 2020 at 1:57 PM Infinite Reality <infinite.re...@gmail.com> wrote:
Hi,
I have some problem(I guess it as depth issue) on rendering huge scene(solar system) using OpenSceneGraph.
But I found your depth partitioning can resolve it and it uses for rendering huge scene.
I tried to understand your internal implementation of depth partitioning using slave camera, but I was difficult to understand it clearly.
Can you explain how to works depth partitioning shortly?
Or any helpful reference is good for me.
Thank you in advance.
Cheers!

--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-...@googlegroups.com.

Robert Osfield

unread,
Jan 14, 2020, 8:09:22 AM1/14/20
to OpenSceneGraph Users
On Tuesday, 14 January 2020 04:47:32 UTC, Infinite Reality wrote:
What is the principle of Depth Partition?

Depth buffer precision is dependent upon the near/far distance ratio, the lower this ratio the lower the precision and more z fighting you have - where pixels of polygons that are close together start to be rendered in the wrong order, so pixels from polygons that are further away get rendered instead of ones that are slightly nearer.

The depth partition technique breaks the view into distinct partitions, this might be just two partitions or many, usually two is enough.  The partitions abut so the far distance of near partition equals the near distances of the far partition.  The partitions are rendered before the nearer ones with the depth buffer being cleared before the next nearest partition is rendered, the colour buffer is kept for each pass.

The distance of the junction between the two partitions is not the mid distance between the overall near/far, but is computed to keep the near/far ratios and hence precision the same for each partition. The OSG's depth partition class computes this distance for you.

One alternate to depth partitioning is to use a non linear depth buffer as suggested by Maxim.  This requires custom shaders to work, but as this is normal for modern applications anyway this isn't much extra work.  Have a look online for more details on these approaches.
 

 
Reply all
Reply to author
Forward
0 new messages