[REQ] Indigo instance color variation shader

Feature requests, bug reports and related discussion
User avatar
pixie
Indigo 100
Posts: 2212
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
Contact:

Re: [REQ] Indigo instance color variation shader

Post by pixie » Sun Mar 08, 2015 2:17 am

Amazing things things happens to whose who wait! xD
zeitmeister wrote:Got it! :D
First three images ONLY ONE color texture. There are 8 different trees with 8 different alpha leaf blend materials; all accessing the main color changer material.
So this way I got to change/apply/setup the color variation shader ONE TIME, but get 8 different alpha leaf materials out of it.
Last picture using ONLY TWO textures, but color and gamma variation applied.
trees1.jpg
trees2.jpg
trees3.jpg
screenshot_shader.jpg

Code: Select all

def eval(vec3 pos) vec3 :
	let

		NUM_TEXTURES = 2
		tex_index = floorToInt(gridNoise(real(objectId())) * NUM_TEXTURES)

		c = sample2DTextureVec3(tex_index, getTexCoords(0))
		id = real(objectId())

		gamma_var = paramGammaRandomAmount()
		shift_gamma = max(0.0, (1 - gamma_var) + gridNoise(id) * gamma_var * 2.0)

		colour_var = paramColorVariationAmount()
		colour_shift = (vec3(-0.5) + vec3(gridNoise(id), gridNoise(id + 34534), gridNoise(id + 9876465))) * (colour_var * 2.0)

	in
		vec3(pow(c.x, shift_gamma), pow(c.y, shift_gamma), pow(c.z, shift_gamma)) + colour_shift
trees4.jpg
leaf_color_variation.igm

User avatar
pixie
Indigo 100
Posts: 2212
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
Contact:

Re: [REQ] Indigo instance color variation shader

Post by pixie » Sun Mar 08, 2015 2:17 am

zeitmeister wrote:Thank you a lot!
The only knickknack is the fact that setting up the shader is not possible in the C4D exporter.
fused may have to invest work here, so that the C4D Indigo shader window offers the same possibilities as the Indigo standalone GUI shader window. Plus working and exporting things correctly.

BTW: Ono, does that shader "flicker" or sample everything new when rendering an animation?
And if yes, how can we interdict that?
Can't you use the 'export' material?

User avatar
OnoSendai
Developer
Posts: 6180
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Re: [REQ] Indigo instance color variation shader

Post by OnoSendai » Sun Mar 08, 2015 3:34 am

zeitmeister wrote: BTW: Ono, does that shader "flicker" or sample everything new when rendering an animation?
And if yes, how can we interdict that?
The randomness is based on the object id which should stay the same frame to frame, so there shouldn't be flickering. Let me know if there is!

User avatar
zeitmeister
2nd Place 100
Posts: 1997
Joined: Tue Apr 22, 2008 4:11 am
Location: Limburg/Lahn, Germany
Contact:

Re: [REQ] Indigo instance color variation shader

Post by zeitmeister » Sun Mar 08, 2015 4:02 am

OnoSendai wrote: The randomness is based on the object id which should stay the same frame to frame, so there shouldn't be flickering. Let me know if there is!
Very cool, thank you!


Cheers, zeiti
Cheers, David



DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.2.23 | Indigo for C4D 4.2.22 | C4D R14.042 | Mac OS X 10.13.6 | Windows 10 Professional x64

User avatar
zeitmeister
2nd Place 100
Posts: 1997
Joined: Tue Apr 22, 2008 4:11 am
Location: Limburg/Lahn, Germany
Contact:

Re: [REQ] Indigo instance color variation shader

Post by zeitmeister » Sun Mar 08, 2015 4:40 am

pixie wrote:Can't you use the 'export' material?
Of course, but then I can change everything, all textures and parameters, only in Indigo standalone GUI... and that's not what we want.
We want full ISL-shader-access in the exporters.
Cheers, David



DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.2.23 | Indigo for C4D 4.2.22 | C4D R14.042 | Mac OS X 10.13.6 | Windows 10 Professional x64

User avatar
pixie
Indigo 100
Posts: 2212
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
Contact:

Re: [REQ] Indigo instance color variation shader

Post by pixie » Mon Oct 05, 2015 9:05 am

fused wrote:
zeitmeister wrote:Yikes... awesome! :mrgreen:
Then please tell Yves how you did that!
This should be a feature implemented in every available exporter!
I once did color variation in instances for cindigo, but scrapped it :)

