Performance optimization question about shared IAssets

Software: Away3D 4.x

synkarius, Member
Posted: 07 August 2012 10:50 PM   Total Posts: 64

Let’s say I have a BitmapTexture made from a 512x512 BitmapData.

I want to perform tweening effects on the individual .alpha property of 50 Meshes’ TextureMaterials which use the aforementioned BitmapTexture. How I assume I should do this is put the BitmapTexture in the AssetLibrary and then use it to create the TextureMaterials for those 50 Meshes. Is there any better way to do it than this?

(I ask because I’m about to make the change from all 50 Meshes sharing the same TextureMaterial in order to tween them individually and I want to do this right…)

   

Richard Olsson, Administrator
Posted: 08 August 2012 08:16 AM   Total Posts: 1192   [ # 1 ]

Just set up your meshes to use different TextureMaterial instances, that all in turn share the same texture object. That will likely be the most efficient way (without knowing the specifics.)

   

synkarius, Member
Posted: 08 August 2012 08:37 AM   Total Posts: 64   [ # 2 ]

Thanks Richard. That’s what I did and it works great.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X