KeyShot Forum

Gallery => Amazing Shots => Topic started by: TpwUK on June 03, 2016, 09:35:17 AM

Title: Random Material Assignment Script
Post by: TpwUK on June 03, 2016, 09:35:17 AM
Still working on the script, sadly it looks as if have to hard code materials into it, so looking forward to the day when we can walk the materials library like we can the scene tree through script. But as you can see it works fine. It's been tested with a scene with over 5,000 parts and it works as expected. When i get some materials I can share with the script i will post in the scripts forum. In the mean time it would be great to get some feedback as to whether you think it has any value to your workflow :)

Martin
Title: Re: Random Material Assignment Script
Post by: guest84672 on June 03, 2016, 10:19:32 AM
This is looking great!
Title: Re: Random Material Assignment Script
Post by: mertmg on June 06, 2016, 01:06:55 AM
Martin its great! you`re on fire! :P
Title: Re: Random Material Assignment Script
Post by: Will Gibbons on June 10, 2016, 12:01:32 PM
I'm a touch confused, so you're choosing a set of materials to be applied to a scene full of parts? The 'random' part is which material gets applied to which geometry? Am I understanding this correctly? It sounds cool.
Title: Re: Random Material Assignment Script
Post by: TpwUK on June 10, 2016, 12:32:33 PM
Quote from: Will Gibbons on June 10, 2016, 12:01:32 PM
I'm a touch confused, so you're choosing a set of materials to be applied to a scene full of parts? The 'random' part is which material gets applied to which geometry? Am I understanding this correctly? It sounds cool.

Yes - you are understanding it correctly. Blender, Max and C4D all have floor generators to use, but you can end up with hundreds or thousands of parts (tiles or planks), so create a family of textures with different grains or patterns and then randomly apply to each part of the floor. It's surprisingly very few lines pf code but it works. The only downside at the moment is that the material family has to be hard coded, such as Ash #1, Ash #2, Ash #3 etc

Martin
Title: Re: Random Material Assignment Script
Post by: Will Gibbons on June 17, 2016, 09:33:05 AM
Quote from: TpwUK on June 10, 2016, 12:32:33 PM
Quote from: Will Gibbons on June 10, 2016, 12:01:32 PM
I'm a touch confused, so you're choosing a set of materials to be applied to a scene full of parts? The 'random' part is which material gets applied to which geometry? Am I understanding this correctly? It sounds cool.

Yes - you are understanding it correctly. Blender, Max and C4D all have floor generators to use, but you can end up with hundreds or thousands of parts (tiles or planks), so create a family of textures with different grains or patterns and then randomly apply to each part of the floor. It's surprisingly very few lines pf code but it works. The only downside at the moment is that the material family has to be hard coded, such as Ash #1, Ash #2, Ash #3 etc

Martin

That makes sense. Does your method give you more control than using a material template?
Title: Re: Random Material Assignment Script
Post by: TpwUK on June 17, 2016, 03:23:20 PM
QuoteThat makes sense. Does your method give you more control than using a material template?

I have no idea Will, never used templates. I have been delaying putting the script up because I have been waiting for some people to offer some quality textures to go with it, but none seem to be forthcoming so i will finish off a family of antique beech wood textures i threw together hopefully over the weekend and i will put the script up with those and you will be able to test it for yourself.

Martin
Title: Re: Random Material Assignment Script
Post by: Will Gibbons on June 20, 2016, 02:36:51 PM
Quote from: TpwUK on June 17, 2016, 03:23:20 PM
QuoteThat makes sense. Does your method give you more control than using a material template?

I have no idea Will, never used templates. I have been delaying putting the script up because I have been waiting for some people to offer some quality textures to go with it, but none seem to be forthcoming so i will finish off a family of antique beech wood textures i threw together hopefully over the weekend and i will put the script up with those and you will be able to test it for yourself.

Martin

Awesome, I haven't used them a bunch myself, but was just curious.