appleseedhq / appleseed-max

appleseed plugin for Autodesk® 3ds Max®
https://appleseedhq.net/
MIT License
33 stars 16 forks source link

Objects with "Optimize for Instancing" option and different material appear with one material #350

Open usakhelo opened 4 years ago

usakhelo commented 4 years ago

Discovered this bug while working on ActiveShade PR. To reproduce do the following:

  1. Create an object
  2. Apply appleseed modifier and check "Optimize for Instancing"
  3. Make one or more instances of the object
  4. Assign different materials to the instances
  5. Render. Objects are rendered with one material due to assembly_map cache. First object assembly contains object and it's material and subsequent instances use the same assembly.
usakhelo commented 4 years ago

I'm wondering if it's a bug or it should be this way? It's single "object assembly" with its own set of object instances and materials that gets duplicated with assembly instances, right? So they will have the same material probably.

dictoon commented 4 years ago

This is a long standing limitation of appleseed: instances of an assembly cannot override materials used in that assembly, that means that all instances of an assembly use the same materials.