Delete Vertex

Blitz3D Forums/Blitz3D Programming/Delete Vertex

Nexic(Posted 2005) [#1]
Is there a way to easily delete a vertex from a surface? I've tried moving my vertices way out of sight of the camera, but it still seems to be rendering them. The only way I can think of doing it would be to remove the surface and completely rebuild it without the vertex I wanted to remove, but this would surely be costly, both in programming time and to the performance of the game.


Stevie G(Posted 2005) [#2]
If the vertex is part of a single surface then all the poly's will be displayed anyway ( blitz does view fostrum culling on a per entity basis ) ... so moving the vertices of the particle you don't want displayed way off screen is the way to go. I don't think there is a huge speed different in clearsurface and re-creating the verts but it would be faster not too. I'm pretty sure Anthony Flack did it this way for his game Cletus.

Another way of hiding the individual particles .. ( assuming this is what you're doing ) is to use the alpha parameter of the vertexcolor command. You will need to set entity fx to 32+2 for this to work ... if you set the alpha flag to 0 for all the verts you don't want visible then you do not have to move them far away from the camera ... they simply won't be rendered.

Stevie


Beaker(Posted 2005) [#3]
You have to rebuild, unless its for a particle system in which case you can move (4 of) them offscreen. But, both methods are similar in speed.

Vertexalpha will still display the (faded) connected triangles so probably isn't much use.