0
$\begingroup$

I'm using a Boolean Difference modifier to cut a cube and a sphere out of a cube.

modifiers

Then, I've assigned the same material to all objects, and I've removed Surface, and added Volume Absorption:

shader settings

The sphere and cube that are being cut are set to not show in the viewport:

not render

The resulting object has excessive absorption along the cut surface between the sphere and the cube:

opaque surfaces

Why is the volume absorption causing absorption along the cut surfaces? How to remove the absorption along the cut surface?

Note:

  • the objects are all using the same material
  • I've selected the main cube, and done 'recalculate outside normals'.
  • I'm using Cycles renderer

Update:

  • I also tried applying the modifiers, moving the cutting sphere and cube out of the way, and redoing 'recalculate outside normals' => no change in appearance

Update2:

  • screenshot showing I'm using Cycles:

Using cycles

  • Also, a screenshot showing a sphere with 'Principled volume', and it is showing as a sphere, correctly:

cycles sphere

Update 3:

  • hmmmm, wierd, I created the scene from scratch, to log a bug, and it works now :thinking_face:

enter image description here

Note that here are the full steps that I followed, in order to fail to reproduce:

  1. Create a new 'General'
  2. rename the default cube to 'Main'
  3. Click on 'material properties'
  4. rename material to 'MyGlass1'
  5. under 'surface', click on 'Principled BSDF', and choose 'Remove'
  6. unfold 'Volume'
  7. click on 'None' , and choose 'Volume absorption'
  8. go to 'scene'
  9. change 'render engine' to 'Cycles'
  10. in 3d viewport, in top right, click on 'viewport shading'
  11. Create another object, eg an icosphere, call it eg 'Cutter'
  12. go to 'material properties'
  13. select 'myglass1' material, to assign MyGlass1 material to Cutter
  14. Select Main, go to Modifiers, and add a Boolean modifier
  15. select the eye-dropper from the Boolean modifier, and choose Cutter
  16. select Cutter
  17. go to 'Object properties'
  18. unfold 'Visibilty'
  19. unselect 'show in viewports' and 'show in renders'
  20. Go to 'world properties'
  21. Next to 'color', click on the yellow dot
  22. choose 'environment texture'
  23. choose machine_shop_02_1k.hdr file (from https://polyhaven.com/a/machine_shop_02)
  24. Observe that the boundary between Cutter and Main is darkly shaded

Update:

  • ah, needs the cutting sphere to be smooth shaded
  • so, modified reproduction procedure:
  1. Create a new 'General'
  2. rename the default cube to 'Main'
  3. Click on 'material properties'
  4. rename material to 'MyGlass1'
  5. under 'surface', click on 'Principled BSDF', and choose 'Remove'
  6. unfold 'Volume'
  7. click on 'None' , and choose 'Volume absorption'
  8. change color to blue, hex 0400FF
  9. go to 'scene'
  10. change 'render engine' to 'Cycles'
  11. in 3d viewport, in top right, click on 'viewport shading'
  12. Create an icosphere
  13. Rename the iconosphere to 'Cutter'
  14. go to 'material properties'
  15. select 'myglass1' material, to assign MyGlass1 material to Cutter
  16. in the 3d viewport, go to 'Object' menu, and choose 'Shade Smooth' (this is important! With shade flat, things work ok in fact)
  17. Select Main, go to Modifiers, and add a Boolean modifier
  18. select the eye-dropper from the Boolean modifier, and choose Cutter
  19. select Cutter
  20. go to 'Object properties'
  21. unfold 'Visibilty'
  22. unselect 'show in viewports' and 'show in renders'
  23. Observe that the boundary between Cutter and Main is darkly shaded

Can also try 'Apply'ing the Boolean modifier, which doesnt affect the result:

  1. select Main
  2. go to Modifiers
  3. Apply the Boolean operator
  4. select Cutter
  5. go to 'Object properties'
  6. select 'show in viewports' and 'show in renders' select Cutter
  7. in the 3d viewport, press 'g' for move, and move Cutter away from Main
  8. Observe that the boundary between where Cutter was and Main continues to be darkly shaded
$\endgroup$
7
  • 2
    $\begingroup$ First of all: this looks like EEVEE. Are you using EEVEE cannot use mesh shapes for volumetrics, i.e. it will always show the complete bounding box filled with the volume. Simple example, take a sphere and give it a Principled Volume material. In Cycles you will see a sphere, in EEVEE a cube. $\endgroup$ Jan 30 at 16:23
  • 1
    $\begingroup$ I believe I'm using cycles. Posted a screenshot showing scene set to 'cycles' $\endgroup$ Jan 31 at 8:51
  • 1
    $\begingroup$ (Added an additional screenshot showing a sphere with 'principled volume' material, showing that it is displayin correctly as a sphere) $\endgroup$ Jan 31 at 8:56
  • $\begingroup$ Hmmm, when I try to reproduce the problem from scratch, in order to file a bug report, the problem doesnt appear :thinking_face: $\endgroup$ Jan 31 at 11:35
  • 1
    $\begingroup$ Instead of writing long explanations to reproduce each step and telling us which HDR to download etc. (it is really not necessary to have the exact same hex colors, name everything like you did and all those details which only make the post totally crowded and confusing), please simply upload an example file illustrating the issue here: blend-exchange.com and follow the steps there to edit it into your question. $\endgroup$ Jan 31 at 12:11

1 Answer 1

1
$\begingroup$

I guess in general you can say: the Boolean modifier applies the shading information of the cutter object to the generated surface created by the cutter. Since the cube is by default shaded flat, a smooth shaped sphere creates a shading discrepancy between the overall shading and the one on the cutting surface.

If you go and change either both objects to flat shading or both objects to smooth, the issue will disappear. Why this happens is probably a question for the developers, but I guess the problem lies in the fact that a volume-only shader has no real surface, but the cutter object has (or at least the Boolean modifier calculates a surface between those two objects, even if the sphere had a volume-only material as well since the modifier works on a mesh base), that's why it struggles with the different (surface) shadings.

$\endgroup$
1
  • $\begingroup$ Ooo, that works. Thank you :) $\endgroup$ Jan 31 at 13:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .