POV-Ray : Newsgroups : povray.binaries.images : diffuse map + specular map Server Time
19 Apr 2024 07:01:19 EDT (-0400)
  diffuse map + specular map (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: JSR
Subject: diffuse map + specular map
Date: 11 Jan 2007 07:10:01
Message: <web.45a628dc42e6ddabd8ef73430@news.povray.org>
Hi,
I tried to create a floor with diffuse map + specular map with the source
code:

#declare mat_PARQUET_pigment =
  pigment { image_map { jpeg "diffuse_map.jpg" } }

#declare mat_PARQUET =
  texture {
    uv_mapping pigment_pattern { image_map { jpeg "specular_map.jpg" } }
    texture_map {
      [0.0 pigment { mat_PARQUET_pigment }
           finish { ambient 0.0 diffuse 0.8 specular 0 } ]
      [1.0 pigment { mat_PARQUET_pigment }
           finish { ambient 0.0 diffuse 0.8 specular 2 } ]
    }
  }

IMO, the result it could be improved, but how? :)
Thanks,

JSR


Post a reply to this message


Attachments:
Download 'diffuse+specular.jpg' (301 KB)

Preview of image 'diffuse+specular.jpg'
diffuse+specular.jpg


 

From: Thomas de Groot
Subject: Re: diffuse map + specular map
Date: 11 Jan 2007 07:21:41
Message: <45a62bd5$1@news.povray.org>
This is not bad at all!
You could try also to add a bump map to give it more depth.

Thomas


Post a reply to this message

From: Jeremy M  Praay
Subject: Re: diffuse map + specular map
Date: 11 Jan 2007 09:00:13
Message: <45a642ed$1@news.povray.org>
"Thomas de Groot" <t.d### [at] internlDOTnet> wrote in message 
news:45a62bd5$1@news.povray.org...
> This is not bad at all!

Indeed!  I've been wondering about a way to do this for quite some time.  I 
see that Jaime nd JSR have been discussing this in p.international.  My love 
of rendered wooden surfaces is coming back again...

> You could try also to add a bump map to give it more depth.

agreed.


Post a reply to this message

From: Sabrina Kilian
Subject: Re: diffuse map + specular map
Date: 11 Jan 2007 09:07:17
Message: <45a64495$1@news.povray.org>
Thomas de Groot wrote:
> This is not bad at all!
> You could try also to add a bump map to give it more depth.
> 
> Thomas 
> 
> 

I agree, just a little bump along the edges and ends of the boards would
be enough. To make it age, you could raise alternate sides of some
boards, to make it appear uneven.

I don't know that it needs much, though. It looks like fresh set and
waxed hardwood. Depending on it's destination, maybe just molding around
the wall edges to finish the room?


Post a reply to this message

From: Trevor G Quayle
Subject: Re: diffuse map + specular map
Date: 11 Jan 2007 11:40:00
Message: <web.45a667b0f617fe16c150d4c10@news.povray.org>
Looking good.  I have used arroways maps before myself.  You need to add the
bump map in though.   You can either do this via a normal map, or make a
heightfield.  When I used them, I prefered the heightfiled option as
normals beyond a certain scale start to look 'paited on' to me.  Here is
the basic code I used:

//START
#declare BM="pavement 04-b.jpg";//bump map
#declare DM="pavement 04-d.jpg";//diffuse map
#declare SM="pavement 04-s.jpg";//specular/reflective map
#declare Scl=<1200,10,1200>;    //tile size (the arroway site has this for
the samples)
#declare Spec=0.1;              //specular/reflective strength (again you
can use arroway's info)

#macro Tex1(IMap,Ref)//texture mapping as a macro to simply use
  pigment {image_map { jpeg IMap map_type 0 interpolate 2 once } rotate
x*90}
  finish  {
    ambient 0 diffuse 0.4//
    conserve_energy
    reflection{0 Ref fresnel on metallic 0}
  }
#end

#declare Dif=0.4;//diffuse value, you need to vary to see what looks best

#declare Tile=
height_field{jpeg BM
  material{
    texture{
      image_pattern { jpeg SM map_type 0 interpolate 2 once }
      texture_map{
        [0 Tex1(DM,0)]
        [1 Tex1(DM,Spec)]
      }
    }
    interior{ior 1.56}//using fresnel reflection, vary ior accordingly
  }
}

