Velvet shader

General discussion about Indigo Materials - material requests, material developement, feedback, etc..
User avatar
Reinuvader
Posts: 34
Joined: Tue Apr 13, 2010 8:20 am
Location: Estonia
Contact:

Velvet shader

Post by Reinuvader » Wed Jan 26, 2011 9:24 am

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.
Attachments
Velvet.jpg

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

Re: Velvet shader

Post by galinette » Wed Jan 26, 2011 9:51 am

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
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
Reinuvader
Posts: 34
Joined: Tue Apr 13, 2010 8:20 am
Location: Estonia
Contact:

Re: Velvet shader

Post by Reinuvader » Wed Jan 26, 2011 10:04 am

OK, but then, have someone successfully faked velvet in decent manner with indigo? Any ideas and tricks would be appreciated.

User avatar
Reinuvader
Posts: 34
Joined: Tue Apr 13, 2010 8:20 am
Location: Estonia
Contact:

Re: Velvet shader

Post by Reinuvader » Wed Jan 26, 2011 10:12 am

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?

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

Re: Velvet shader

Post by zeitmeister » Wed Jan 26, 2011 9:18 pm

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.
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
Reinuvader
Posts: 34
Joined: Tue Apr 13, 2010 8:20 am
Location: Estonia
Contact:

Re: Velvet shader

Post by Reinuvader » Thu Jan 27, 2011 12:36 am

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?

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

Re: Velvet shader

Post by CTZn » Wed Jul 13, 2011 1:23 am

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:
Attachments
velvetUV.jpg
obsolete asset

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

Re: Velvet shader

Post by OnoSendai » Wed Jul 13, 2011 4:01 am

That looks pretty cool CTZn.
Upload to MatDB?

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

Re: Velvet shader

Post by CTZn » Wed Jul 13, 2011 5:31 am

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).
Attachments
velvet.igm
(751 Bytes) Downloaded 369 times
obsolete asset

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

Re: Velvet shader

Post by galinette » Thu Jul 14, 2011 11:50 pm

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
Eclat-Digital Research
http://www.eclat-digital.com

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

Re: Velvet shader

Post by CTZn » Fri Jul 15, 2011 1:30 am

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.
obsolete asset

Lemo
Posts: 125
Joined: Tue Sep 21, 2010 12:23 pm
Location: Montpellier, France
Contact:

Re: Velvet shader

Post by Lemo » Fri Jul 15, 2011 5:14 am

Possibly a bit too close to cell-shading, but cool stuff !

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

Re: Velvet shader

Post by CTZn » Sat Jul 16, 2011 4:27 am

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 ?
obsolete asset

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

Re: Velvet shader

Post by CTZn » Sat Jul 16, 2011 4:30 am

Etienne, I assume that bump has changed since you tried. Please don't take ombrage and enter the game !
obsolete asset

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

Re: Velvet shader

Post by CTZn » Sun Jul 17, 2011 5:33 am

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.
obsolete asset

Post Reply
33 posts

Who is online

Users browsing this forum: No registered users and 7 guests