|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Warp" <war### [at] tag povray org> 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
|
![](/i/fill.gif) |