Set/GET material ID in custom properties not working?
#1
Hey there,

I might have encountered a bug (if I´m not doing it wrong again...):

I´m trying to change shapes in the flow, but I want to retain the original material IDs. 
So in Event A, I set custom properteis Material Ids to channel "MatID".
In Event B, where I randomly add from a list of different shapes, I use get custom properties material Id from channel "MatID", but its not working.

If I use the display data op, I can see that the custom property seems to be empty (showing only 0).

So is this a bug or am I doing it wrong?

Bit in a hurry with this one, so if its a bug, I´m probably gonna try and cache it out to several cache objects and manually assign the correct materials.

Ok, found a work around for now...
I´m using an event with several property test operators to test for material ID and then send those out to several cloned events, where I just change the material ID accordingly.
Not elegant, but its working for now.

I also don´t get how the property test works right now though...

In my personal logic I´d think if I wanna test for material ID 1, i´d set the test to "MatID" "equal and "1", the next one to "qual" and "2" etc.
But that gave me the wrong material ID, so after some more playing around, making the equal one less did the job.

Hope you can shed some light on my confusion here!
  Reply
#2
The Property Test matID thing is a bug...I forgot to convert the 0-based values I store to 1-based values. This will be fixed in the next build...for now the workaround is to do what you're doing (subtract 1 from your desired test value)...and keep in mind with the next release you'll want to undo that workaround in your scene.

I can't repro the second issue. Perhaps you can share a scene file? In my tests custom properties works fine in saving/loading the proper matID values.

Also worth noting you don't need to use custom properties at all in that scenario, if I understand what you're wanting to do....matID overrides will carry through to particles even if you change their shape.
  Reply
#3
Yeah, thought as much, that that was a bug.

I believe the problem with the material IDs not carrying through stems from the fact, that the material IDs are not read properly in the first place from the birth shape.

Although the birth shape objects display their multisubmaterial correctly in the viewport , if read them out through the display data op in the flow, all matIDs show 0.
Hence the custom set/get doesn´t work, or even simpler, the shapes just retaining their material IDs throughout events doesn´t work.

I believe you adressed this in the last update:
  • Custom Properties operator can get matID of first face in assigned particle mesh (for quick sampling of matID from particle mesh to data channel)
I´ll check it out asap and report back, just leaving this here for others...
  Reply


Forum Jump: