Geometry assets

Software: Away3D 4.x

superCube, Newbie
Posted: 07 November 2015 12:50 PM   Total Posts: 6

Hi,

First of all hello all ! (this is my first post smile

Quick question, with importing models as seperate assets, I noticed that there is always a geometry component for each part/asset

At the moment I am just stripping these out and putting just the mesh items into a parent container.

The mesh part has a property for the material, so seems pointless to add the geometry as well.

Is this bad practice? Are there any major drawback to working this way?

   

Avatar
Fabrice Closier, Administrator
Posted: 07 November 2015 11:46 PM   Total Posts: 1265   [ # 1 ]

Not sure what you do, but basically a mesh is an object. it holds a geometry composed of at least one subgeometries or more if the buffers are holding loads of vertices or if it has multiple materials. its true for every meshes that you add to render loop.
So when you “strip”, you actually remove the geometry of the loaded mesh and set it to another. make sure you do dispose() the previous one and dlete the matrix, and all left over from the stripped meshes.
As about bad practices. if you try to minimise the footprint of your projects, that an excellent practice! But in this case, it’s not really more than if you would do it normally: let the loaded objects as is, and destroy/remove from library the old ones.

   

superCube, Newbie
Posted: 10 November 2015 09:49 PM   Total Posts: 6   [ # 2 ]

Ah I see. So because the geometry is an inherent property of any mesh object, it will always generate a new one?

Is there a way to purge the entire AssetLibrary once all required assets have been stored elsewhere and will this improve the performance in any way?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X