[REQ] Indigo instance color variation shader

Feature requests, bug reports and related discussion
User avatar
zeitmeister
2nd Place 100
Posts: 2010
Joined: Tue Apr 22, 2008 4:11 am
Location: Limburg/Lahn, Germany
Contact:

[REQ] Indigo instance color variation shader

Post by zeitmeister » Thu Jan 21, 2010 12:35 am

Hey,

I just came up with that idea having a look at Vray.
What it means: the ability to vary the color of a material with each Indigo instance.

For example:
One phong material with a texture or color in the diffuse color channel. On top of it, or as an option below it, the ability to vary the color or brightness of this texture or color. Let's say for example a gamma range from -0.2 to +0.3 of the original value.
Distributed over all Indigo instance objects which use that material.

This will tremendeously help to create realistic color or whatever variation when using many instances, like trees, a wood, grass, or whatever you can imagine.

What do you think about it?
I could be an ISL feature, but organically integrated into the existing exporters.


Just some thoughts.
Cheers, David



DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Re: [REQ] Indigo instance color variation shader

Post by suvakas » Thu Jan 21, 2010 1:22 am

You don't need to change Indigo for that.
It's pure exporter thing.

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

Re: [REQ] Indigo instance color variation shader

Post by zeitmeister » Thu Jan 21, 2010 1:30 am

So is it possible to call Indigo render instances per ISL?
Cheers, David



DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64

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

Re: [REQ] Indigo instance color variation shader

Post by Zom-B » Thu Jan 21, 2010 2:55 am

suvakas has such a feature in Maxigo, its all about control in the exporter for this feature!

http://www.indigorenderer.com/forum/vie ... 711#p73711
polygonmanufaktur.de

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Re: [REQ] Indigo instance color variation shader

Post by suvakas » Thu Jan 21, 2010 3:13 am

zeitmeister wrote:So is it possible to call Indigo render instances per ISL?
I'm not exactly sure what do you mean by ISL ? It's exporter that defines color/gamma of material. You can use it with ISL too of course.
The example image Zom-B posted has slightly different color for each instace and color is generated during the exporting process. It can be a random color, it can go from light to dark, it can be based on a bitmap (which is the case with my tree images) etc. But it's exporter that does all the work.

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

Re: [REQ] Indigo instance color variation shader

Post by zeitmeister » Thu Jan 21, 2010 5:54 am

Yikes... awesome! :mrgreen:
Then please tell Yves how you did that!
This should be a feature implemented in every available exporter!
Cheers, David



DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Re: [REQ] Indigo instance color variation shader

Post by suvakas » Thu Jan 21, 2010 6:01 am

I'm sure Yves knows how to do that :)
He just needs to change color or gamma values randomly for the instances. Maybe add some parameters to control the range.

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: [REQ] Indigo instance color variation shader

Post by galinette » Thu Jan 21, 2010 6:11 am

Agree with zeitmaster : that would be a nice feature to access instance's id in ISL. I'm thinking of interesting ideas not easily done with the exporter

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: [REQ] Indigo instance color variation shader

Post by OnoSendai » Thu Jan 21, 2010 10:08 am

You could vary some parameters (e.g. colour) with world space position.
Having access to the instance id is also an interesting idea, maybe I'll add that or something like it soon.

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: [REQ] Indigo instance color variation shader

Post by fused » Thu Jan 21, 2010 10:32 am

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 :)

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: [REQ] Indigo instance color variation shader

Post by galinette » Thu Jan 21, 2010 10:40 am

To illustrate my previous post, here is what I'm thinking of:

Building glass façades are not flat, but they have a slightly wavy surface, which is very visible when for instance you see the reflection of another nearby building.

To model that, the simple way is to use bump or displacement shader with waves (similar to water materials). However, I'm not fully happy with this, it does not look as the real façades.

The reason for this is : it's not a wavy profile. It's a combination of window tilt, twist and "pillow" deformation. The tilt and twist are due to mounting disaligment, the pillow to some thermal constraints.

That could be achieved by using a bump or displacement map that is a linear combination of these four functions:
deform.jpg
deform.jpg (18.66 KiB) Viewed 128004 times
The coefficients are carefully randomly chosen, and unique for each window. This would be very elegant and convenient to generate them from a seed computed as a hash of the instance id. Then, nice window materials could be released. The user of these materials would only have to ensure the windows has UV coordinates mapped to (0,0)-(1,1) and instanciate them on the whole building.

I'm sure there are ways to do this on the exporter, but far less easy and elegant.

Regards,

Galinette.
Eclat-Digital Research
http://www.eclat-digital.com

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

Re: [REQ] Indigo instance color variation shader

Post by zeitmeister » Thu Jan 21, 2010 10:07 pm

Yeah, there are many things possible with this function. Also, such an instance random factor could maybe affect the position, rotation and scale of the instances, too... controlled by noise or a texture map.
But that's future music, I would be glad having the colr random option for now! :mrgreen:
Cheers, David



DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64

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

Re: [REQ] Indigo instance color variation shader

Post by zeitmeister » Tue Aug 05, 2014 1:30 am

BUMP.
Can someone please provide a sample code for color variation on instances?
That would be so nice!
Best way: to alter gamma values of a texture randomly.

I found that exampe here:

Code: Select all

def eval(vec3 pos) vec3 :
  let
    r = real(objectId())
    base_col = vec3(0.6, 0.4, 0.4)
    random_scale = 0.1
  in
    base_col + vec3(
      fract(r * 45.345),
      fract(r * 4.57),
      fract(r * 908.3)
    ) * random_scale
But how can I translate it to alter a given texture?

Thank you!!!!
Cheers, David



DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64

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

Re: [REQ] Indigo instance color variation shader

Post by Zom-B » Tue Aug 05, 2014 1:50 am

Haven't I told you how to archive that easily in C4D already Zeiti?
polygonmanufaktur.de

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

Re: [REQ] Indigo instance color variation shader

Post by zeitmeister » Tue Aug 05, 2014 6:38 am

You did, but this way doesnt work in lots of my scenes... I am scattering a load of objects, with several sub-objects in it.
Using your solution is a lot of work, because I have to materialize each single instance.
Having a shader doing that, with lot more random colors and colored textures would be the way to do it.
And to be honest: it doesnt seem to be a big problem for someone who can code.
Same with scattering objects:
There are quite nice functions provided by Indigo which arent being supported by the exporters.
I think that Glare also should focus on them.
Cheers, David



DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64

Post Reply
54 posts

Who is online

Users browsing this forum: No registered users and 28 guests