BlastEntity or maybe NukeEntity
Blitz3D Forums/Blitz3D Programming/BlastEntity or maybe NukeEntity
Hi all,
I've been looking for the fastest way to get rid of an unwanted entity.
Said entity has thousands (oh say 16,000) surfaces, and one poly per surface (although each one has a different brush config).
Fortunately it has no textures. How can I get rid of it quickly?
FreeEntity can take up to thirty seconds to get rid of it! All I want to do is Nuke it from existence! Any ideas?
is clearsurface then freeentity a faster method?
Can't you just HideEntity and never use it again?
that would be memory leak. Bad thing when reinstanciating the same kind of object.. ie particle system.
I would suggest you keep each as a seperate entity. This way you are able to free them in the background over the course of a few seconds without any noticable lagging.
Perhaps you can find a way to reduce the number of surfaces? Vertex color maybe?
Can't you delete surfaces one at a time? Then you could do like Rob says.
that would be memory leak. Bad thing when reinstanciating the same kind of object.. ie particle system.
Erm, I doubt he needs many 16,000 surface entities!
Hi there,
Funny enough, deleting each surface doesn't take much time (a few seconds). But finally deleting the entity does!
Keeping it is not an option, as I need to load another one straight after.
Vertex colors sounds promising!
Thanks
How would vertex color help? I don't know much about this :D (sorry for the semi-hijack)
Since I only need to show colored triangles, I could set up a load of unwelded triangles and set their vertex colors to do the coloring. That way I could do it all a few surfaces unstead of loads.
I have a temporary solution. I clear the surfaces, then reuse the entity for the next model by refilling the surfaces with verts and tris. Any surfaces I don't need are kept blank. This means it's only reallllly slow when I try to shut down.