#declare Siz=6;//creating a 6x6 tiling of the tile
union{
  #declare i=1;#while (i<Siz)
    #declare j=1;#while (j<Siz)
      object{Tile translate <-i,0,-j>}
    #declare j=j+1;#end
  #declare i=i+1;#end
  scale Scl
}



-tgq


Post a reply to this message

From: Alain
Subject: Re: diffuse map + specular map
Date: 11 Jan 2007 19:10:31
Message: <45a6d1f7@news.povray.org>
JSR nous apporta ses lumieres en ce 11-01-2007 07:09:
> Hi,
> I tried to create a floor with diffuse map + specular map with the source
> code:
>
Try randomysing the ends of the planks in your maps. In real life, you try to 
avoid any lining up like those you have. Also, when you buy wood for your 
hardwood floor, the individual planks do show some large variation in lenght. 
They can range from about a feet to some 12 feet in lenght!

-- 
Alain
-------------------------------------------------
Sometimes my love of the arcane combines with my askew humor to make me 
unintelligible!!


Post a reply to this message

From: Tom York
Subject: Re: diffuse map + specular map
Date: 12 Jan 2007 03:50:00
Message: <web.45a74b27f617fe167d55e4a40@news.povray.org>
"JSR" <jsr### [at] gmailcom> wrote:
> I tried to create a floor with diffuse map + specular map with the source
> code:

To me, the specular map looks like it doesn't contain any particularly dark
areas,  so not all of the range of specular you've set will be used - the
edges of the boards will still be quite bright in specular. You might try
adjusting the contrast of the specular map in the paint package of your
choice. If you don't like the contrast in the result you can then adjust
the positions of the texture map entries in your code, without being
limited so much by the contrast of the specular map itself.

Tom


Post a reply to this message

From: Jellby
Subject: Re: diffuse map + specular map
Date: 13 Jan 2007 05:58:35
Message: <70lm74-f4q.ln1@badulaque.unex.es>
Among other things, Tom York saw fit to write:

> To me, the specular map looks like it doesn't contain any particularly
> dark
> areas,  so not all of the range of specular you've set will be used - the
> edges of the boards will still be quite bright in specular.

I agree. You should probably make the edges particularly dark in the
specular map, and maybe even a specific entry in the texture map for them.

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

From: JSR
Subject: Re: diffuse map + specular map
Date: 15 Jan 2007 09:50:01
Message: <web.45ab9351f617fe16d8ef73430@news.povray.org>
Thanks to everybody, but I can obtain the result I look for.
I post a challenge in povray.international.binaries

This is the code of my last attempt:

#declare mat_TEX_PARQUET11_pigment =
  pigment { image_map { jpeg "diffuse.jpg" } }

#declare mat_TEX_PARQUET11_normal =
  normal { uv_mapping bump_map { jpeg "bump.jpg" bump_size 2 } }

#declare mat_0_89_0_0_0_TEX_PARQUET11 =
  texture {
    uv_mapping pigment_pattern { image_map { jpeg "specular.jpg" } }

    texture_map {
      [0.0 pigment { mat_TEX_PARQUET11_pigment }
        normal { mat_TEX_PARQUET11_normal }
        finish { diffuse 0.9 specular 0.0 reflection {0.0 fresnel on } }
      ]
      [1.0 pigment { mat_TEX_PARQUET11_pigment }
        normal { mat_TEX_PARQUET11_normal }
        finish { diffuse 0.9 specular 1.0 reflection {0.1 fresnel on } }
      ]
   }
}


Thanks,

Joel.


Post a reply to this message


Attachments:
Download 'render.jpg' (274 KB)

Preview of image 'render.jpg'
render.jpg


 

From: Trevor G Quayle
Subject: Re: diffuse map + specular map
Date: 15 Jan 2007 11:15:01
Message: <web.45aba81ff617fe16c150d4c10@news.povray.org>
"JSR" <jsr### [at] gmailcom> wrote:
> Thanks to everybody, but I can obtain the result I look for.
> I post a challenge in povray.international.binaries

Also note that the Arroway samples are of a lot lower resolution than the
actual pay ones (600x600 vs 6000x6000, i.e., 1/10th the resolution) so you
aren't going to get as nice detail close-up as their previews.

-tgq


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

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