Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Reply
Old 03-Dec-2009, 13:58   #1
ccanan
Junior Member
 
Join Date: Mar 2007
Posts: 34
Default Dissolve(for LOD) in cryengine2

Hi, it's from the doc of : Chapter8-Mittring-Finding_NextGen_CryEngine2.pdf
I am pretty puzzled by the following part.
what it wants to say, Z-fade? smooth transition from high LOD to low LOD?

anyone can give some detail explanation?thx.


8.6.2 Dissolve
One of our programmers finally had the idea of a soft LOD transition based on dissolving
the object in the early z pass. As we later on render with z equal comparison we only
had to adjust the early z pass. That was not completely true as surfaces can have
exactly the same z value and then with additive blending those pixels would become
twice as bright. However as the first rendering pass of each object has frame buffer
blending disabled the problem should only occur with subsequent passes. As we can
combine multiple lights in one pass this is a rare case anyway.
The dissolve texture is projected in screen space, and by combining the random value
from the texture with a per object transition value, the pixels are rejected with the texkill
operation or simple alpha-test. With the Alpha2Coverage feature and full scene antialiasing
(FSAA) of modern cards that can be even done on a sub-pixel level. Even
without FSAA the dissolve is not that noticeable if we enable our edge-blurring post
processing effect.
Initially we had the transition state only depend on object distance but objects that are in
transition are slower to render and for quality reasons it’s better to hide it. That’s why we
added code to finish started transitions within a defined small amount of time. We not
only use the dissolve for transitions between 3D objects but also to fade out far away
objects and to hide the transition to impostors.
ccanan is offline   Reply With Quote
Old 03-Dec-2009, 17:29   #2
Richard
Mord's imaginary friend
 
Join Date: Jan 2004
Location: PT, EU
Posts: 3,506
Default

This is similar to how ETQW does it. Basically, to avoid harsh LoD transitions, at specific distances you actually render LoDs but then blend them using alpha2coverage into the final image. The effect is not perfect but it's not dependent on AA (on ETQW's case at least) but it's smoother with it. The coverage mask you use depends on the distance so that more you approach a specific object the more "solid" it appears on screen.

Because the artefact derived from alpha2coverage is manifested as a stipple mask dithering you really only want to use this for distant transitions which is why the paper mentions imposters. In ETQW it was used for imposters and actual geometry LoDs though. You can transition anything really, including shadows.

There's a performance cost associated with the blending of course but even with the artefact it's still an effective way to hide LoD transitions.
__________________
The optimist proclaims that we live in the best of all possible worlds, and the pessimist fears this is true. - James Branch Cabell
Richard is offline   Reply With Quote
Old 03-Dec-2009, 17:33   #3
AlStrong
penguins
 
Join Date: Feb 2004
Posts: 13,978
Default

Didn't Halo 2 and Half Life 2 do the same (similar?) thing ?
__________________

AlStrong is offline   Reply With Quote
Old 03-Dec-2009, 17:48   #4
Richard
Mord's imaginary friend
 
Join Date: Jan 2004
Location: PT, EU
Posts: 3,506
Default

Quote:
Originally Posted by AlStrong View Post
Didn't Halo 2 and Half Life 2 do the same (similar?) thing ?
They faded in LoDs but I don't believe they used alpha2coverage.
__________________
The optimist proclaims that we live in the best of all possible worlds, and the pessimist fears this is true. - James Branch Cabell
Richard is offline   Reply With Quote
Old 03-Dec-2009, 18:45   #5
AlStrong
penguins
 
Join Date: Feb 2004
Posts: 13,978
Default

Ah ok, I just remember a stipple pattern when objects got far.
__________________

AlStrong is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:25.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.