View Full Version : Mesh Select

12 December 2010, 08:03 AM
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:
1. Use a mesh snapshot of the objects in the scene to see if intersection occurs
2. 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.

12 December 2010, 09:20 AM
What is your ultimate goal? Do you just want to know all visible in current viewport geometry objects or anything more?

12 December 2010, 10:54 AM
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.


CGTalk Moderation
12 December 2010, 10:54 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.