POV-Ray : Newsgroups : povray.general : Null or empty object / mesh Server Time
25 Dec 2024 20:45:20 EST (-0500)
  Null or empty object / mesh (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: Mr
Subject: Null or empty object / mesh
Date: 12 Aug 2016 06:25:01
Message: <web.57ada3c891f0e4e516086ed00@news.povray.org>
Hi guys, is there no null object in Povray?
Something as close as possible to object{}  that could be used in a scene, and
applied a matrix to with no apparent result?

I need to keep some point transformations, without anything actually being
rendered in the scene.

I tried #declare DATAEmpty =mesh {triangle{<0, 0, 0>,<0, 0, 0>,<0, 0, 0>}}
but it does not work


Post a reply to this message

From: Stephen
Subject: Re: Null or empty object / mesh
Date: 12 Aug 2016 06:33:56
Message: <57ada614$1@news.povray.org>
On 8/12/2016 11:24 AM, Mr wrote:
> Hi guys, is there no null object in Povray?
> Something as close as possible to object{}  that could be used in a scene, and
> applied a matrix to with no apparent result?
>
> I need to keep some point transformations, without anything actually being
> rendered in the scene.
>
> I tried #declare DATAEmpty =mesh {triangle{<0, 0, 0>,<0, 0, 0>,<0, 0, 0>}}
> but it does not work
>
>

Try union {}
You will get a warning though.

-- 

Regards
     Stephen


Post a reply to this message

From: Le Forgeron
Subject: Re: Null or empty object / mesh
Date: 12 Aug 2016 08:54:48
Message: <57adc718$1@news.povray.org>
Le 12/08/2016 à 12:24, Mr a écrit :
> I need to keep some point transformations, without anything actually being
> rendered in the scene.
>

what about

#declare T = transform{ .... }


Post a reply to this message

From: Bald Eagle
Subject: Re: Null or empty object / mesh
Date: 12 Aug 2016 10:10:01
Message: <web.57add8a12494daf7b488d9aa0@news.povray.org>
Stephen <mca### [at] aolcom> wrote:

> > applied a matrix to with no apparent result?

clipka pointed out that one can do this:

// Translate a "point"
#declare MyTransform = transform { translate { <x, y, z> } }
#declare Foo2 = vtransform (Foo1, MyTransform);

Maybe you might also consider a completely transparent sphere or disk, or
something of that nature?

BTW, I have wondered this myself.


Post a reply to this message

From: clipka
Subject: Re: Null or empty object / mesh
Date: 12 Aug 2016 11:50:04
Message: <57adf02c@news.povray.org>
Am 12.08.2016 um 12:24 schrieb Mr:
> Hi guys, is there no null object in Povray?
> Something as close as possible to object{}  that could be used in a scene, and
> applied a matrix to with no apparent result?
> 
> I need to keep some point transformations, without anything actually being
> rendered in the scene.

That depends on what /exactly/ you want to do.

In POV-Ray SDL, the standard way of keeping track of transformations is

    #declare MyTrans = transform {
      rotate    ...
      translate ...
      scale     ...
    }

Alternatively, if you're only interested in the effect of the
transformations on a given point, you can use vector transformation
functions, like so:

    #declare MyPoint = ...;
    #declare MyPoint = vrotate    (MyPoint, ...);
    #declare MyPoint = vtranslate (MyPoint, ...);
    #declare MyPoint = vscale     (MyPoint, ...);

If it is necessary that the thing is an object (presumably because it
would make the life easier for your exporter), another approach might be
to use an invisible sphere, like so:

    #declare MyMarker = sphere { <0,0,0>, 1
      no_image no_reflection no_shadow no_radiosity
    }

You can then get the coordinates of the sphere's center after
transformation as the average of the object's `min_extent()` and
`max_extent()`.


If on the other hand the only thing you really need is a dummy object to
attach a transformation to, without actually doing anything with it in
the POV-Ray scene -- for instance to export an empty object group from
Blender in a manner that it can be re-imported later -- the simplest
approach would be an empty union:

    #declare MyDummy = union {
      rotate    ...
      translate ...
      scale     ...
    }

You'll get a warning, but aside from that POV-Ray will be fine.


Post a reply to this message

From: Alain
Subject: Re: Null or empty object / mesh
Date: 12 Aug 2016 14:48:40
Message: <57ae1a08$1@news.povray.org>

> Hi guys, is there no null object in Povray?
> Something as close as possible to object{}  that could be used in a scene, and
> applied a matrix to with no apparent result?
>
> I need to keep some point transformations, without anything actually being
> rendered in the scene.
>
> I tried #declare DATAEmpty =mesh {triangle{<0, 0, 0>,<0, 0, 0>,<0, 0, 0>}}
> but it does not work
>
>

