Jump to content
Hash, Inc. Forums
Sign in to follow this  
robcat2075

Displacement torture test

Recommended Posts

Here is a turn-around of flat grids with displacement maps on them.

I modeled some hemispheres and pyramid shapes, put a gray gradient on them and shot them from overhead with an orthogonal camera.

OverheadCam.JPG

The render that produced is on the top card. The bottom card has the image blurred and re-saved in Photoshop.

The shading results are fairly consistent in the first half revolution when the patch normals are facing us, but get odd when they are facing away.

 

Share this post


Link to post
Share on other sites

Yeah, it's like it remains totally consistent from 30 degrees rotating through to -30 degrees and then because some of the bumps become mostly obscured by other bumps it can't figure out how it should look. Which is pretty fair when you consider that it's working from a flat 2D image.

Share this post


Link to post
Share on other sites

The popping at extreme angles can be mostly eliminated by rendering at a higher res.

The difference between the top and bottom here is the big surprise...

BumpTurn090.jpg

 

Share this post


Link to post
Share on other sites

This comparison uses the same displacement geometry rendered from the overhead camera at resolutions of 640, 320, 160 and 80 pixels wide, then applied to the same curved model.

This frame was rendered at 640x480, 16 passes.

Notice that the number of stair-steps on the tall X is the same on each model. This suggests that it is not a lack of resolution in the displacement map that causes it. If it were I would expect there to be 4x the number of steps from the 640 pixel map as from the 80 pixel map.

BumpTurn_4v_044.jpg

 

 

Below  is the same frame rendered at 4x4x the resolution (2560x1920) with just one pass, then shrunk down to 640x480 in Photoshop.

For most anti-aliasing purposes I would expect this to appear the same as the 640x480 16-pass render since both are sampling the same number of points (4x4) for each final pixel.

However, the stair-stepping on the "640" model is greatly reduced now. This indicates there is enough information in the 640 map to produce a better result but it was somehow not being all used. Notice that the "80" model has the same frequency of stair-stepping as in the original 640x480 render. This suggests that the original render was using ¼ x¼  of the information that was present. 

Could this be as simple as a MIP-map problem?

BumpTurn_4vHDShrunk_044.jpg
 

 

Below is the same frame rendered at 640x480, with the displacement maps reset to BUMP. Here the diagonal lines render nearly flawless.

BumpTurn_4vBUMP_044.jpg

Share this post


Link to post
Share on other sites

Here is a surprise.

Compare the peaks of the hemisphere shapes between these two renders. This first one shows noticeable stair-stepping...

5passSample.jpg

When I examine that stair-stepping VERY closely, it is like a plateau, then several short steps packed together, then another plateau, then several short steps packed together...

In this version the stepping is not nearly as obvious...

1passSample.jpg

 

 

Both have the same resolution displacement map and both are OpenEXR format. However the displacement map for the top image was rendered with 5 passes while the map for the bottom used only one pass.

I had long presumed that more passes was better when making displacement maps but that is not the case!

D'oh!

Share this post


Link to post
Share on other sites

Here is a further inquiry into multipass rendering of displacement maps.

I shot the same set of domes and pyramids to render displacement maps with 1, 16, 64 and 256 passes, then put each of those on a copy of the curved shape.

These are all excerpts from the same rendered frame, the only difference is the displacement map on the model...

The 1-pass map shows a slight banding in the displaced shape

001passSample.jpg

 

With the 16 pass map it is noticeable...

016passSample.jpg

 

 

With 64 passes, even more so....

064passSample.jpg

 

 

256... ouch!

256passSample.jpg

 

Somehow the data is being quantized into narrow bands when the displacement map is being rendered. Since it gets worse with more passes, something must be going wrong in the calculations that combine the data from the multiple passes.

Share this post


Link to post
Share on other sites

Here is another experiment. Watch the tall X as the camera moves away. (clearer if you hit the  full-screen button)

As soon as the jaggies get small enough to not be seen... a larger set of jaggies get swapped in.  :facepalm:

Some decision is being made too soon.

 

 

Share this post


Link to post
Share on other sites
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...