POV-Ray : Newsgroups : povray.general : First object in macro is not rendered. : Re: First object in macro is not rendered. Server Time
12 May 2024 22:40:26 EDT (-0400)
  Re: First object in macro is not rendered.  
From: Bald Eagle
Date: 8 Sep 2023 16:20:00
Message: <web.64fb813a69d6a8061f9dae3025979125@news.povray.org>
I also don't seem to be able to get the macro to pass a result out in the normal
manner.
I'm not sure if this is related to the multiple instances of my not being able
to get macros to function properly from inc files, etc.

Something's wrong, and I'm not sure where.
This small test scene doesn't render the first blue sphere, until the dummy
sphere gets uncommented.

#version 3.8;
global_settings {assumed_gamma 1.0}
default {finish {diffuse 1}}

#include "functions.inc"

camera {
 location <0, 0, -30>
 right     x*image_width/image_height
 up y
 look_at <0, 0, 0>

}

light_source {<0,  0, -50> rgb 1.0}
sky_sphere {pigment {rgb 1}}

#macro Test (startX, startY, targetX, targetY)
 //sphere {0, 0}
 sphere {<startX, startY, 0> 0.1 pigment {rgb z}}
 sphere {<targetX, targetY, 0> 0.1 pigment {rgb y}}

 #declare Result = 1;

 //Result

#end

#declare myResult = Test (1, 3, 4, 2);


Post a reply to this message

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