Use one material but with different parameters per object

Software: Away3D 4.x

nikitablack, Newbie
Posted: 25 February 2014 02:35 PM   Total Posts: 15

Hello. What is the best way to use one material for a group of objects, where each object holds some unique parameter? For example - ColorMaterial. I want to use it for 2 objects. But I don’t want to switch programs, I just want to change shader constant. Is it possible?

   

Avatar
Fabrice Closier, Administrator
Posted: 25 February 2014 03:34 PM   Total Posts: 1265   [ # 1 ]

Yes you can share a material (if there is no animator involved) and no, if you would want to set same color material and have a different color per object, you need then to have a unique material per object.

   

nikitablack, Newbie
Posted: 25 February 2014 03:45 PM   Total Posts: 15   [ # 2 ]

Sad.
Thank you.

   

Avatar
mrpinc, Sr. Member
Posted: 25 February 2014 07:16 PM   Total Posts: 119   [ # 3 ]

nikitablack, it’s not really that bad as different materials can share the same texture still so it’s not like you are doubling the bitmap data

   

nikitablack, Newbie
Posted: 26 February 2014 08:04 AM   Total Posts: 15   [ # 4 ]

actually, it’s bad. Because you need to switch the programs despite the fact that they are the same.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X