POV-Ray : Newsgroups : povray.general : Null or empty object / mesh : Re: Null or empty object / mesh Server Time
1 May 2024 18:21:14 EDT (-0400)
  Re: Null or empty object / mesh  
From: clipka
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

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