Jump to content
Hash, Inc. Forums

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.


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.


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.

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...



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.




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?



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


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...


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...




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!


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



With the 16 pass map it is noticeable...




With 64 passes, even more so....




256... ouch!



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.

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.



Link to post
Share on other sites
  • 6 months later...
13 minutes ago, WolfsongCG said:


I've wondered how much resolution the displacement could achieve in A:M. Especially for scenes I'd like to create that require some rough, uneven surfaces.

If you're careful it should be more than enough. The hard part is creating good maps in OpenEXR format.


My contest entry "Amber Waves" uses displacement maps to texture the dinosaur. That was my first substantial attempt to use it.



Link to post
Share on other sites

Question for ya, robcat.

What tool(s) do you use to create materials, generate exr format, etc?

I'm looking into learning how to create materials in A:M, so I'd like to work with the right tools. Or at least good ones. 


Link to post
Share on other sites

In the torture test example above i used A:M to render the original "HDR" OpenEXR displacement map.

Processing that in Photoshop (to blur for example) is frustrating because most of the painting tools we are familiar with in Photoshop become unavailable once you go from 8 bits per channel to 16 bits per channel. On top of that I've never been sure if Photoshop resaves to OpenEXR with all the possible values since Open EXR itself can have more than 16 bits per channel.

For the dinosaur maps i sketched the shapes of the scales and plates in the 3D Painter app that works with A:M models, then took the map I created, which looked like this...






...to Photoshop to do coloring and tweaking, then switched to 16 bit mode to process and slightly blur to try to hide the stair steps that happen with 8-bit displacement maps.

The Photoshop file has many layers that work together and that I turn on and off to output different maps like color, displacement, specular...


The end-product displacement map looked like this...

I'll note that I'm still using Photoshop 6.0 from 2000. Modern Photoshop may have more HDR tools but people who have modern "cloud" Photoshop say it's not much better.

One of the forum  members said that GIMP has real painting tools in HDR modes but every time I look at GIMP... i go back to Photoshop. :rolleyes:


All of the above refers to bitmap "textures".

"Materials" in A:M lingo are procedural/algorithmic things that create their effect by setting parameters in certain ways. In fact, I used a "Material" to make the gray-scale that is on the dome shapes in the first picture at the top of this thread. Materials are another huge topic in them self.



Link to post
Share on other sites

The complete "Mastering Materials" collection by Bill Young is now available in this thread...


  • Like 1
Link to post
Share on other sites
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.

  • Create New...