POV-Ray : Newsgroups : povray.unofficial.patches : cutaway-texturing works oddly Server Time
2 Sep 2024 00:13:21 EDT (-0400)
  cutaway-texturing works oddly (Message 1 to 2 of 2)  
From: Warp
Subject: cutaway-texturing works oddly
Date: 15 Sep 2000 07:03:00
Message: <39c201e4@news.povray.org>
If you make this:

difference
{ union
  { object { Obj1 }
    object { Obj2 }
  }
  plane { z,0 }
  cutaway_textures
}

the part that belongs only to Obj1 will have the texture of Obj1 and the
part that belongs only to Obj2 will have the textyre of Obj2. The part
that belongs to both Obj1 and Obj2 will have the average of both textures.

  This is ok. However, if you make this:

difference
{ difference
  { object { Obj1 }
    object { Obj2 }
  }
  plane { z,0 }
  cutaway_textures
}

the behaviour changes. One would expect that still the part that belongs only
to Obj1 will have the texture of Obj1.
  However, it has the average of both textures.

  I suppose that this is due to how povray handles internally those objects
(difference is the intersection of the objects with the second one
inverted?).

  However, this causes an inconsistent behaviour with what one expects.
One expects (or at least I expect) that this:

union
{ object { Obj1 }
  object { Obj2 }
}

is equivalent to:

union
{ difference
  { object { Obj1 }
    object { Obj2 }
  }
  difference
  { object { Obj2 }
    object { Obj1 }
  }
  intersection
  { object { Obj1 }
    object { Obj2 }
  }
}

  Geometrically they are equivalent. One would expect that the texturing
would be equivalent as well.

  Question:
  Should cutaway_textures bypass the internal representation of the CSG and
calculate the texture using it's own algorithm which would be consistent
with what one expects?
  How difficult would it be?

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Nathan Kopp
Subject: Re: cutaway-texturing works oddly
Date: 16 Sep 2000 08:56:26
Message: <39c36dfa$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote...
>   I suppose that this is due to how povray handles internally those
objects
> (difference is the intersection of the objects with the second one
> inverted?).

True.

>   Should cutaway_textures bypass the internal representation of the CSG
and
> calculate the texture using it's own algorithm which would be consistent
> with what one expects?

I would say "yes".

>   How difficult would it be?

I'm not sure, but the problem would be differentiating between a
user-created intersection and a pov-created intersection (difference), and
defining good rules that would make sense to users.  Right now it just does
an insidedness test.  Anyone have any ideas?

-Nathan


Post a reply to this message

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