POV-Ray : Newsgroups : povray.binaries.images : Function-Based Shader Macro Server Time
31 Oct 2024 08:16:26 EDT (-0400)
  Function-Based Shader Macro (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Dave Dunn
Subject: Function-Based Shader Macro
Date: 16 Aug 2002 22:34:23
Message: <3D5DB601.C180803D@aol.com>
Nothing earthshattering here, just a test of a macro I made after
looking at the source on a few DarkTree shaders. It's simply a
f_ridged_mf function with different offset, noise, scale, color and bump
size settings. I like it because it doesn't look "POV-like" for some
reason.


Post a reply to this message


Attachments:
Download 'shader.jpg' (45 KB)

Preview of image 'shader.jpg'
shader.jpg


 

From: Buke9
Subject: Re: Function-Based Shader Macro
Date: 17 Aug 2002 00:02:30
Message: <3d5dcad6$1@news.povray.org>
Nice Dave I like the middle one the best. BTW Long time no see.
"Dave Dunn" <poi### [at] aolcom> wrote in message
news:3D5DB601.C180803D@aol.com...
> Nothing earthshattering here, just a test of a macro I made after
> looking at the source on a few DarkTree shaders. It's simply a
> f_ridged_mf function with different offset, noise, scale, color and bump
> size settings. I like it because it doesn't look "POV-like" for some
> reason.
>
>
>


----------------------------------------------------------------------------
----


Post a reply to this message

From: Martin Magnusson
Subject: Re: Function-Based Shader Macro
Date: 17 Aug 2002 02:35:25
Message: <3D5DEEAD.3030708@frustratedhousewives.zzn.com>
Lovely. My favourite is the bottom left one. May we have a look at the 
source?

/ Martin


Post a reply to this message

From: Dave Dunn
Subject: Re: Function-Based Shader Macro
Date: 17 Aug 2002 08:55:34
Message: <3D5E486E.1651920F@aol.com>
Martin Magnusson wrote:

> Lovely. My favourite is the bottom left one. May we have a look at the
> source?

Thanks for your interest. I will post in povray.text.scene.files.

Dave


Post a reply to this message

From: Elijah Sarver
Subject: Re: Function-Based Shader Macro
Date: 17 Aug 2002 10:08:00
Message: <170820021008019771%spam-lowmagnet@is-speakeasy.bad-net>
In article <3D5DB601.C180803D@aol.com>, Dave Dunn <poi### [at] aolcom>
wrote:

> Nothing earthshattering here, just a test of a macro I made after
> looking at the source on a few DarkTree shaders. It's simply a
> f_ridged_mf function with different offset, noise, scale, color and bump
> size settings. I like it because it doesn't look "POV-like" for some
> reason.

I too have been messing with custom 'shaders'..

Is there any way to map specularity etc to a function? All of my
attempts to do so so far have been met with error.


Post a reply to this message

From: Dave Dunn
Subject: Re: Function-Based Shader Macro
Date: 17 Aug 2002 10:47:56
Message: <3D5E61F0.618B8540@aol.com>
Elijah Sarver wrote:

> I too have been messing with custom 'shaders'..
>
> Is there any way to map specularity etc to a function? All of my
> attempts to do so so far have been met with error.

Hmm, hope this doesn't get too far off topic, but I believe there was a debate
a few months back on povray.general about the concept of finish maps. I don't
know what the technical limitations are on actually programming them into POV,
but it seems to make logical sense to have pigment/normal/finish all accept
the same patterns - this is especially useful for "cutaway," that is,
partially-transparent patterns. The conventional wisdom is to simply make a
texture map with various materials, but that is the hard way IMO.


Post a reply to this message

From: Christopher James Huff
Subject: Re: Function-Based Shader Macro
Date: 17 Aug 2002 20:53:10
Message: <chrishuff-B27C9B.19395817082002@netplex.aussie.org>
In article <3D5E61F0.618B8540@aol.com>, Dave Dunn <poi### [at] aolcom> 
wrote:

> Hmm, hope this doesn't get too far off topic, but I believe there was a debate
> a few months back on povray.general about the concept of finish maps. I don't
> know what the technical limitations are on actually programming them into POV,
> but it seems to make logical sense to have pigment/normal/finish all accept
> the same patterns - this is especially useful for "cutaway," that is,
> partially-transparent patterns. The conventional wisdom is to simply make a
> texture map with various materials, but that is the hard way IMO.

One possibility would be to allow you to specify a function for any 
float, color, or vector value in the finish...would that satisfy you? ;-)
There would be a small speed penalty from the overhead of choosing 
between a function and a constant, but an enormous increase in 
flexibility. It would require lots of rewriting though.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Dave Dunn
Subject: Re: Function-Based Shader Macro
Date: 17 Aug 2002 22:08:08
Message: <3D5F015C.594862FF@aol.com>
Christopher James Huff wrote:

