Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Questions #1

Closed
ElayElay opened this issue Jan 12, 2018 · 1 comment
Closed

Some Questions #1

ElayElay opened this issue Jan 12, 2018 · 1 comment

Comments

@ElayElay
Copy link

Hi! First of all, It's so good! But I have some questions about this, could you help me?

  1. Could we render ocean directly by original geometry clipmap technology which is from the paper "Terrain Rendering Using GPU-Based Geometry Clipmaps " by Hugues Hoppe? If so, what problems will arise?
  2. In your source code, I see that you have a new method to build patch which is different from original geometry clipmap. What is the advantage of this approach compared to the original? Is it less complex to build a grid?
  3. From your course in SIGGRAPH 2017, you said that McGuire demonstrated that this stitching is not required as long as there is some overlap between each level of detail, and you provided mcguire's blog post link: http://casual-effects.blogspot.co.uk/2014/04/fast-terrain-rendering-with-continuous.html. I'm confused here. But, I do not seem to see any information about the overlap on this blog. Could you provide me some references about overlap?
    Thank you so much!
@huwb
Copy link
Contributor

huwb commented Sep 22, 2018

Just came across this while searching for something and was confused why it would be closed with no reply!! Eventually remembered that we moved to email. I'm going to post my reply for future reference / in case others find these questions when searching the issues..


Hi there,

Here are my answers to the best of my understanding:

  1. Yes we could. It is a bit annoying though to implement the original article because the geometry LODs are manually stitched together, and things like T-junctions are handled manually (complex, tedious, inefficient). The original work also relies on per-frame upload from CPU to GPU (tedious, complex, potentially inefficient if not implemented carefully). Finally, because our vertex layouts match 1:1 at the transitions between LODs, we can use a simple interpolation of the shape data. Without this, it is painful to get a perfect transition between LODs. It's hard to describe concisely why this is the case, but the problems arise when a vert in a hi-res LOD sits above a diagonal edge in a lo-res LOD - here the vert height needs to be the average height of the two verts of the edge, not the average of the 4 surrounding verts. This is subtlely different and will result in z-fighting, and this problem took us a while to understand. McGuire performs the interpolation manually to ensure the verts that lie over an edge in the next LOD get the precise correct height:

"To eliminate discontinuities in elevation between grid resolutions, I use an explicit form of "trilinear" (MIP-map) interpolation. Vertices interpolate vertically towards the next lower-detail MIP level so that they exactly match the next resolution at the edge of a grid patch."

  1. Our patches have strictly no overlap - this is convenient for the reasons i list on the slides. We choose to compose the geometry from patches as they can be frustum culled which is efficient, although McGuire reported minimal speedup from patches. One direction for future work would be to instance the patches to reduce draw calls. I've left it as is for simplicity/laziness :).

  2. Yes good question, it took us a while to figure out there is overlap in mcguires work. He doesn't mention it! I'm certain it is there - it is required because the LOD geometry snaps to different resolutions and gaps would open up without it (to see roughly what this looks like, run our crest project in unity and disable "Smooth LOD" using the onscreen debug overlay, and look for the gaps). After puzzling for some time we realised mcguire uses overlaps to hide them. Look very closely at that the top image in this figure, at the boundaries between LODs: http://4.bp.blogspot.com/-wZrpKfO3YMU/U0lX7WrRxEI/AAAAAAAABfA/bnXyIIXXRZY/s1600/2014-03-29_004_terrain_r997_g3d_r4283.jpg . At the lod transition you can see zfighting in the higher res geom - sometimes verts are visible, sometimes not. This is because the hi- and lo-res geometry overlap and mcguire is rendering the visualisation with z-testing enabled, so they z-fight. This z-fighting is ok for terrain (i guess?) but disturbing for specular shading on water - this reason and the other reasons listed in our slides motivated us to eliminate overlaps between patches in our solution.

Hopefully the above makes sense or at least serves as good pointers for further thinking!

huwb pushed a commit that referenced this issue Jan 12, 2019
Merge 'huwb/crest-oceanrender master' into branch 'master'
huwb added a commit that referenced this issue Nov 12, 2021
…ng-packages

Handle missing packages for FFT baked collisions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants