Itoo Software Forum

Author Topic: Sequenced Material  (Read 1176 times)

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Sequenced Material
« on: August 03, 2017, 01:20:56 PM »
Hi
is it expected behavior for material node to ignore previous material nodes? It was not for me. Documentation also doesn't mention that.
Lets randomize ids 1-10. End then randomize only those segments which have MtlId= lets say 4:


Rokas

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Sequenced Material
« Reply #1 on: August 03, 2017, 01:46:57 PM »
Hi Rokas,

Until now that has been the default behaviour. This was useful for example if you had materials setup up on the object from 1 to 3 that you wanted to remap  as follows

1 -.> 1 - 10
2 - > 11 - 20
3 -> 21 - 30

If the material nodes were set up in that order, there would be issues of the first 2 original IDs being re-randomised. Of course you could map them in reverse order to get around that, but both approaches have the potential to cause confusion.

Anyway we will discuss it further here to see if there's a benefit to changing the behaviour. Thanks for reporting it!

Cheers,

Paul
« Last Edit: August 03, 2017, 01:51:40 PM by Paul Roberts »
Paul Roberts
iToo Software

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 4388
    • iToo Software
Re: Sequenced Material
« Reply #2 on: September 05, 2017, 05:07:40 PM »
Hi, i'm checking this issue which was in our to-do list.

RailClone works slightly different from Max modifiers, regarding accumulated transformations (or modifiers).
In Max, the geometry is transformed by each modifier and flows through them. So, if you apply two "Material" modifiers, the geometry IDs are modified in sequence twice.

Instead, RailClone just checks the changes for each operator and computes a "final" transformation, which is applied to the segment only once time.
This method is more efficient, and well suitable for our instancing engine.

But as side effect, Material operators are overwritten when used in sequence, because the IDs of each operator are not computed at all.
Although i know that's not very intuitive, we prefer to keep it as now. An alternative method would be complex to implement.

Thanks,
Carlos Quintero
iToo Software

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: Sequenced Material
« Reply #3 on: September 05, 2017, 05:22:42 PM »
Fair enough.. no problems...
Rokas

BI1654

  • Newbie
  • *
  • Posts: 41
Re: Sequenced Material
« Reply #4 on: September 06, 2017, 05:55:23 PM »
I had no idea it worked like this, always assumed each material operator worked in sequence.
Might be worth rewording or adding some notes to the material operator to make it clear.