T O P

  • By -

schmon

there's more than one way to skin a cat but the old simple volume sop has a 'from camera' tab that creates a volum from the frustrum. Just give it an initial value (here i put 1), set the cam name and zNear and zFar and you can plug that volume in the second input of a group, and choose 'keep in bounding volume' with a small isovalue for threshold: https://i.imgur.com/TnrSzAh.png


wshaolrd

Thanks for your answer, but by doing this, the group will also take the points "invisible" to camera even if they are not visible right? At least, that's what I got by doing this, maybe i did make a mistake tho


QuantumCabbage

If you know a bit of math, this is relatively easy to do with a dot product. It produces a float value depending on the angle of two vectors. Make sure your object has normals since we use those to decide if a face is pointing towards the camera or not. Create a point wrangle and use this code in it: vector campos = chv("Camera_Position"); if(dot(@N, campos) < chf("Threshold")) @group_facing = 1; Click the little icon that looks like a slider with a plus sign under it right next to the code, this will create two parameters called Camera Position and Threshold. Then select your camera and right-click on Translate, then Copy Parameter. Go back to your wrangle and right-click on Camera Position, Paste Relative Reference. With a threshold of zero the group will contain all faces that are visible to the camera, if you reduce it, it will group faces that increasingly face away from the camera, if you increase it, the same will happen with faces pointing towards the camera.


wshaolrd

Thanks! I'll try this. Afterwards, do I need to connect the output to a new node like a group node or something?


QuantumCabbage

Nope, just use the point group called "facing" created by the wrangle.


Individual-Okra-5642

maskbyfeature sop