POV-Ray : Newsgroups : povray.newusers : Textured faces Server Time
24 Nov 2024 12:55:59 EST (-0500)
  Textured faces (Message 1 to 7 of 7)  
From: Hegh
Subject: Textured faces
Date: 15 Apr 2008 17:30:01
Message: <web.48051d0cb0e93c71d323b92e0@news.povray.org>
I applied a brushed aluminum texture created with the help of
http://tag.povray.org/povQandT/languageQandT.html#blurredreflection to a box.
It looks quite nice on the front face, but if I look at any other face of the
box, the texture is all wonky. Are there any tricks for using a texture that
depends on a stretched axis on multiple faces?

Also, sometimes I find that the renderer completely hangs if I turn up the blur
samples (originally it was at 40), I think it has to do with some CSG that I
was playing with (try removing a chunk of the box from the bottom face).

Here is the entire file:

#include "colors.inc"
#include "metals.inc"

camera {
 location <0, 3, -10>
 look_at 0
}

light_source {
 <6, 9, -8>, White
}

#declare BlurAmount = .2;
#declare BlurSamples = 1;

#declare T_BrushedAluminum = texture {
 average texture_map {
  #declare Ind = 0;
  #declare S = seed(0);
  #while (Ind < BlurSamples)
   [0.0 T_Silver_3D
    normal {
     bumps BlurAmount
     translate <rand(S), rand(S), rand(S)> * 100
     scale <2.5, 0.1, 0.1>
    }
   ]
   [0.05 T_Silver_3D
     normal {
     bumps BlurAmount
     translate <rand(S), rand(S), rand(S)> * 100
     scale <2.5, 0.1, 0.1>
    }
   ]
   [0.05 T_Chrome_1C
    normal {
     bumps BlurAmount
     translate <rand(S), rand(S), rand(S)> * 100
     scale <2.5, 0.1, 0.1>
      }
   ]
   [1.0 T_Chrome_1C
    normal {
     bumps BlurAmount
     translate <rand(S), rand(S), rand(S)> * 100
     scale <2.5, 0.1, 0.1>
      }
   ]

   #declare Ind = Ind + 1;
  #end
 }
}

// Set up an empty room, just so we have something to reflect
// Floor
plane {
 y, -5
 pigment { checker White Black }
 finish { reflection .1 }
 hollow
}

// Walls
plane {
 z, 10
 pigment { White }
 hollow
}

plane {
 x, -10
 pigment { White }
 hollow
}

plane {
 x, 10
 pigment { White }
 hollow
}

box {
 0, <4, 2, 1>

 texture {
  T_BrushedAluminum
 }

 translate <-2, 2, 0>
 rotate <30, 10, 0>
}


Post a reply to this message

From: Warp
Subject: Re: Textured faces
Date: 15 Apr 2008 17:36:13
Message: <48051fcd@news.povray.org>
Hegh <cel### [at] gmailcom> wrote:
> Are there any tricks for using a texture that
> depends on a stretched axis on multiple faces?

  For a cube in particular you can use the new cubic warp in POV-Ray 3.7
to wrap a texture to the sides of a cube.

-- 
                                                          - Warp


Post a reply to this message

From: Tom York
Subject: Re: Textured faces
Date: 15 Apr 2008 18:15:01
Message: <web.480527f99d96b7d37d55e4a40@news.povray.org>
"Hegh" <cel### [at] gmailcom> wrote:
> Also, sometimes I find that the renderer completely hangs if I turn up the blur
> samples (originally it was at 40), I think it has to do with some CSG that I
> was playing with (try removing a chunk of the box from the bottom face).

It may be multiple self-reflection caused by the strongly perturbed normals
(can't remember who first pointed this effect out on the groups,
unfortunately).

Try adding the no_reflection keyword to your box (if your environment is not
intended to be reflective). The box will still reflect the environment but rays
that would otherwise be reflected into another part of the box surface by the
funky normals will not spawn further reflection tracing.

This may speed things up depending on how many rays in your scene suffered this
ghastly fate.

Tom


Post a reply to this message

From: Warp
Subject: Re: Textured faces
Date: 15 Apr 2008 19:17:20
Message: <48053780@news.povray.org>
Tom York <alp### [at] zubenelgenubi34spcom> wrote:
> It may be multiple self-reflection caused by the strongly perturbed normals

  A planar surface cannot reflect itself no matter how much you perturb
the normals.

  In theory a sufficiently perturbed normal may cause a reflected ray to
actually go inside the object, but I recall this problem having been fixed
some time in the past.

-- 
                                                          - Warp


Post a reply to this message

From: Hegh
Subject: Re: Textured faces
Date: 16 Apr 2008 08:45:00
Message: <web.4805f4b29d96b7d3d323b92e0@news.povray.org>
Haven't tried anything to fix the hanging renderer, but I did fix the wonky
texture. Apparently the checkered floor was reflecting off of the box face. I
added no_reflect to the floor, all fixed. Until I put something else in front
of it, anyway...


Post a reply to this message

From: Alain
Subject: Re: Textured faces
Date: 16 Apr 2008 11:37:13
Message: <48061d29$1@news.povray.org>
en ce 2008/04/15 17:26 :)   ->
> I applied a brushed aluminum texture created with the help of
> http://tag.povray.org/povQandT/languageQandT.html#blurredreflection to a box.
> It looks quite nice on the front face, but if I look at any other face of the
> box, the texture is all wonky. Are there any tricks for using a texture that
> depends on a stretched axis on multiple faces?
> 
> Also, sometimes I find that the renderer completely hangs if I turn up the blur
> samples (originally it was at 40), I think it has to do with some CSG that I
> was playing with (try removing a chunk of the box from the bottom face).
> 
have you tried using uv maping? It will wrap the texture around the box.

-- 
Alain
-------------------------------------------------
Laughter is the shortest distance between two people.


Post a reply to this message

From: Alain
Subject: Re: Textured faces
Date: 16 Apr 2008 11:53:21
Message: <480620f1$1@news.povray.org>
en ce 2008/04/16 08:44 :)   ->
> Haven't tried anything to fix the hanging renderer, but I did fix the wonky
> texture. Apparently the checkered floor was reflecting off of the box face. I
> added no_reflect to the floor, all fixed. Until I put something else in front
> of it, anyway...
> 
> 
Use 2 checkered planes with one very slightly moved up.
The top plane will have no_image and no_shadow and have a reflection less 
texture. Also give it an interior_texture with pibment{rgbt 1}.
The bottom plane is your actual plane with it's reflection.

The bottom plane will still be illuminated and "see" the rest of the scene 
because the underside of the top plane make it invisible.
The rays reflected by the box are intercepted by the top plane and won't be 
further reflected.

It can look like:
union{
plane{y,0 pigment{checker rgb 1, rgb0}interior_texture{pigment{rgbt 1}}no_image 
no_shadow }
plane{y,0 texture{checker texture{pigment{rgb 1}finish{reflection 
1}}texture{pigment{rgb 0.01}finish{reflection 0.2}}translate -0.0001*y}
}



-- 
Alain
-------------------------------------------------
Adult, n.: One old enough to know better.


Post a reply to this message

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