[Closed] Mesh Select
When trying to fire a ray from the active camera to see if there is intersection with objects in front,
technique that I have seen people use is to either:
- Use a mesh snapshot of the objects in the scene to see if intersection occurs
- Add a mesh select modifier to all scene objs and then check if intersection occurs.
Delete all duplicated geometry or extra modifiers after intersections have been enumerated.
My question is this:
say the user is using some wierd geometry object like a PowerNurb, or a very large mesh or just a max nurbs will adding a mesh-select modifier and then removing it leave the geometry untouched? Ditto with the snapshot method. Is it safer to set a hold point then fetch it after you have finished. (haven’t tried that yet)
I know you need to be careful of the target object when trying to loop through all geometry, but is there another object class that you need to exclude when searching for scene geometry (like a VraySPhere object which is in the geometry class, but has no vertices (actually you can’t drop a mesh select modifier on it anyways) – but I think you know what I mean.
Any suggestions would be welcome, been a bit hesitant to write a lot of code to perform the intersections only to find that it kills someone’s prize model they have been modelling for months.
Raj
What is your ultimate goal? Do you just want to know all visible in current viewport geometry objects or anything more?
I wanted to attach point helpers to the closest face of objects so that I can measure the distance between them for a mock targeting system.
Raj