POV-Ray : Newsgroups : povray.general : putting textures on a difference object Server Time
7 Aug 2024 05:20:00 EDT (-0400)
  putting textures on a difference object (Message 1 to 5 of 5)  
From: the humeister
Subject: putting textures on a difference object
Date: 25 Nov 2001 19:10:31
Message: <3c018877$1@news.povray.org>
so I'm trying to put a texture on a csg (difference) object. The problem is that that
the texture doesn't come out correctly.

Here's what I'm talking about:

#declare White_Brick=texture{

    pigment{
      brick pigment{Gray90}, pigment{White}
      brick_size <3, 1, 2>
      mortar .5
      scale 1
    }

}
light_source{
  <0,500,-500>, White
}

      difference{
        box{
          <-15, 0, -15>, <15, 43, 15>
        }
        box{
          <-100, -100, 00>, <100, 100, -100>
          translate z*-15
          rotate x*10
        }
        box{
          <0, -100, 100>, <100, 100, -100>
          translate x*15
          rotate z*10
        }
        translate <47, 0, -47>
        rotate y*counter*90
      }


What you should see is that on the side where the difference isn't applied, the brick
pattern works
However, on the side where the difference was applied, there're gray bars where bricks
should be.
Any idea how to solve this?

-John


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: putting textures on a difference object
Date: 26 Nov 2001 04:38:59
Message: <3C020DCA.1010705@ignorancia.org>
the### [at] yahoocom wrote:

> What you should see is that on the side where the difference isn't applied, the
brick pattern works
> However, on the side where the difference was applied, there're gray bars where
bricks should be.
> Any idea how to solve this?

I have not rendered your code, but seems to me this is the mortar of the 
bricks, wich casually coincides with the cut. Try to move the texture 
slighty... hope this helps.

--
Jaime Vives Piqueres

La Persistencia de la Ignorancia
http://www.ignorancia.org/


Post a reply to this message

From: the humeister
Subject: Re: putting textures on a difference object
Date: 2 Dec 2001 17:50:08
Message: <3c0ab020$1@news.povray.org>
Is there anyway to apply the texture to each side individually?
ie apply it normally on the sides w/o the difference, and rotate the texture
on the side where the texture is applied?

Thanks!


Post a reply to this message

From: bob h
Subject: Re: putting textures on a difference object
Date: 2 Dec 2001 23:39:17
Message: <3c0b01f5@news.povray.org>
<the### [at] yahoocom> wrote in message
news:3c0ab020$1@news.povray.org...
> Is there anyway to apply the texture to each side individually?
> ie apply it normally on the sides w/o the difference, and rotate the
texture
> on the side where the texture is applied?

I rendered it and couldn't see anything wrong, all sides are the same brick
pattern.  Albeit it will look a little different depending on where the
camera is and the size of the image.
If you try my changed script and use the AA settings too you will see:

// +a0.1 +r5  // try this and also +a +r3 the default AA

#declare White_Brick=texture{

    pigment{
      brick pigment{rgb .9}, pigment{rgb 1}
      brick_size <3, 1, 2>
      mortar .5
      scale 1
    }

}

#declare C=4;
#while (C>0)
      difference{
        box{
          <-15, 0, -15>, <15, 43, 15>
        }
        box{
          <-100, -100, 0>, <100, 100, -100>
          translate z*-15
          rotate x*10
        }
        box{
          <0, -100, 100>, <100, 100, -100>
          translate x*15
          rotate z*10
        }
 texture {White_Brick}
        translate <47, 0, -47>
        rotate y*C*90
      }
#declare C=C-1;
#end

light_source{
  <0,50,150>, 1
}

camera {location <0,25,100> look_at 0}


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: putting textures on a difference object
Date: 3 Dec 2001 03:56:11
Message: <3C0B3E45.5050801@ignorancia.org>
the### [at] yahoocom wrote:

> Is there anyway to apply the texture to each side individually?

  I usually do this by having different objects for each side. It's a 
bit more of work to decompose your whole difference into pieces, but it 
is worth the effort.

--
Jaime Vives Piqueres

La Persistencia de la Ignorancia
http://www.ignorancia.org/


Post a reply to this message

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