Cloth and spline geo in tyCache to inherit groups
#1
hey,
So I have a fairly complex setup with cloth and spline geo and muliple matIds in the source geo, that are then being cached and tyMeshed.
What I usually do in these cases, is to set sim groups, so I can later just clone the tyCaches/tyMeshes, filter by groups and assign different materials to them.
But for this setup I´m having the problem, that the clothe geo and the splines geo seems to ignore the assigned groups and I can´t filter them out via groups.

Is it possible to add that as a feature and make it a default?
Or am I just missing something and its already possible?
  Reply
#2
Groups only apply to particles. Cloth meshes, spline meshes, actor skinned geo meshes, etc, are regular max meshes and not particles, and thus do not have group assignments, nor can they receive them.
  Reply
#3
(09-30-2019, 03:18 PM)tyFlow Wrote: Groups only apply to particles. Cloth meshes, spline meshes, actor skinned geo meshes, etc, are regular max meshes and not particles, and thus do not have group assignments, nor can they receive them.

Dang...regular max meshes, those old things....Smile
Alright, than I gotta work around this differently somehow...
Still struggling with material assignments in some of my flows, especially when I have input meshes with variable face MatIds and when materials are changing throughout the flow.

Lets say I have a flow birthing a simple mesh, consisting of two spheres attached together and which have assigned two different Ids, with a Material assigned, lets call it MultiSub A.
Then I send them out to another event, where every second particle is split up into a separate event.
In the respective new event I want to assigne new  MultiSub materials to them.
Since each of them are spawned from the same mesh with multiple face MatIds, I can´t simply change mat Ids in the new events.
I could only add another shape op in the new events and have clones of the same mesh with different MatIds or different material assigned to them.
But that gets a bit tricky, when I reference VrayProxies or tyCaches in the shape op for the birth particles, where I can´t easily go in and change matIds in the mesh itself.

To be honest, I don´t quite get, why the material op doesn´t work in that way, that I can simply assign a material to all particles and or meshes in an event.
It probably has to do with some internal mechanisms I don´t understand, but if thats not the case, having a more simplified way of assigning materials definitely goes up into my top 10 wishlist...Smile
  Reply
#4
The Material ID operator just assigns a single ID to each particle, which acts as a complete override on all matIDs of that particle's mesh. The material ID operator has no knowledge of what the particle mesh's mat IDs are. So you can have a shape mesh with 100 different IDs assigned to 100 different faces, and as soon as you apply a material ID operator, every face will get the single ID applied to that particle. In other words, the matID operator works on a particle level, not a mesh/face level.
  Reply
#5
(09-30-2019, 07:15 PM)tyFlow Wrote: The Material ID operator just assigns a single ID to each particle, which acts as a complete override on all matIDs of that particle's mesh. The material ID operator has no knowledge of what the particle mesh's mat IDs are. So you can have a shape mesh with 100 different IDs assigned to 100 different faces, and as soon as you apply a material ID operator, every face will get the single ID applied to that particle. In other words, the matID operator works on a particle level, not a mesh/face level.

Yeah, I got that. Thats what makes it so difficult to assign varying materials throughout the flow for meshes with multiple Ids.
  Reply
#6
What would you suggest as an intuitive alternative? Maybe an option in the Material ID operator to simply offset existing IDs in meshes? So you could say "increment all mesh mat IDs by 5" or something?
  Reply
#7
Well, ideally I´d just drop in a material node in the event and tyFlow would handle all particle and or face material ID switching automatically, if necessary.
Kind of like the attach poly operation in max works: You attach a couple of meshes with different materials and max automatically creates a mutlisubobject material with all the different materials and Ids assigned.

Alternatively, if thats not possible, yes, incrementing all mesh mat Ids would also work.
Although that might get confusing quickly.

What I´m trying with my current setup now is:
Use separate shapes with different materials assigned from the beginning and have the material changes animated via a blend material and synced via particle age.
In theory, if the animated shape options also consider material animation, it should work.
If it doesn´t I´ll have to think of an even more complicated setup, where I separate all materialID elements into different flows.
I´ll report back soon...Smile
  Reply
#8
The problem with combining things like that is that tyFlow must then completely commandeer your material assignments. This is a nightmare when wanting to do things like material overrides or really any kind of post-sim material changes.
  Reply
#9
Well, right now there is just no clean way of controlling materials when using shapes with multiple face IDs.
I ended up:
A) Caching the flow twice, disabling the cloth and spline geo on the respective parts, where I wanted the different materials applied.
B) Also using groups to filter out other particles and then creating two tyCache objects for each different shape in the flow.
C) Finally, since i couldn´t trigger any material changes in this flow, due to the limitation of having to stick to the material IDs of the respective shapes, I had to render the tyCaches twice, with the blend material applied once and then comp it in post with a Zbuffer mask, which worked in this case.

I would much rather control materials inside the flow to create stuff like "On impact, have these particles change their material to a light material) or "When these particles meet, have them turn black)". 
Ideally that material op would also have timing controls.

I had the idea to work around this, by assigning a different shape for the event, where the material blending animation should happen, syncing by particle age, so I would just havee to animate the material blending on that other shape mesh.
But in this case this did not work, because in that event the shape was immediately turned into cloth, so I had no way of controlling any material blending, at least not to my knowledge.
I guess an option to just shift the material IDs as you suggested would also not have worked in this case, because I still would not have had any way of controlling the material blending timing.

If I could control materials directly in the flow and would want to use overrides after simulating, wouldn´t it be possible to just add one checkbox and a material pick button  in the tyCache object, that would allow an override material (using the existing material IDs)?

Or wouldn´t it be possible to just pick the material from the flow icon, like we do with other objects in max, and then you would get a multisubobject material in the material editor, like picking from a mesh with multiple face MatIds and materials assigned to them?

I guess in that case tyFlow would have to ignore all material Ids that were set in the flow, to create one big multisubobject material.
But in that case it would also be easy to override any materials simply by changing the materials in that multisubobject material.
Or maybe you could have that als as an option in the tyCache object.
Something like "ignore matIds and create multisub material for whole flow".

I don´t know, I´m just throwing ideas out here and letting you know of a limitation, that can get prety annoying, when you ahve to deal with it a lot.
  Reply


Forum Jump: