POV-Ray : Newsgroups : povray.newusers : POV-ray with Adobe After Effects : Re: POV-ray with Adobe After Effects Server Time
2 May 2024 03:56:35 EDT (-0400)
  Re: POV-ray with Adobe After Effects  
From: William F Pokorny
Date: 31 May 2015 08:05:16
Message: <556af8fc$1@news.povray.org>
On 05/30/2015 11:26 PM, Tony Stecca wrote:
> Le_Forgeron <jgr### [at] freefr> wrote:
> Le_Forgeron,
>
> thanks for the detailed reply.  My solution doesn't have to be automatic.  After
> a few days of research on this topic there doesn't seem to be an automatic
> approach.
>
> The solutions I'm pursuing is this: use a macro to convert the spheres and
> cylinders in my scenes to meshes.  Then, there's a program called Poseray with
> will read my .pov files and convert them to objs.  But the .pov scenes have to
> be built from mesh objects.
>
> Where I'm stuck now is converting my scenes to meshes.  Could you recommend a
> macro to convert spheres and cylinders to meshes?
>
> I've reached out to the Avogadro community, but no luck there yet?  Is there a
> mesh forum or a macro forum on this board?
>
> Thanks again!
>
> TS
>

Tony,

If simple shapes like spheres and cones, with a little work you might be 
able to use POV-Ray's built in HF_<shape> macros.  These macros take a 
function as input because they were originally intended to create meshes 
after some displacement was applied, but you can fool them into doing no 
displacement by setting up a function that does none as follows:

//----------------- example.pov ---  Run with : povray example.pov -D -P
#include "shapes.inc"
#declare MyFunction = function(x,y,z){0}

HF_Sphere(MyFunction,off,off,<30,30>,on,"ThisSphere.inc",<0.0,0.6,0.0>,0.3,0.3)
HF_Cylinder(MyFunction,off,off,<30,30>,on,"ThisCylinder.inc",<0.5,0.0,0.5>,<0.5,1.0,0.5>,0.4,0.3)
//-----------------

These commands create include files for each sphere or cylinder so you'd 
need to call the appropriate one for each shape with unique file names 
for each. Once created, to pull all these back into povray you'd need 
set up includes for each shape with something like:

#declare Sphere00 = object { #include "Sphere00.inc" texture {...} }
#declare Sphere01 = object { #include "Sphere01.inc" texture {...} }
...
#declare Cylinder00 = object { #include "Cylinder00.inc" texture {...} }
#declare Cylinder01 = object { #include "Cylinder01.inc" texture {...} }

There are too options I've not used in the HF_* macros to set up UV 
texture mapping. If large sets of spheres or cylinders the same texture 
creating unions once textured cleaner.

Bill P.


Post a reply to this message

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