Generate an intersection mask in UV space using Copernicus

   1095   3   3
User Avatar
Member
17 posts
Joined: Oct. 2018
Offline
Hi,
I have an object with proper UVs, and there are other objects intersecting with it in 3D space. I would like to create an intersection mask in UV space using only Copernicus within the COP context (no geometric operations, i.e. booleans and etc, as it's needs to be procedural and work with a lot geometry).

For example, if a cube is pierced by a cylinder, I need a mask where the intersecting area (inside the cylinder) appears white, and the rest of the mask remains black.

Is this achievable in Copenicus? If so, what would be the best approach?
It's similar effect as https://docs.chaos.com/display/VMAX/VRayDistanceTex [docs.chaos.com] So i will use this mask later in coprnicus to generate complex textures for KarmaXPU

Thanks in advance!
User Avatar
Member
17 posts
Joined: Oct. 2018
Offline
Hello.
There is any way do to this?
User Avatar
Member
30 posts
Joined: July 2018
Online
You can rasterize the P and then do volumesample inside a wrangle to sample the sdf of intersecting geometry. That should be more robust then boolean.
Here's the hip file

Attachments:
check_intersect_copernicus.hiplc (297.0 KB)

MotionCOPs toolkit - pushing COPS into motion design and dynamic effects territory.
https://github.com/Boning1011/motion-cops [github.com]
User Avatar
Member
17 posts
Joined: Oct. 2018
Offline
boning
You can rasterize the P and then do volumesample inside a wrangle to sample the sdf of intersecting geometry. That should be more robust then boolean.
Here's the hip file
many thanks. SDF looks most promising as for me. not that "clean" method as on shader level, when you use geometry as it, without conversions, but good
  • Quick Links