Notifications
Clear all

[Closed] get number of visible vertexes

hi maxscripters

is it possible to get a value of the visible vertexes, which you have currently on the screen?

2 Replies

Hi Cral,

your post is a little ambiguous! I guess you don’t mean in a spline. BTW I know this returns hidden vertices < :

This may help


 fn gethiddenverts obj=
 (
 	p=case classof obj of
 	(
 		Editable_Poly	:	polyop.gethiddenverts obj
 		Editable_Mesh	:	meshop.gethiddenverts obj
 	)
 	return p
 )
 
 --usage
 hiddenverts = gethiddenverts selection[1]
 

J.

if you meant visible on the screen, as in like a ‘vertex count’ in the current camera view?

then this could be approached like so:

for each object in scene
for each vertex in object
project vertex to 2d screenspace
is vertex within screen? vertexCount++ else break
end
end