POV-Ray : Newsgroups : povray.binaries.programming : Difference Server Time: 9 Dec 2018 22:25:14 GMT
  Difference (Message 1 to 8 of 8)  
From: Alvaro Blanco
Subject: Difference
Date: 7 Dec 2005 17:03:19
Message: <439715d7$1@news.povray.org>
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

From: Roman Reiner
Subject: Re: Difference
Date: 7 Dec 2005 17:20:00
Message: <web.439718b03616f208af771770@news.povray.org>
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

From: Alvaro Blanco
Subject: Re: Difference
Date: 7 Dec 2005 17:39:21
Message: <43971e49$1@news.povray.org>
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

From: Roman Reiner
Subject: Re: Difference
Date: 7 Dec 2005 18: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

From: JYR
Subject: Re: Difference
Date: 7 Dec 2005 18:20:00
Message: <web.439726d33616f20e8d525f60@news.povray.org>
3.5.10
cutaway_textures

Your sandwich should now be properly cut :)

JYR


Post a reply to this message

From: Roman Reiner
Subject: Re: Difference
Date: 8 Dec 2005 00:50:00
Message: <web.4397823b3616f208af771770@news.povray.org>
"JYR" <jyr### [at] hotmailcom> wrote:
> 3.5.10
> cutaway_textures
>
> Your sandwich should now be properly cut :)
>
> JYR

hehe. didn't know that. still learning ;-)


Post a reply to this message

From: Alvaro Blanco
Subject: Re: Difference
Date: 9 Dec 2005 10:56:21
Message: <439962d5$1@news.povray.org>
Thanks!! I will eat it today!

3.5.10 hidden in the middle of the tutorial. It should be placed in 
difference section or, at least, there should be a hyperlink to 3.5.10 
from there.

:-) Alvaro

JYR wrote:
> 3.5.10
> cutaway_textures
> 
> Your sandwich should now be properly cut :)
> 
> JYR
>


Post a reply to this message

From: NEWS
Subject: Re: Difference
Date: 31 Jan 2006 19:16:24
Message: <43dfb788$1@news.povray.org>
you got
union {

    box texture {red}
    box texture {blue}
}
and you want to subtract
box texture {black}
without black coor

then do this

intersection {
            union {
                    box red
                    box blue
                }

            box {<...>,<...> texture {black} inverse}
}


insteed of getting the difference ,   une the intersection of your object
with all_the_outside of you second object by using the inverse keyword into
your black box





"Alvaro Blanco" <abl### [at] icmmcsices> a écrit dans le message de
news:43971e49$1@news.povray.org...
> 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-2008 Persistence of Vision Raytracer Pty. Ltd.