POV-Ray : Newsgroups : povray.general : Wouldn't it be nice: patterns and finish items Server Time
29 Oct 2024 23:54:41 EDT (-0400)
  Wouldn't it be nice: patterns and finish items (Message 1 to 5 of 5)  
From: Roman Reiner
Subject: Wouldn't it be nice: patterns and finish items
Date: 28 Feb 2006 10:35:00
Message: <web.44046cb3d1350a4f9bdecb60@news.povray.org>
Hello altogether!

I was wondering if it could be possible in any future version to use
functions and patterns in the finish block. If so there would be much more
flexibility in creating stunning material appearances. Other than that
already supported image- and bump maps one could then in particular make
use of ambient-, specular- and diffuse maps that come along with many
texture packs and add a lot to the quality of the appearance of an surface.

There is already the possibility to work around that by layering two
textures with appropriate (e.g.) reflection values on top of each other
where the upper one uses the appropriate map as an alpha channel. But this
gets ugly when several maps are being used and slows down the render and
parsing time.

What do you think?

Regards Roman


Post a reply to this message

From: John VanSickle
Subject: Re: Wouldn't it be nice: patterns and finish items
Date: 28 Feb 2006 17:26:13
Message: <4404ce05$1@news.povray.org>
Roman Reiner wrote:

> Hello altogether!
> 
> I was wondering if it could be possible in any future version to use
> functions and patterns in the finish block. If so there would be much more
> flexibility in creating stunning material appearances. Other than that
> already supported image- and bump maps one could then in particular make
> use of ambient-, specular- and diffuse maps that come along with many
> texture packs and add a lot to the quality of the appearance of an surface.
> 
> There is already the possibility to work around that by layering two
> textures with appropriate (e.g.) reflection values on top of each other
> where the upper one uses the appropriate map as an alpha channel. But this
> gets ugly when several maps are being used and slows down the render and
> parsing time.
> 
> What do you think?

While normals and pigments can be represented with a short vector 
(pigments have 5 values, normals have three), finish statements involve 
a larger number of data (ambient, diffuse, phong (and its associated 
specs), specular (with roughness), brightness, metallic, etc).  That 
shouldn't be a show-stopper from a programming viewpoint.

Maybe this is planned for V4,maybe not.

Of course, if you download the latest sources and code up a working 
version, I'm sure the development team will at least read it.

Regards,
John


Post a reply to this message

From: Roman Reiner
Subject: Re: Wouldn't it be nice: patterns and finish items
Date: 28 Feb 2006 18:20:01
Message: <web.4404d936783b11fa9bdecb60@news.povray.org>
John VanSickle <evi### [at] hotmailcom> wrote:
> While normals and pigments can be represented with a short vector
> (pigments have 5 values, normals have three), finish statements involve
> a larger number of data (ambient, diffuse, phong (and its associated
> specs), specular (with roughness), brightness, metallic, etc).  That
> shouldn't be a show-stopper from a programming viewpoint.
>
> Maybe this is planned for V4,maybe not.
>
> Of course, if you download the latest sources and code up a working
> version, I'm sure the development team will at least read it.
>
> Regards,
> John

Sure. I thought of a pattern definition for those finish items not for the
whole finish block. apart from reflection and irid all those items are
defined by only one single float or vector. i thought for example of
something like

finish {
  ...
  reflection {
    wrinkles
    reflection_map {
      ...
    }
  }
}

instead of just a float value.
i'm not very well versed in povray programming but i guess this should not
be very difficult or even impossible. do you think it would be worth the
effort?

Regards Roman


Post a reply to this message

From: Ross
Subject: Re: Wouldn't it be nice: patterns and finish items
Date: 28 Feb 2006 21:18:48
Message: <pan.2006.03.01.02.18.37.617936@speakeasy.net>
On Tue, 28 Feb 2006 10:31:11 -0500, Roman Reiner wrote:

> Hello altogether!
> 
> I was wondering if it could be possible in any future version to use
> functions and patterns in the finish block. If so there would be much more
> flexibility in creating stunning material appearances. Other than that
> already supported image- and bump maps one could then in particular make
> use of ambient-, specular- and diffuse maps that come along with many
> texture packs and add a lot to the quality of the appearance of an surface.
> 
> There is already the possibility to work around that by layering two
> textures with appropriate (e.g.) reflection values on top of each other
> where the upper one uses the appropriate map as an alpha channel. But this
> gets ugly when several maps are being used and slows down the render and
> parsing time.
> 
> What do you think?
> 
> Regards Roman


Not sure if this could be extended to your purpose, but maybe. It's based
on something Giles Tran posted to a message from Mael about Finish Maps.
I'll post the resulting image in povray.binary.images just for reference.
I'm also going to play with this more to see if it's actually useful in a
general sense.

-ross

// just some pigment to be used in a function
#declare p0 = pigment {
  granite
  scale 5
  color_map {
    [0.0 rgb 1]
    [0.45 rgb 1]
    [0.5 rgb .1]
    [0.8 rgb 0]
    [1.0 rgb 0]
  }
  #declare w1 = 5;
  #declare t1 = <0.3, 0.3, 1*clock>;
  #while (w1 > 0)
    warp {repeat x flip y}
    warp {turbulence t1}
    scale 0.99
    #declare w1 = w1 - 1;
  #end
}

#declare f0 = function {pigment {p0}};

sphere {
  0.0, 1
  texture {
    function {f0(x,y,z).x}
    texture_map {
      [0 pigment {rgb 1} finish {ambient 0 diffuse 0.4 specular 0 roughness 0.00
reflection 0}]
      [1 pigment {rgb 1} finish {ambient 0 diffuse 0.4 specular 1 roughness 0.03
reflection 1}]
    }
    scale 0.2
  }
}


Post a reply to this message

From: Roman Reiner
Subject: Re: Wouldn't it be nice: patterns and finish items
Date: 1 Mar 2006 06:25:00
Message: <web.44058323783b11faf37ab23e0@news.povray.org>
Ross <rli### [at] speakeasynet> wrote:
> Not sure if this could be extended to your purpose, but maybe. It's based
> on something Giles Tran posted to a message from Mael about Finish Maps.
> I'll post the resulting image in povray.binary.images just for reference.
> I'm also going to play with this more to see if it's actually useful in a
> general sense.
>
> -ross
>
> ...
>

Thanks for your reply. In deed this could be extended for my purposes but
as i mentionen above this gets very ugly when you have more than two
different finish items you'd like to change. I'll post an extended version
with source in the thread with your image. As you may see there you need 15
definitions to create a texture with three finish items following different
patterns (specular map, reflection map and ambient map in that case). With
four items you should need 31 definitions, with five items you'll need 63
and so on. obviously this renders quite slow especially when pigment
functions from image maps are being used as patterns.

Regards Roman


Post a reply to this message

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