Material Inheritance
#1
hey,

I´m still struggling with materials in tyFlow and keep running into the same issues...

1. I can´t seem to find a proper way to tell tyFlow to always use the shape instance materials.
Not sure if this only happens after I assign a multisub material to the whole tyFlow (or tyCache).
2. I can´t figure out how to properly assign material IDs to shapes that already have mutiple IDs assigned.
I´d assume they´d just inherit their IDs through the shape op, but for example, after I spawn particles and have them use another shape instance with a different multisubmat assigned, they just inherit the parents material.

its all still a bit confusing and I´d like to know:
-if there is sort of a hierarchy, what tops what (shape MatID/Instance material tops material OPs MatID or the other way around, instance material override overrides everything etc.
-if there is an option to "unassign" a multisub material in the tyCache (or if we could have that options), or why the "Load instance materials" doesn´t override the assigned material...

Hope this doesn´t just sound like confused ramblings...Smile
  Reply
#2
The (VRay) Instance Material overrides should always be taking precedence over any assigned materials to the flow/cache. If you find this is not the case, let me know, since that would be a bug.

You can use the Display Data operator to view materials applied to particles and see if they're remaining consistent with your expectations related to your flow's event logic.

Disabling "load instance materials" in the tyCache should prevent the cached material overrides from being applied. In that case the material assigned to the tyCache itself would be applied to everything.
  Reply
#3
Yeah, checking with the display Data confirms that the material override in the shape isn´t working.
I think is linked to the spawn op, because if I put a shape op in the spawned particle event, it not only doesn´t take the material override from that shape node, it also doesn´t seem to take the MatIds from that shape node.
I´ll try to confirm this in a simple flow.

Ok,

I think was able to replicate the problem with a simple flow and I´ve sent it to you via mail.
  Reply
#4
Just to give a conclusion pubicly (since I got the answer via mail)
The easy way to fix my issue:

In the new event with the new shape op, put a material op on top of the event and set it to static with a value of "0". That removes any material overrides from before, that would also override the object instance material IDs in the new shape op.
  Reply
#5
Digging this thread out again...seems like my troubles continue...

Got some objects defined in the shape op, that  have different material IDs assigned (per face on the mesh itself, not via tyFlow) with a multi subobject material on them.
For each Shape I have "inherit material from reference" checked.
But when I cache it out, I don´t get any materials on the tyCache object.
Only thing that works to manually assign an override material for each shape, which can get quite cumbersome with many different shapes.
But on another flow in the same scene, the same workflow doesn´t work.
Can see the materials render fine on the tyFlow, but as soon as I cache it out, I loose all material info...

Any idea what i could be doing wrong, or have i found another bug?
  Reply
#6
Cached materials are only visible at render time with VRay when rendering as VRay instances. They are saved to a .mat file and included in the tyCache export directory. Do you see that file? It's a regular 3dsmax material library so you can load it in the material editor to check its contents.
  Reply
#7
(08-27-2019, 02:21 PM)tyFlow Wrote: Cached materials are only visible at render time with VRay when rendering as VRay instances. They are saved to a .mat file and included in the tyCache export directory. Do you see that file? It's a regular 3dsmax material library so you can load it in the material editor to check its contents.

Yeah, I meant during rendertime materials aren´t visible. And yes, the material library is being saved correctly.

Also, apart from it seemingly not working here, wouldn´t it be a good idea to have "inherit from reference" the default?
At least for me, its just always one more click to switch from "none" to "inherit from referenec" to make sure I can simply assign/change materials on my shape instances, without having to worry if the materials get updated properly in the flow.
Especially if I use shape instances with multiple face IDs, where I can´t simply assign material IDs and use a multi sub material later.
  Reply


Forum Jump: