Magic ISL grass material

General questions about Indigo, the scene format, rendering etc...
Post Reply
13 posts • Page 1 of 1
User avatar
pixie
Indigo 100
Posts: 2228
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
3D Software: Cinema 4D
Contact:

Magic ISL grass material

Post by pixie » Sun Aug 17, 2014 2:53 am

Would it be possible to have an isl material that gave a little variation to the grass blades?
Attachments
grass.jpg

Ilay
Posts: 49
Joined: Fri Mar 16, 2012 1:25 am
Location: Russia

Re: Magic ISL grass material

Post by Ilay » Sun Sep 14, 2014 6:22 am

Like bushes or something?

User avatar
pixie
Indigo 100
Posts: 2228
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
3D Software: Cinema 4D
Contact:

Re: Magic ISL grass material

Post by pixie » Sun Sep 14, 2014 7:46 am

Ilay wrote:Like bushes or something?
No, imagine each blade being assigned a slightly different hue, value, saturation.

Ilay
Posts: 49
Joined: Fri Mar 16, 2012 1:25 am
Location: Russia

Re: Magic ISL grass material

Post by Ilay » Sun Sep 14, 2014 9:36 pm

Seems closer to function for moss coverage - http://www.indigorenderer.com/materials/materials/1133
Look at it.

User avatar
pixie
Indigo 100
Posts: 2228
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
3D Software: Cinema 4D
Contact:

Re: Magic ISL grass material

Post by pixie » Sun Sep 14, 2014 10:46 pm

No, that's not what I'm aiming for, that material is for a straight plane, I'm going toward individual blades having different colours assigned to each and everyone. But thanks for your input anuhow. :)

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: Magic ISL grass material

Post by CTZn » Tue Sep 16, 2014 2:32 am

there was a similar request some times ago; there is one isl function that doe return a unique integer number per instance that can be used for instance to offset the coordinates of a coloured noise for each blade.

see the apple shader I may have dropped someplace, or let me know if it isn't (I'm this lazy on mobile).
obsolete asset

Ilay
Posts: 49
Joined: Fri Mar 16, 2012 1:25 am
Location: Russia

Re: Magic ISL grass material

Post by Ilay » Tue Sep 16, 2014 3:18 am

CTZn wrote:there was a similar request some times ago; there is one isl function that doe return a unique integer number per instance that can be used for instance to offset the coordinates of a coloured noise for each blade.

see the apple shader I may have dropped someplace, or let me know if it isn't (I'm this lazy on mobile).
Does this?

Code: Select all

def op_add(vec3 v3, real r) vec3:
vec3(v3.x + r, v3.y + r, v3.z + r)

def eval(vec3 pos) vec3:
let

maturationPlacement = vec2(texj() + toFloat(objectId()) , texi() * 4.0) * 0.5
variancePlacement = maturationPlacement * 7.0

map = (	fbm01(maturationPlacement, 8)
	+	fbm01(variancePlacement, 8)
	) * 0.5
smooth = smootherstep(0.15, 0.9, map)
cos = cos(texj() * 6.29) * 0.5 + 0.5
map2 = (smooth + cos) * 0.5

in

lerp(	vec3(paramC2().x * map * paramVariance() + 1.0 - paramVariance(), paramC2().y, paramC2().z),
		vec3(paramC1().x * map * paramVariance() + 1.0 - paramVariance(), paramC1().y, paramC1().z),

pow(smooth, 4.0) + pow(cos, 4.0) * 1.25)* map
objectId() and placement

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: Magic ISL grass material

Post by CTZn » Tue Sep 16, 2014 3:31 am

yes ilay that is the piece, thank you. there we can see that the UV map maturationPlacement is the base placement, adding the instance's ID to its U direction (further multiplications being context dependent). as a result the shader will never seek the same region of the map for an instance.
obsolete asset

Ilay
Posts: 49
Joined: Fri Mar 16, 2012 1:25 am
Location: Russia

Re: Magic ISL grass material

Post by Ilay » Tue Sep 16, 2014 3:54 am

Thank you

Interesting how cindigo compiled mesh to attach such attributes (I'm back to cindigo and will try it, but before back to theory and repeat isl guide)

Ilay
Posts: 49
Joined: Fri Mar 16, 2012 1:25 am
Location: Russia

Re: Magic ISL grass material

Post by Ilay » Thu Sep 18, 2014 11:26 pm

I used cindigo and trying to understand - how to get per object in stacked polygon group? seems iit does not possible

example: we have procedural hair object with proper polygonal blades of grass and generated polygon hair, Then make it editable so have object group(and it has objectId() = 1) but with stacked polygon blades and that we need randomize slightly one of color-vector
or another scenario - polygonal group needs explode to polygon objects or blades.

pixie how did did make your grass?

closer to another solution - https://www.youtube.com/watch?v=s23ypBYoVH8

User avatar
pixie
Indigo 100
Posts: 2228
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
3D Software: Cinema 4D
Contact:

Re: Magic ISL grass material

Post by pixie » Fri Sep 19, 2014 2:52 am

Ilay wrote:I used cindigo and trying to understand - how to get per object in stacked polygon group? seems iit does not possible

example: we have procedural hair object with proper polygonal blades of grass and generated polygon hair, Then make it editable so have object group(and it has objectId() = 1) but with stacked polygon blades and that we need randomize slightly one of color-vector
or another scenario - polygonal group needs explode to polygon objects or blades.

pixie how did did make your grass?

closer to another solution - https://www.youtube.com/watch?v=s23ypBYoVH8
http://boskolazovic.blogspot.pt/2014/08 ... it-v2.html
You need another plugin though (not VRAY)

Ilay
Posts: 49
Joined: Fri Mar 16, 2012 1:25 am
Location: Russia

Re: Magic ISL grass material

Post by Ilay » Fri Sep 19, 2014 4:00 am

pixie wrote:http://boskolazovic.blogspot.pt/2014/08 ... it-v2.html
You need another plugin though (not VRAY)
hmm, NR Container + mograph stuff
pixie, look http://www.indigorenderer.com/forum/vie ... 10&t=12017
so dive in isl

User avatar
pixie
Indigo 100
Posts: 2228
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
3D Software: Cinema 4D
Contact:

Re: Magic ISL grass material

Post by pixie » Fri Sep 19, 2014 9:34 am

Ilay wrote:
pixie wrote:http://boskolazovic.blogspot.pt/2014/08 ... it-v2.html
You need another plugin though (not VRAY)
hmm, NR Container + mograph stuff
pixie, look http://www.indigorenderer.com/forum/vie ... 10&t=12017
so dive in isl
:D

Post Reply
13 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests