POV-Ray : Newsgroups : povray.newusers : Texture disappears after intersection. Server Time
2 Nov 2024 03:16:16 EDT (-0400)
  Texture disappears after intersection. (Message 1 to 2 of 2)  
From: D  H  Berlin
Subject: Texture disappears after intersection.
Date: 18 Aug 2004 08:05:00
Message: <web.412344e42bbecca6a264c58c0@news.povray.org>
Hi!
Is it the right behavior, that after an intersection the resulting object
has on cutted areas no texture anymore? While areas remaining uncutted stay
textured with the original texture.
Though even stranger for my feeling is that adding a texture at the end of
the intersection statement (See the outcommented line) does not texture the
_whole_ resulting object, but only the cutted areas.  (Though the result is
optimal for me in this case:)

What's the concept behind this behaviour? (Cutted areas are untextured and
don't stay with the original texture. Uncutted areas aren't affected by a
texture-statement at the end of the intersection-statement.)

Greetings
Dieter


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

#macro pen (maintex,peaktex)
  #local pr = 0.0025;
  #local pml = 0.15;
  #local peakl = 0.009;
  #local number_of_sides = 6;
  #local plane_x = cos( 2*pi/number_of_sides / 2 ) * pr;
  #local i=0;
  intersection{
    union{ cylinder {0 <0,pml,0> pr texture {maintex}}
           cone{ <0,peakl/10,0> pr*11/10 <0,-peakl,0> 0 texture {peaktex
scale peakl/2} }
    }
    #while (i<number_of_sides)
        plane { x, plane_x
          rotate y*i*360/number_of_sides
        }
        #local i=i+1;
    #end
// texture(T_Wood11)  // Even Stranger for my feeling :)
  }
#end
object { pen(T_Wood12,T_Wood10)  scale 10
//  texture { T_Wood12 }
  rotate z*-90
  translate y*0.0
}


Post a reply to this message

From: Warp
Subject: Re: Texture disappears after intersection.
Date: 18 Aug 2004 10:52:04
Message: <41236d13@news.povray.org>
D. H. Berlin <wee### [at] povstefaniede> wrote:
> Is it the right behavior, that after an intersection the resulting object
> has on cutted areas no texture anymore? While areas remaining uncutted stay
> textured with the original texture.

  The cutting object has no texture and thus POV-Ray does not use any
texture for it.

> Though even stranger for my feeling is that adding a texture at the end of
> the intersection statement (See the outcommented line) does not texture the
> _whole_ resulting object, but only the cutted areas.

  If the first object in the intersection already has a texture, it has
higher priority than a texture global to the whole intersection.

  Btw, you will find searching 'cutaway_textures' in the documentation
interesting reading.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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