Page 3 of 4

Re: [REQ] Indigo instance color variation shader

Posted: Sun Mar 08, 2015 2:17 am
by pixie
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

Re: [REQ] Indigo instance color variation shader

Posted: Sun Mar 08, 2015 2:17 am
by pixie
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?

Re: [REQ] Indigo instance color variation shader

Posted: Sun Mar 08, 2015 3:34 am
by OnoSendai
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!

Re: [REQ] Indigo instance color variation shader

Posted: Sun Mar 08, 2015 4:02 am
by zeitmeister
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

Re: [REQ] Indigo instance color variation shader

Posted: Sun Mar 08, 2015 4:40 am
by zeitmeister
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.

Re: [REQ] Indigo instance color variation shader

Posted: Mon Oct 05, 2015 9:05 am
by pixie
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:

Re: [REQ] Indigo instance color variation shader

Posted: Thu Nov 03, 2016 10:28 pm
by pixie
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.

Re: [REQ] Indigo instance color variation shader

Posted: Thu Nov 03, 2016 10:30 pm
by pixie
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))

Re: [REQ] Indigo instance color variation shader

Posted: Thu Nov 03, 2016 10:48 pm
by Zom-B
Added to Bugtracker, thanks for the report!

Re: [REQ] Indigo instance color variation shader

Posted: Sat Dec 23, 2017 2:32 am
by pixie
It still isn't fixed... :(

Re: [REQ] Indigo instance color variation shader

Posted: Wed Jul 25, 2018 2:03 am
by pixie
It seem it is now working

Re: [REQ] Indigo instance color variation shader

Posted: Wed Jul 25, 2018 2:08 am
by pixie
test.jpg

Re: [REQ] Indigo instance color variation shader

Posted: Fri Aug 03, 2018 4:20 pm
by zeitmeister
Yeah!

Re: [REQ] Indigo instance color variation shader

Posted: Mon Aug 27, 2018 10:12 pm
by pixie
Is there a way to get variance in albedo channel as well as in the bump and roughness?

Re: [REQ] Indigo instance color variation shader

Posted: Sat Sep 01, 2018 8:22 pm
by zeitmeister
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..