Itoo Software Forum

Author Topic: random material id on specific sub object  (Read 4797 times)

Richard Birket

  • Full Member
  • ***
  • Posts: 146
    • Specialists in visualisation
random material id on specific sub object
« on: January 09, 2012, 12:13:35 PM »
Hi
I am creating a number of building facades using RailClone. There is one 4500mm wndow unit that is copied along a spline. The segment is an editable poly with a number of different IDs so that I can apply a multi-sub object to the geometry and glass will be applied to the glass element, metal to the frame element etc etc.

However, my glass has a subtle bumpmap to give distortions to the reflections. This works well.  The problem is that the mapping of this bump is the same for all elements in the railclone object. How could I have randomness in the mapping of this bump so that each glass element has slightly different distortions?

I attach a sample scene to help explain my question.

Kind Regards,
Rich

www.blinkimage.com

yuv

  • iToo Software
  • Sr. Member
  • *****
  • Posts: 312
  • iToo Software - CEO
    • Itoo Software
Re: random material id on specific sub object
« Reply #1 on: January 09, 2012, 01:19:28 PM »
You can apply different bump reflections to each glass, using a large texture and the mapping options in the Randomness rollup:

http://www.itoosoft.com/railclone/reference/refrandomness.php

As you can see on the below image, with this option the bump is applied along the railclone object.
Daniel Quintero
Itoo Software
www.itoosoft.com
daniel@itoosoft.com

Richard Birket

  • Full Member
  • ***
  • Posts: 146
    • Specialists in visualisation
Re: random material id on specific sub object
« Reply #2 on: January 10, 2012, 11:24:20 AM »
Thanks for your reply.

Could you give me the bump settings you are using in that screengrab please? Are you using standard max noise or Bercon noise? Also, what UVW mapping are you using on the polyobject?

If I use a large box mapping on the railclone object, say 10000x10000x10000mm, will that give a 'seam' part way accross the panels of glass every 10000mm?

I'd ask you to send me the scene, but I am on Max2009 and I would imagine you are creating it using something newer.
Kind Regards,
Rich

www.blinkimage.com

Richard Birket

  • Full Member
  • ***
  • Posts: 146
    • Specialists in visualisation
Re: random material id on specific sub object
« Reply #3 on: January 10, 2012, 01:23:29 PM »
Actually, thinking through your suggestion, I don't think this is going to achieve what I want.

I need each pane of glass to have completely different UVWs so that there isn't a smooth bump (in the reflections) from one pain to the next. The UVW almost needs offsetting randomly from pane of glass to pane of glass.

Is this possible?
Kind Regards,
Rich

www.blinkimage.com

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3359
    • iToo Software
Re: random material id on specific sub object
« Reply #4 on: January 11, 2012, 10:07:42 AM »
Quote
If I use a large box mapping on the railclone object, say 10000x10000x10000mm, will that give a 'seam' part way accross the panels of glass every 10000mm?
Yes. The mapping works as applying a UVW map modifier to the full RailClone object, instead to each segment.

Quote
I need each pane of glass to have completely different UVWs so that there isn't a smooth bump (in the reflections) from one pain to the next. The UVW almost needs offsetting randomly from pane of glass to pane of glass.
Yes, it can be done with some tricks:

- Create two materials in a multi-sub. For each one of them, put a Noise map in the bump slot. Use the same noise parameters, but change slightly the 'Phase' parameters.
- In RailClone, turn on Randomness->Offset Material ID->Sequence (0 to 1) for the segment.

In this way, the two bumps will be used alternatively along the panes of glass (see the image). If you are already using a multi-sub material, please see the help to create the material correctly:

http://www.itoosoft.com/railclone/reference/refrandomness.php

I got the idea from here:

http://area.autodesk.com/forum/autodesk-3ds-max/lighting---rendering/reflection-effects-on-mr-glass

At this moment i cannot create a Max 2009 scene for you, but i can do it later if you need it.

Carlos Quintero
iToo Software

Richard Birket

  • Full Member
  • ***
  • Posts: 146
    • Specialists in visualisation
Re: random material id on specific sub object
« Reply #5 on: January 18, 2012, 03:33:56 PM »
Thanks for your reply. I am using a multi-sub object material which is set up as follows. How would I have, for example, 3 different versions of the glass in this scenario?

Kind Regards,
Rich

www.blinkimage.com

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3359
    • iToo Software
Re: random material id on specific sub object
« Reply #6 on: January 18, 2012, 05:45:39 PM »
You should create a Multi-sub as this:

1- frame
2- frame
3- frame
4- glass 1
5- glass 2
6- glass 3
7- hotel panel
8- hotel panel
9- hotel panel
...

repeating each material three times, and setting Randomness Segment->From 0 to 2. Basically, RailClone computes a random value between 0 and 2, and adds it to the current material ID. This mode is probably less intuituve that using a fixed range between two IDs, but lets you to randomize different groups of materials in a unique multi-sub.

Carlos Quintero
iToo Software

Richard Birket

  • Full Member
  • ***
  • Posts: 146
    • Specialists in visualisation
Re: random material id on specific sub object
« Reply #7 on: January 18, 2012, 06:04:14 PM »
Many thanks. Will give it a try.

I wonder, could this be simplified in future updates?
Kind Regards,
Rich

www.blinkimage.com

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3359
    • iToo Software
Re: random material id on specific sub object
« Reply #8 on: January 18, 2012, 06:52:11 PM »

We'll think on it. Perhaps we would include an additional random mode (by range of IDs).

Carlos Quintero
iToo Software