can be done, easily :)
Why why why!!!! :x
:mrgreen:

User avatar
pixie
Indigo 100
Posts: 2212
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
Contact:

Re: [REQ] Indigo instance color variation shader

Post by pixie » Thu Nov 03, 2016 10:28 pm

zeitmeister wrote:
pixie wrote:Can't you use the 'export' material?
Of course, but then I can change everything, all textures and parameters, only in Indigo standalone GUI... and that's not what we want.
We want full ISL-shader-access in the exporters.
As a mid-gap solution you can now have it as in 'external' type of material.

User avatar
pixie
Indigo 100
Posts: 2212
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
Contact:

Re: [REQ] Indigo instance color variation shader

Post by pixie » Thu Nov 03, 2016 10:30 pm

zeitmeister wrote:Got it! :D
First three images ONLY ONE color texture. There are 8 different trees with 8 different alpha leaf blend materials; all accessing the main color changer material.
So this way I got to change/apply/setup the color variation shader ONE TIME, but get 8 different alpha leaf materials out of it.
Last picture using ONLY TWO textures, but color and gamma variation applied.
Sadly this shader doesn't work on GPU. :(

Code: Select all

A problem occurred with the scene:
Failed to find function 'l1l1llll1lll11l1111111l111ll1l1ll(FullHitInfo, vec4, vec4)'.
ShaderSpectrumMatParameter user shader code, line 7:
	ll1llll1llllll1l11l1l1l11l111llll = ll1111ll11llll111l1l11111ll1l1l1l((gridNoise(lll1111ll11lll1111ll11l11l1l1ll11(l1
l1llll1lll11l1111111l111ll1l1ll(l111ll1lll11ll1lll1lllllll1l1ll11, l1l111l1l11lllll1111lll11l11l1ll1, l1ll11111l111l1111lllll111l11lll1))) * l1ll11l1ll11l1llll11lllll11l1l1ll))

User avatar
Zom-B
1st Place 100
Posts: 4650
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Re: [REQ] Indigo instance color variation shader

Post by Zom-B » Thu Nov 03, 2016 10:48 pm

Added to Bugtracker, thanks for the report!
polygonmanufaktur.de

User avatar
pixie
Indigo 100
Posts: 2212
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
Contact:

Re: [REQ] Indigo instance color variation shader

Post by pixie » Sat Dec 23, 2017 2:32 am

It still isn't fixed... :(

User avatar
pixie
Indigo 100
Posts: 2212
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
Contact:

Re: [REQ] Indigo instance color variation shader

Post by pixie » Wed Jul 25, 2018 2:03 am

It seem it is now working

User avatar
pixie
Indigo 100
Posts: 2212
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
Contact:

Re: [REQ] Indigo instance color variation shader

Post by pixie » Wed Jul 25, 2018 2:08 am

test.jpg

User avatar
zeitmeister
2nd Place 100
Posts: 1997
Joined: Tue Apr 22, 2008 4:11 am
Location: Limburg/Lahn, Germany
Contact:

Re: [REQ] Indigo instance color variation shader

Post by zeitmeister » Fri Aug 03, 2018 4:20 pm

Yeah!
Cheers, David



DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.2.23 | Indigo for C4D 4.2.22 | C4D R14.042 | Mac OS X 10.13.6 | Windows 10 Professional x64

User avatar
pixie
Indigo 100
Posts: 2212
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
Contact:

Re: [REQ] Indigo instance color variation shader

Post by pixie » Mon Aug 27, 2018 10:12 pm

Is there a way to get variance in albedo channel as well as in the bump and roughness?

User avatar
zeitmeister
2nd Place 100
Posts: 1997
Joined: Tue Apr 22, 2008 4:11 am
Location: Limburg/Lahn, Germany
Contact:

Re: [REQ] Indigo instance color variation shader

Post by zeitmeister » Sat Sep 01, 2018 8:22 pm

Well we have to change the code into vec2... then it should work in these channels; blend also f.e.
I am too dumb for maths, but I can take a look..
Cheers, David



DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.2.23 | Indigo for C4D 4.2.22 | C4D R14.042 | Mac OS X 10.13.6 | Windows 10 Professional x64

Post Reply
54 posts

Who is online

Users browsing this forum: Majestic-12 [Bot], Semrush [Bot] and 1 guest