POV-Ray : Newsgroups : povray.general : patch object? Server Time
8 Aug 2024 14:24:38 EDT (-0400)
  patch object? (Message 1 to 5 of 5)  
From: Matt Giwer
Subject: patch object?
Date: 22 Dec 2000 19:10:36
Message: <3A43ED7C.C0C24218@ij.net>
I successfully did a 

#declare thing = difference 
{
	union { object list 1 } 
	superellipsoid 
}

	but

#declare another_thing = difference 
{
	union { object list 1 } 
	union { object list 2 }
	superellipsoid 
}

	informs me that a patch object is not permitted and does not render
another_thing. 

	A little trial and error should solve the general problem. Am I correct
in guessing a patch object is an old name for a CSG object? 

-- 
Life's too short and death's too long
to take this all that seriously. 
	-- The Iron Webmaster, 372


Post a reply to this message

From: Chris Colefax
Subject: Re: patch object?
Date: 22 Dec 2000 19:30:31
Message: <3a43f227@news.povray.org>
Matt Giwer <jul### [at] ijnet> wrote
> I successfully did a
>
> #declare thing = difference
> {
> union { object list 1 }
> superellipsoid
> }
>
> but
>
> #declare another_thing = difference
> {
> union { object list 1 }
> union { object list 2 }
> superellipsoid
> }
>
> informs me that a patch object is not permitted and does not render
> another_thing.
>
> A little trial and error should solve the general problem. Am I correct
> in guessing a patch object is an old name for a CSG object?

There should be no problem using superellipsoids in CSG, as they are a
well-defined solid object (unlike triangles, polygons, bicubic patches,
discs, etc).  I have no problem rendering the difference of a union minus
another union and a superellipsoid.  Is it possible there is such a patch
object in your object list 2?  Perhaps some more detailed code might help
track the problem down...


Post a reply to this message

From: Matt Giwer
Subject: Re: patch object?
Date: 22 Dec 2000 19:35:20
Message: <3A43F348.237D156F@ij.net>
Chris Colefax wrote:
> 
> Matt Giwer <jul### [at] ijnet> wrote
> > I successfully did a
> >
> > #declare thing = difference
> > {
> > union { object list 1 }
> > superellipsoid
> > }
> >
> > but
> >
> > #declare another_thing = difference
> > {
> > union { object list 1 }
> > union { object list 2 }
> > superellipsoid
> > }
> >
> > informs me that a patch object is not permitted and does not render
> > another_thing.
> >
> > A little trial and error should solve the general problem. Am I correct
> > in guessing a patch object is an old name for a CSG object?
> 
> There should be no problem using superellipsoids in CSG, as they are a
> well-defined solid object (unlike triangles, polygons, bicubic patches,
> discs, etc).  I have no problem rendering the difference of a union minus
> another union and a superellipsoid.  Is it possible there is such a patch
> object in your object list 2?  Perhaps some more detailed code might help
> track the problem down...

	Literally a patch? No, attached is what it objects to being added. 

-- 
Gore will spend the next for years training Democrats
how to punch holes in pieces of paper. 
	-- The Iron Webmaster, 389


Post a reply to this message


Attachments:
Download 'us-ascii' (2 KB)

From: Chris Colefax
Subject: Re: patch object?
Date: 22 Dec 2000 20:25:58
Message: <3a43ff26@news.povray.org>
Matt Giwer <jul### [at] ijnet> wrote:
>
> Literally a patch? No, attached is what it objects to being added.

Well, not quite literally a patch.  What you do have is light sources inside
the union, which is valid.  But how can POV-Ray determine the result of
differencing a light source from an object (OK - I guess one possibility
would be to use the negative of the light's colour...).  In this case,
however, POV-Ray light sources are defined with patch objects as those
elements which may not be used negatively in CSG, hence the error you are
getting.

The solution is to remove the light sources from the ship2 object, if you
want to be able to difference ship2 from other objects.  If you want the
light sources to be where they would be in the differenced result, simply
declare and use them separately:

   #declare ship2 = union {...}
   #declare ship2lights = union {light_source ... }

   union {
      difference {
         object {object1}
         object {ship2 translate x*4}
         superellipsoid {...}
         }
      object {ship2lights translate x*4}
      }


Post a reply to this message

From: Matt Giwer
Subject: Re: patch object?
Date: 24 Dec 2000 04:39:24
Message: <3A45C44B.7B6C314F@ij.net>
Chris Colefax wrote:
> 
> Matt Giwer <jul### [at] ijnet> wrote:
> >
> > Literally a patch? No, attached is what it objects to being added.
> 
> Well, not quite literally a patch.  What you do have is light sources inside
> the union, which is valid.  But how can POV-Ray determine the result of
> differencing a light source from an object (OK - I guess one possibility
> would be to use the negative of the light's colour...).  In this case,
> however, POV-Ray light sources are defined with patch objects as those
> elements which may not be used negatively in CSG, hence the error you are
> getting.
> 
> The solution is to remove the light sources from the ship2 object, if you
> want to be able to difference ship2 from other objects.  If you want the
> light sources to be where they would be in the differenced result, simply
> declare and use them separately:
> 
>    #declare ship2 = union {...}
>    #declare ship2lights = union {light_source ... }
> 
>    union {
>       difference {
>          object {object1}
>          object {ship2 translate x*4}
>          superellipsoid {...}
>          }
>       object {ship2lights translate x*4}
>       }

	I will give it a try, thanks. The lights are not the issue rather the
spheres are as they go through an object composed of text. So I could
care in the least about them. I just want a subtraction and I realize
the problem with creating informative error messages. 

	Worst case, see you on ITRC animations. :) 

-- 
It you drink too much whiskey you are likely
to shoot at liberals and miss. 
	-- The Iron Webmaster, 261


Post a reply to this message

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