> One possibility would be to allow you to specify a function for any
> float, color, or vector value in the finish...would that satisfy you? ;-)
> There would be a small speed penalty from the overhead of choosing
> between a function and a constant, but an enormous increase in
> flexibility. It would require lots of rewriting though.

That is exactly what I was thinking. Since I have finally "come around" to using
functions, I like them better than plain old pattern identifiers anyway, if only for
consistency's sake. Now if we only had a null pattern identifier to make empy spaces
in normal maps, but that of course is a different story...   ; }


Post a reply to this message

From: Christopher James Huff
Subject: Re: Function-Based Shader Macro
Date: 18 Aug 2002 00:25:24
Message: <chrishuff-E9B021.23121617082002@netplex.aussie.org>
In article <3D5F015C.594862FF@aol.com>, Dave Dunn <poi### [at] aolcom> 
wrote:

> That is exactly what I was thinking. Since I have finally "come 
> around" to using functions, I like them better than plain old pattern 
> identifiers anyway, if only for consistency's sake. Now if we only 
> had a null pattern identifier to make empy spaces in normal maps, but 
> that of course is a different story...   ; }

Just specify a solid pattern (a function pattern with a constant value).
Normal perturbation only uses the *change* in a pattern, a constant 
pattern won't affect the normal. Try the checkers pattern as a normal 
sometime, the normal only changes at the cube boundaries.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Christoph Hormann
Subject: Re: Function-Based Shader Macro
Date: 18 Aug 2002 04:49:09
Message: <3D5F5F85.A63CB5A@gmx.de>
Christopher James Huff wrote:
> 
> [...]
> 
> One possibility would be to allow you to specify a function for any
> float, color, or vector value in the finish...would that satisfy you? ;-)

This has already been done in mlpov (a french patch):



Dans la partie finish d'une texture, au lieu d'un float ou d'une couleur

fonction. Attention il faut que la fonction retourne une valeur/une



finish {
    [uv_mapping]
    ambient COLOR | VECTOR_FUNCTION_IDENT | VECTOR_FUNCTION
    diffuse Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
    brilliance Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
    phong Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
    phong_size Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
    specular Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
    roughness Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION (Cf. warning)
    reflection COLOR | VECTOR_FUNCTION_IDENT | VECTOR_FUNCTION
    reflection { 
      Color_Reflection_Min | VECTOR_FUNCTION_IDENT | VECTOR_FUNCTION
      ,
      Color_Reflection_Max | VECTOR_FUNCTION_IDENT | VECTOR_FUNCTION
      falloff FLOAT_FALLOFF | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
      exponent FLOAT_EXPONENT | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION (Cf.
warning)
    }
    irid { 
      Irid_Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
      thickness Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
    }   
}

See: news://news.zoo-logique.org/aj8g57%241i8%241%40hebus.grizzlydev.com

I have not tried it yet, but it seems to work.  It would of course be good
if the functions would also take into account the other intersection
information (i.e. normal, ray direction).

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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