That's not a null object but a degenerate triangle.

You may try a zero radius sphere:
sphere{Center, 0}

An invisible object:
sphere{Center, Radius pigment{rgbt 1} no_image no_shadow no_reflection 
no_radiosity photons{pass_through collect off} hollow }

You can also use vector operations as previously suggested.

Also as previously suggested, you can #declare your transformation.


Post a reply to this message

From: Mr
Subject: Re: Null or empty object / mesh
Date: 19 Aug 2016 04:30:00
Message: <web.57b6c35f2494daf716086ed00@news.povray.org>
Alain <kua### [at] videotronca> wrote:

> > Hi guys, is there no null object in Povray?
> > Something as close as possible to object{}  that could be used in a scene, and
> > applied a matrix to with no apparent result?
> >
> > I need to keep some point transformations, without anything actually being
> > rendered in the scene.
> >
> > I tried #declare DATAEmpty =mesh {triangle{<0, 0, 0>,<0, 0, 0>,<0, 0, 0>}}
> > but it does not work
> >
> >
>
> That's not a null object but a degenerate triangle.
>
> You may try a zero radius sphere:
> sphere{Center, 0}
>
> An invisible object:
> sphere{Center, Radius pigment{rgbt 1} no_image no_shadow no_reflection
> no_radiosity photons{pass_through collect off} hollow }
>
> You can also use vector operations as previously suggested.
>
> Also as previously suggested, you can #declare your transformation.

Thanks, I made it a 0 radius sphere with all suggested attributes


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Null or empty object / mesh
Date: 20 Aug 2016 16:58:00
Message: <57b8c458$1@news.povray.org>
> Thanks, I made it a 0 radius sphere with all suggested attributes

Is there another use for a null than to keep track of a location after 
some transformations and/or linking other objects to that location? And 
isn't that something that can much easier be done in POV-Ray by 
declaring and vtransforming a vector?

I'm just curious why you would need a null/empty object in POV-Ray.


Post a reply to this message

From: Alain
Subject: Re: Null or empty object / mesh
Date: 21 Aug 2016 18:01:35
Message: <57ba24bf@news.povray.org>

>> Thanks, I made it a 0 radius sphere with all suggested attributes
>
> Is there another use for a null than to keep track of a location after
> some transformations and/or linking other objects to that location? And
> isn't that something that can much easier be done in POV-Ray by
> declaring and vtransforming a vector?
>
> I'm just curious why you would need a null/empty object in POV-Ray.
>

There is realy no need to use a null object, but, for some, it's 
intuitively easier that way. Also, some peoples are not aware of, or 
comfortable with, vector transformations.

Once that object is #declared, you can get it's location using #declare 
Loc_Max = max_extent(Object_Name); and #declare Loc_Min = 
min_extent(Object_Name); and averaging the values. With a zero radius 
sphere, the two values are the same allowing you to use only one of the 
#declare.

Yes, it's beter to use a transformed vector. It use less memory and it's 
faster to access.


Post a reply to this message

From: Mr
Subject: Re: Null or empty object / mesh
Date: 22 Aug 2016 07:15:00
Message: <web.57badde62494daf716086ed00@news.povray.org>
Zeger Knaepen <zeg### [at] povplacecom> wrote:
> > Thanks, I made it a 0 radius sphere with all suggested attributes
>
> Is there another use for a null than to keep track of a location after
> some transformations and/or linking other objects to that location? And
> isn't that something that can much easier be done in POV-Ray by
> declaring and vtransforming a vector?
>
> I'm just curious why you would need a null/empty object in POV-Ray.

It's not totally unrelated to Shrodinger's cat... But not quite the same thing
either.




Vertices may be here in a mesh2 or not.
For the exporter from Blender to POV it is possible to have a mesh object from
which the user will have deleted all vertices, this user may not be willing to
add anthing to the scene, but we have to assume that he does it on purpose, and
would indeed want to keep track of the transformations of some point, BUT he
uses an interface and doesn't even want to know what a vector or a matrix is.
Also, the transformations would have to happen through all the same operators as
the standard geometry exported. because creating a particular case may have
inconsistant results.

Would a declared vector be able to pass through all the transforms a mesh2
object can ever go through? if so I was wrong and should use a vector, but if I
HAVE to add a vtransform or anything that all standard geometry can't go
through, then I can't use it, because it's not a mesh... but it's a mesh. :-)


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

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