POV-Ray : Newsgroups : povray.binaries.programming : Difference : Re: Difference Server Time
25 Apr 2024 17:41:56 EDT (-0400)
  Re: Difference  
From: Roman Reiner
Date: 7 Dec 2005 13:10:01
Message: <web.439724ee3616f208af771770@news.povray.org>
This is much more complicated and i do not have a quick solution for that
and consulting my conception of how csg is being calculated i doubt there
is one. when you (for example) intersect to objects povray traces both
objects and when both are hit it uses the intersection point that is farer
away.
the ray just intersects with surfaces. there's no the interior (except you
use media but i doubt this would be a good solution it that case ;-)).
therefore the ray gets the color of the object whose surface has been hit.
in your example the red knife.
surely one can can trick around that when the object isn't too complicated.
maybe an other user already had experiences with that. i hadn't

Regards Roman

Alvaro Blanco <abl### [at] icmmcsices> wrote:
> Hello Roman, Thanks for your quick response.
> Maybe I was also too quick when I wrote the question.
> The problem is the folowing:
>
> Imagine that I have 2 boxes: 1 is red and the other is blue and they are
> one ontop of the other. If I cut this with a Black box I obtain a black
> edge. But i want the edge red and blue. It is not a problem of total
> pigments or final pigments (or textures), the problem is that i want to
> see the "real" cut of the first object. Maybe this is just fundamental
> problem in Pov-ray because all objects are empty and you only see
> surfaces. I was just wondering if anybody have had this problem and have
>   solved it. Imagine that you have a Ham and Cheese Sandwich and u cut
> it with a red knife. I don't want to see a red cut but the edge of the
> bread, the ham and the cheese.
>
> Alvaro
>
> Roman Reiner wrote:
>
> > First of all this is the wrong newsgroup. such questions should be posted in
> > newusers http://news.povray.org/povray.newusers/
> >
> > To answer your question. When i understand you right you want the resulting
> > object to have one overall texture. in this case it is the easiest way not
> > to use pigments (or textures) in the single object declarations but apply
> > it once to the resulting cutobject. for example
> >
> > difference {
> >   object { this }
> >   difference {
> >     object { that }
> >     merge {
> >       object { whatever }
> >       ...
> >     }
> >   }
> >   ...
> >   texture { myTexture }
> > }
> >
> > Hope that helped
> > Regards Roman
> >
> > Alvaro Blanco <abl### [at] icmmcsices> wrote:
> >
> >>Hello all,
> >>This is my first post and maybe I ask a silly (beginner) question: When
> >>you use difference you get the color of the object you substract. When
> >>you substract something easy, let's say, a box A minus a box B, then it
> >>is easy to get the right color in your cut surface. You just use the
> >>same color for B. But, when A is something composed of many different
> >>objects with many different colors... Is there any way or "trick" to get
> >>this colors in the cut edge instead of the same color of B?
> >>Thanks
> >
> >
> >
> >


Post a reply to this message

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