0
$\begingroup$

Working with 2.9 and Cycles, I have created a wet asphalt road. In order to create water puddles on this asphalt, I have duplicated the road object and given it a water material. Then I played with the Z axis in order to achieve the desired size of puddles. However, a close look at a high resolution image shows that the puddles’ edges are straight sharp lines and not blurred or unclear as a realistic puddle's edges should look. Please see the enclosed image. All the shaders and the tweakings that I have tried, unfortunately proved unsuccessful. Also, I did not find any similar question in that subject. What should I do in order to get a “real” puddle with “real” edges, which are not straight and sharp edges? Thank you for your kind advice.enter image description here

$\endgroup$
4
  • 2
    $\begingroup$ "All the shaders and the tweakings that I have tried, unfortunately proved unsuccessful" That is because the issue does not reside in your shaders, what you have is an insufficient geometry problem. Either add more geometry through subdivision, or go for a shader only approach $\endgroup$ – Duarte Farrajota Ramos Sep 26 '20 at 18:15
  • $\begingroup$ Duarte Farrajota Ramos, thank you so much for your prompt reply. Increasing the geometry through subdivision was one of my tweakings. Both objects, the road and the puddles, have some 87,000 vertices each, to no avail. Would you have another advice for me? Also, I don’t understand what do you mean with ‘shader only approach’. What should I do here? Thank you again. $\endgroup$ – CGPrince Sep 26 '20 at 20:44
  • $\begingroup$ Duarte Farrajota Ramos, thank you so much for your continued support. I very much appreciate it and am grateful to you. I didn’t have a chance yet to go through the links but it seems to me that you have just sent me the keys to solving my problem. Thank you. $\endgroup$ – CGPrince Sep 26 '20 at 23:09
1
$\begingroup$

While most people would recommend a pure shader solution, I'll answer for the case where you want a separate object.

Assuming that your road is a mostly flat plane using a shader to provide fine details, the issue here is that by default Blender converts shader displacement output to a bump map. Bump maps are effectively an trick of the light and will therefore show themselves as flat when viewed at extreme angles or compared with real geometry. To switch to real displacement, go to your object's 'Material Properties'->'Settings'->'Surface' and select 'Displacement Only' or 'Displacement and Bump' in the combo-box.

Now, since this is real displacement, you'll need the corresponding geometry to go with it. One way is to subdivide the geometry either manually or with a modifier until you get to the level of precision you desire. While this works, it requires judgement as to the appropriate level of subdivision.

If you are willing to use the experimental feature set, you can use micropolygon displacement to adaptively subdivide the geometry. To do this, you can go to 'Render Properties' and set 'Feature Set' to 'Experimental', then add a 'Subdivision Surface' modifier with 'Adaptive Subdivision' checked.

Caveat: the displacement does not influence physics simulations. For that, you will want to use the 'Displace' modifier which only accepts textures.

$\endgroup$
3
  • $\begingroup$ Smallobsession, thank you for your answer. The following are the details of my project: 1. For my road I use indeed a displacement map. 2. I always use 'Displacement and Bump' setting. 3. I am using ‘Experimental’, thus I have subdivided the road also with the adaptive subdivision modifier, until the water puddles started to look like “real” ones. Unfortunately the geometry is now too high and my computer crashes while rendering. Same with an outside render farm. Should you have a guidance for me to reach a solution, I would be happy to follow it. Thank you. $\endgroup$ – CGPrince Oct 1 '20 at 20:09
  • $\begingroup$ "until the water puddles started to look like “real” ones" What do you mean by this? It sounds like you're increasing the 'Levels Viewport' setting, which wouldn't affect the render. Also it is odd that the extra geometry is crashing even your render farm. I have no trouble on a very weak laptop, so this might be a bug. Perhaps switch to CPU, increase the dicing scale or cut out the area around the puddles into separate objects to restrict the amount of geometry that needs to be subdivided. $\endgroup$ – smallobsession Oct 1 '20 at 23:08
  • $\begingroup$ Thank you smallobsession for your enlightening guidance. I will follow your advices and trust that a solution will be found. Thank you for your kind support. $\endgroup$ – CGPrince Oct 2 '20 at 8:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.