POV-Ray : Newsgroups : povray.binaries.images : fur take 2 Server Time
16 Aug 2024 22:20:00 EDT (-0400)
  fur take 2 (Message 11 to 13 of 13)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Zeger Knaepen
Subject: Re: fur take 2
Date: 9 Jan 2002 19:14:16
Message: <3c3cdcd8@news.povray.org>
> Very nice!
tnx :)

> I can see that you too have figured out that one important trick to simulate
> fur is using "dark highlights". :)
thanks to your fur-texture :)
Another important thing is a bit of fuzziness at the edges.  That's the only reason
I'm
using shaders instead of just textures...
Problem now is that it's not suitable for animations, because the structure of the fur
doesn't move along with the object.  I can change that by not using the actual point
as a
parameter for the noise used, but the uv-coordinates.  However, if I did that, the
shader
couldn't be used for objects that have no uv-coordinates (like isosurfaces)...
Anyway, for stills and distant objects, I think this is a good enough fur-shader :)

cu!
--
camera{location-z*3}#macro G(b,e)b+(e-b)*(C/50)#end#macro L(b,e,k,l)#local C=0
;#while(C<50)sphere{G(b,e),.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1
;#end#end L(y-x,y,x,x+y)L(y,-x-y,x+y,y)L(-x-y,-y,y,y+z)L(-y,y,y+z,x+y)L(0,x+y,
<.5,1,.5>,x)L(0,x-y,<.5,1,.5>,x)               // ZK http://www.povplace.be.tf


Post a reply to this message

From: Vahur Krouverk
Subject: Re: fur take 2
Date: 11 Jan 2002 12:56:44
Message: <3C3F27B9.2080500@comtrade.ee>
Zeger Knaepen wrote:
[Snip]

Nice to see, that someone is playing with shaders and creating such 
beautiful pictures!
I took a look to your shader and I must admit, that I don't understand 
its semantics at all (as I've never learned Flemish? ;o) But I looked at 
it from syntax viewpoint and may I propose couple of improvement 
suggestions?
I noted, that you created help function intercol() to mix 2 colors, but 
shading language has built-in function mix() with same functionality. 
Using it instead of user-function will save couple of commands.
You calculate value of opac from dot production of normalized normal and 
  incident vectors, later you calculate normalized normal vector again 
and  store it in variable Norm. By moving this before opac calculation, 
you can save one vector normalization.
I'm not sure, what is meaning of variable teken? Will it hold sign of 
cosinus? In this case it would be much more effective to use built-in 
sign function (note, that sign returns 0, if argument is 0, but in 
current case it does not matter, as value of ruis4 should remain same).
There is couple of variables, which values are calculated, but never 
used. Better would be to comment them out, if you don't want to delete 
them. Unfortunately SL compiler is not so smart, that it could throw 
such unnecessary statements away...
Sorry to be so critic, but as my measurments have shown, shader 
execution takes great deal of rendering time and every optimization 
there is welcome.

However, this shader is quite nice and I'd like to add it to shader 
examples section in my homepage (with your permission, of course). And 
I'd like to put your contact information (name and e-mail address) there 
  as well. This would be of course only in case, if you don't have 
nothing against it (some people don't want to put e-mail addresses in 
web pages to avoid spam). So please reply here or send me mail, if you 
agree with it.


Post a reply to this message

From: Zeger Knaepen
Subject: Re: fur take 2
Date: 11 Jan 2002 21:29:35
Message: <3c3f9f8f$1@news.povray.org>
> Nice to see, that someone is playing with shaders and creating such
> beautiful pictures!
tnx

> I took a look to your shader and I must admit, that I don't understand
> its semantics at all (as I've never learned Flemish? ;o) But I looked at
> it from syntax viewpoint and may I propose couple of improvement
> suggestions?
well, I'm sure it could be improved a lot :)

> I noted, that you created help function intercol() to mix 2 colors, but
> shading language has built-in function mix() with same functionality.
hmmm, not really a surprise :)  I assumed there was such a function, but
finding the name would have taken me more time than just make it myself :)

> Using it instead of user-function will save couple of commands.
> You calculate value of opac from dot production of normalized normal and
>   incident vectors, later you calculate normalized normal vector again
> and  store it in variable Norm. By moving this before opac calculation,
> you can save one vector normalization.
> I'm not sure, what is meaning of variable teken? Will it hold sign of
> cosinus? In this case it would be much more effective to use built-in
> sign function (note, that sign returns 0, if argument is 0, but in
> current case it does not matter, as value of ruis4 should remain same).
you see, I don't know the names of the build-in function, so instead of
searching for them, I just made my own functions out of my limited knowledge
of the shader-language :)

> There is couple of variables, which values are calculated, but never
> used. Better would be to comment them out, if you don't want to delete
> them. Unfortunately SL compiler is not so smart, that it could throw
> such unnecessary statements away...
I'll delete them.

> Sorry to be so critic, but as my measurments have shown, shader
> execution takes great deal of rendering time and every optimization
> there is welcome.
uhm, why sorry?  They're helpfull comments! tnx! :)

> However, this shader is quite nice and I'd like to add it to shader
> examples section in my homepage (with your permission, of course). And
uhm, not yet please.  There is a bug in: the 'transparantie'-variable
doesn't work as it should.  I'll add the improvements you suggested and fix
that problem.  Once that's done (might be later this night) I'd be happy to
let you put it on your site.

> I'd like to put your contact information (name and e-mail address) there
>   as well. This would be of course only in case, if you don't have
> nothing against it (some people don't want to put e-mail addresses in
> web pages to avoid spam). So please reply here or send me mail, if you
> agree with it.
Spamming might be a problem indeed.  If you do this, maybe you should use my
other email-adres: zeg### [at] yahoocom

So, I'll work on it now :)

cu!
--
ZK AKA SaD
http://www.povplace.be.tf
"Luckyly they included a button, right here, that'll blow the entire thing
up!"


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.