Hash Fellow robcat2075 Posted April 9, 2022 Hash Fellow Share Posted April 9, 2022 [Edit: This side discussion has been split off from topic AMC Gremlin] Investigating further... Here is a comparison of displacement effects: First with a Gradient Material set to transition from RGB 128 to RGB 129 and Displacement set to 100000% Second is that gradient rendered to a TGA and used as a Displacement map Third is that gradient rendered to an OpenEXR and used as a Displacement map The Material is able to calculate an exact value for every pixel between the 128 and the 129 levels, creating a perfectly smooth slope. The TGA map, as expected, has one stair step from 128 to 129 The EXR has 8 steps. EXR uses a 16 bit floating point format to store values, but it maps our 0-255 range for black to white to -1.0 to +1.0. From what I read about 16-bit floating point numbers, there 1024 possible values between 0 and 1 (and thus, 2048 between -1 and +1) which matches the result above , with 8 steps between our 128 and 129 gray values. So it seems that A:M is capable of rendering finer displacements, but EXR doesn't store the finer values needed. According to OpenEXR docs, EXR can have 32-bit floating point data. Maybe there is an easy way to get A:M to write those? 1 Quote Link to comment Share on other sites More sharing options...
Hash Fellow robcat2075 Posted April 9, 2022 Author Hash Fellow Share Posted April 9, 2022 Now this is interesting... I took the single-patch rectangle and lit it with one very bright Kleig light set to 100% width softness and rendered that with no other lights on it to a TGA and to an EXR. If you load and view those images they look like the top frame, below. It looks like the light has very quickly clipped out to full white in the middle. When I apply those as Displacement maps we get the result in the lower two frames. The TGA version on the left shows that the gray values reach "white" and go no further. But the EXR version has recorded values that surpass white and create displacement above and beyond what the TGA map could do. This shows that A:M displacement is able to interpret EXR values beyond 1.0. If we could make maps with those extra values we could probably have smoother displacement effects. Quote Link to comment Share on other sites More sharing options...
Hash Fellow robcat2075 Posted April 9, 2022 Author Hash Fellow Share Posted April 9, 2022 Quote Link to comment Share on other sites More sharing options...
Hash Fellow robcat2075 Posted April 10, 2022 Author Hash Fellow Share Posted April 10, 2022 If I render a map from the patch with a negative light on it, that creates data for blacker than black... negative numbers. Something the TGA version can't do. Quote Link to comment Share on other sites More sharing options...
Wildsided Posted April 10, 2022 Share Posted April 10, 2022 1 Quote Link to comment Share on other sites More sharing options...
Hash Fellow robcat2075 Posted April 10, 2022 Author Hash Fellow Share Posted April 10, 2022 1 Quote Link to comment Share on other sites More sharing options...
Hash Fellow robcat2075 Posted April 10, 2022 Author Hash Fellow Share Posted April 10, 2022 One of my false memories from childhood is the Ajax commercial with the White Knight who got your clothes "whiter than white". But it never really said that! Ajax is just "stronger than dirt." Quote Link to comment Share on other sites More sharing options...
Hash Fellow robcat2075 Posted April 14, 2022 Author Hash Fellow Share Posted April 14, 2022 This 16 bit floating point is turning out to be more complicated than I thought... An EXR rendered with a gradient from RGB 64 to RGB 65 has 16 steps instead of 8. If the gradient was 192-193, we get 2 big steps and 4 small ones... Quote Link to comment Share on other sites More sharing options...
Hash Fellow robcat2075 Posted April 15, 2022 Author Hash Fellow Share Posted April 15, 2022 This image compares seven different narrow grayscale gradients rendered to EXR and used as displacement maps. These results roughly align with what I've read... the precision of floating point variables decreases as the value gets farther from zero. From RGB 0 to RGB 1 the increments are so small that the stepping is nearly invisible, but from RGB 254 to RGB 255 the precision only allows a few steps. I can't explain why these have uneven steps and don't match the previous examples. Possible difference... these were shot with an orthogonal camera instead of a perspective camera... ?? Quote Link to comment Share on other sites More sharing options...
Hash Fellow robcat2075 Posted April 15, 2022 Author Hash Fellow Share Posted April 15, 2022 Here is the same test, except that the EXR maps were rendered with 1 pass instead of 4. One pass actually got a smoother progression of gradient values, even though the number of pixels in the decal is the same either way. I can't imagine what math mishap would cause the difference. But there it is. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.