Page 1 of 3

Velvet shader

Posted: Wed Jan 26, 2011 9:24 am
by Reinuvader
Have anybody done velvet shader. As I understand it is possible with shaders, but I don't speak any code. I tried metal material with exponent 10 but then it looks like silk/satin.

So my question: Is there someone capable of creating velvet shader. Even better would be if some genius could create fur shader :D , but of course this would be overkill for velvet-like surface.

Re: Velvet shader

Posted: Wed Jan 26, 2011 9:51 am
by galinette
Real velvet shader is not currently possible (it requires some advanced BRDF models featuring some effects such as retroreflection)

I would be very happy to tweak it if it was possible!

Etienne

Re: Velvet shader

Posted: Wed Jan 26, 2011 10:04 am
by Reinuvader
OK, but then, have someone successfully faked velvet in decent manner with indigo? Any ideas and tricks would be appreciated.

Re: Velvet shader

Posted: Wed Jan 26, 2011 10:12 am
by Reinuvader
I'm thinking if there is possible to use fresnel effect to boost color/light where surface is turned away and lower the surface reflection on areas where normals are directed toward us?

Re: Velvet shader

Posted: Wed Jan 26, 2011 9:18 pm
by zeitmeister
I think that fresnel has been (planned to be?) integrated ...
My last information is that you can't access normal direction information fron ISL yet.

Re: Velvet shader

Posted: Thu Jan 27, 2011 12:36 am
by Reinuvader
I found something interesting from older topics:http://www.indigorenderer.com/forum/vie ... f=7&t=7505
Second picture is close to what I am willing to do. So how can I use this code. I tried it, but it doesn't work. What to do to get similar result?

Re: Velvet shader

Posted: Wed Jul 13, 2011 1:23 am
by CTZn
I'm trying a different approach. Though it relies on bump mapping only it should be more accurate (I think). Bump code:

Code: Select all

def eval() real : 
(sin(texi() * 314159.27) * sin(texj() * 314159.27))
/ (31415.927 * 2.0)
Just playing with numbers, there's nothing scientific here :lol:

Re: Velvet shader

Posted: Wed Jul 13, 2011 4:01 am
by OnoSendai
That looks pretty cool CTZn.
Upload to MatDB?

Re: Velvet shader

Posted: Wed Jul 13, 2011 5:31 am
by CTZn
I'm glad you like it, Nick. I'd like to experiment more before I matdb one :) but I saved an igm, let's see...

What's really exciting is that one can have as many responses to lights direction as he can code micro-patterns. Makes a lot of variations for a rather simple material. Will illustrate this.

That current pattern is about the most generic one.

PS: the shader is UV dependent, normally it should be tweaked for the scene for best results (density/length).

Re: Velvet shader

Posted: Thu Jul 14, 2011 11:50 pm
by galinette
I already tested several micro pattern shaders once, but I was limited by the non-zero derivation length of Indigo for bump shaders, thus it was impossible to make the patterns small enough for not being visible (or artifacting).

Did you use a shader or an image? Ono, was there any change of the way indigo derivates bump shaders recently?

Etienne

Re: Velvet shader

Posted: Fri Jul 15, 2011 1:30 am
by CTZn
The bump shader I used is above the render (and the igm below ;P).

I didn't notice that... ehr, derivation. I've got anisotropic effects without noticing the pattern, though I took care not to scale the pattern down too much (proceeding by order of magnitudes, 10x larger and it should be noticeable).

Thing is, you need an hires mesh coz it's agressive to shading normals.

Re: Velvet shader

Posted: Fri Jul 15, 2011 5:14 am
by Lemo
Possibly a bit too close to cell-shading, but cool stuff !

Re: Velvet shader

Posted: Sat Jul 16, 2011 4:27 am
by CTZn
Yep Lemo, the combination of U and V threads renders duller than U or V alone wich have a more pronounced anisotropy, by definition. It's also one setting among one zillion :)

You guys want the one ready to go material, ok :D I think from now on I will release micro-patterns as one tile and it will be up to the user to take care of the UV placement, how does this sound ? Adresses my concerns with scaling, but you'll still have to learn to set bump value right...

Anyways, has someone tested that velvet igm already ? What gives, what wants ?

Re: Velvet shader

Posted: Sat Jul 16, 2011 4:30 am
by CTZn
Etienne, I assume that bump has changed since you tried. Please don't take ombrage and enter the game !

Re: Velvet shader

Posted: Sun Jul 17, 2011 5:33 am
by CTZn
Lemo wrote:Possibly a bit too close to cell-shading, but cool stuff !
I thought about it, and most probably that's because the "hairs" length is constant. I'll check this out in a moment.