Softimage Assigning 2 different textures randomly to foliage

Discussions regarding Materials, Material-Compounds or Shaders, etc.
Post Reply
User avatar
Maximus
Posts: 1105
Joined: 09 Jun 2009, 15:45

Softimage Assigning 2 different textures randomly to foliage

Post by Maximus » 05 May 2018, 02:33

i've posted this on redshift forum too but maybe it wasnt that visible :D


Hey guys, this might be a stupid thing but im stuck and im pretty sure im missing something really basic in here :(

Lets say i have a tree (trunk + leaves) all modeled and uv mapped.
I have 2 textures for the leaves, one is green and another is orangeish for the autumn season.

Two questions:

1) I want to randomly apply both of these textures at the same time to the leaves, in a way that when i render both colors appears randomly on the leaves. How to do this?

2) Is it also possible instead of randomizing, to group them for example a group of leaves that are close together has an orange texture and the rest of the leves have a green one?

Thanks a lot

Max

User avatar
mattmos
Posts: 445
Joined: 02 Dec 2009, 16:59

Re: Softimage Assigning 2 different textures randomly to foliage

Post by mattmos » 06 May 2018, 05:44

I was looking for a solution to this the other day for some foliage, there are a couple of ways of doing it, could offset uvs, or switch materials if you have multiple colour texture variations, I've just shown a simple colour change. Uses Julian Johnson's excellent polygon island indexer ( http://julianjohnsonsblog.blogspot.co.u ... lands.html ), which i've just modulo-ed to get a repeating number between 0 and 3:

leaf_variations.jpg

User avatar
Maximus
Posts: 1105
Joined: 09 Jun 2009, 15:45

Re: Softimage Assigning 2 different textures randomly to foliage

Post by Maximus » 06 May 2018, 13:47

Thanks Matt, im going to try this out! very nice result!

just to be sure, you created an ice tree on the leaves mesh right?

User avatar
mattmos
Posts: 445
Joined: 02 Dec 2009, 16:59

Re: Softimage Assigning 2 different textures randomly to foliage

Post by mattmos » 06 May 2018, 16:29

Yep, that first get geo node should probably be self...

User avatar
Maximus
Posts: 1105
Joined: 09 Jun 2009, 15:45

Re: Softimage Assigning 2 different textures randomly to foliage

Post by Maximus » 07 May 2018, 01:11

mattmos wrote: 06 May 2018, 16:29 Yep, that first get geo node should probably be self...
Matt sorry im havin some issue, whats your integer_attribute node set as? i just cant get the color variation, it just makes the leaves of a single color. what about your modulo also?

User avatar
mattmos
Posts: 445
Joined: 02 Dec 2009, 16:59

Re: Softimage Assigning 2 different textures randomly to foliage

Post by mattmos » 07 May 2018, 09:42

The modulo is 4, so it loops from 0 to 3, but it could be any number depending on how many leaf variations you want. Make sure you set the ice tree first, and once you know that your custom integer (the self.islands in my case) is working, then you bring that into the integer attribute as it should show up in the drop down list of available attributes.

User avatar
Maximus
Posts: 1105
Joined: 09 Jun 2009, 15:45

Re: Softimage Assigning 2 different textures randomly to foliage

Post by Maximus » 07 May 2018, 14:13

Thanks, it works perfectly now :)

much appreciated

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests