Make sure you convert your object to Editable Poly and collapse your modifier stack before running the script. On the surface a lot of the max modeling tools seem similar but they actually call different commands. Editable poly, is an object. Edit Poly, is a modifier. Edit Poly, is a modifier that is instanced across…
It might sound very strange, but the script is doing what's supposed to: "Returns a list of faces not occluded, with normal facing camera direction". The faces that appear to be not selected in the farther end of the bent tube are actually occluded by the faces of the part of the tube closer to the camera. If a ray, cast…
With help from someone at work I've kind of got it working. Ran the script and then put "getFrontFaces $ steps:5" (or variations of the steps integer) into the maxscript listener. It does a reasonable job but is still missing random faces that are obviously visible (ie not just small faces on the objects outline that…
Ah, yeah, that's right. I got the impression that this script would behave that way. Not sure why it would be missing completely un-occluded faces on the more complex meshes I tried earlier today. Really appreciate the help by the way. I wish autodesk would just implement Mayas camera based selection :(
Thanks, I am glad it helped. There is a bug in the code. I assumed the center of the polygons is within the polygon face (as happens for meshes) but it is incorrect. I commented the test of the center of the face for now. I am going to fix it later. The script is still working anyway, just a little less accurate. Cheers
If I remember correctly, that "steps" parameter is the subdivision of each edge of each face that becomes a ray generator to cast on the possibly occluded meshes (I might be wrong). Increasing it, should do more raycasts. Have you fiddled with these variable at the beginning of the script? local fDotThresh = 1e-3 local…
Oh also forgot, The Graphite modeling tools has a select option "By View" called "Grow From Perspective View". You go into polygon sub-object mode, click the spinner and drag it up or down to dial in the angle fall off.…
Hi all, This seems to be an issue lots of people have asked about online but I've yet to find a solution. I have a bunch of objects that I've dynameshed and decimated in zbrush, and now I need to optimise based on a camera position. i.e. select all faces visible to the camera and delete the rest. Ignore backfacing isn't…
Hi, here is the script you're looking for (hopefully :) It is not super tested (it's late). It works on Editable Polys and select all the faces visible from camera in the active viewport. It is a function and a call on the selected node, I think you should be able to run it. ( function getVisiblePolys theEditablePoly…