POV-Ray : Newsgroups : povray.advanced-users : Very odd effect in an animation... : Re: Very odd effect in an animation... Server Time
28 Jul 2024 14:35:30 EDT (-0400)
  Re: Very odd effect in an animation...  
From: Slime
Date: 30 Jan 2005 21:52:11
Message: <41fd9d5b$1@news.povray.org>
> > By any chance, are you passing variables "by reference" into macros? (So
> > that the macros change their values?)
>
> Yes, I'm passing variables to macross to be set by those macros.

A bug was recently discovered where doing that fails very infrequently.
Details can be found in the thread "Differences in rendering 3.50 vs. 3.6.1"
in povray.general on 11/24/2004. Basically, your changes to the variables
within the macro aren't changing their values outside of the macro. This bug
will be fixed in 3.6.2 according to Thorsten.

You can work around this by using global variables, setting their values
inside the macros, and then reading those values after calling the macros.
Or I think you can use 3.6.0 if that's easier and you're not relying on the
3.6.1 bugfixes.

> I'm not 100% sure what you mean by "by reference".

When a variable is passed "by reference," it means that the variable you see
inside the macro is the same as the one outside the macro; so changing it
inside the macro affects the value of the original variable passed in. When
a variable is passed "by value," its value is copied into a new variable
inside the macro, and changing that variable has no effect on the original
variable that was passed.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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