p_CSG - "Constructive Solid Geometry", boolean operations on geometric surfaces — computed during render.
It's material shader. You may use it like common surface shader.
Shader allows you to use 2 objects in boolean operation
Please view tutorial about using p_CSG shader (comming soon)
Difference Mode

Difference Mode
Intersection and Union Mode
Shader for object A. You may connect any material shader you want or just use constant color
Shader for object B. You may connect any material shader you want or just use constant color
Name of objects first object (transform node)
Name of objects second object (transform node)
For 'Union' swap materials for A and B
For 'Difference' swap A and B objects without materials
For 'Intersection' swap materials for A and B
Operation Mode
'Union' |
(0) - Union operation (A+B). Intersection part removed |
'Difference' |
(1) - Difference operation (B-A) |
'Intersection' |
(2) - Intersection operation |
This option should be enabled if your camera placed inside one of operated object for fixing incorrect volume computation. Shader trace ray probe backward of view direction and check object name and edit current 'volume' statement
p_CSG really don't change any geometry, it just make part of objects fully trasparent or not dependency of operation type and object name
Shader sensitive to normal orientation and object name
Warning!
p_CSG shader have many limitations:
1. Only two objects may be used for operation in one shader. Groups is not supported. In some cases for 'Difference' operation if you need cut many objects by one, you may create p_CSG shader for every object
2. Only raytrace shadows and only in 'segments' mode produce correct shadows
3. p_CSG shader produce only black non trasparent shadows. This limitation may be removed in future versions
4. Result willl be incorrect if camera placed inside both of operated objects. Please avoid of placing camera inside operated objects
5. Occlusion shader will ignore p_CSG operations and result will be incorrect
6. Please avoid of placing another objects inside operated objects. In some cases it also may produce incorrect result or shadows
7. p_CSG don't work in rasterizer mode