POV-Ray : Newsgroups : povray.binaries.images : help, transparent sphere_sweep : Re: help, transparent sphere_sweep Server Time
1 Jul 2024 00:05:23 EDT (-0400)
  Re: help, transparent sphere_sweep  
From: Cousin Ricky
Date: 5 Jun 2015 14:55:53
Message: <5571f0b9@news.povray.org>
On 06/05/2015 10:08 AM, Rolf Umbach wrote:
> I am currently running version 3.7. Is there a specific version you would
> recommend to get rid of this bug or should I just try all (the more recent ones)
> of them?

POV-Ray 3.7 is fine.  Note that it is strongly recommended that you put 
a #version statement at the top of all your scene description files.

The file umbach-spline_question-3.7.png is my result from the 3.7 
render.  Does it show the problem you have?

I was unable to get rid of the artifacts.  My best suggestion is to 
download the SphereSweep module from the Object Collection, put the line 
#include "spheresweep.inc" near the top of your scene file, and delete 
the sphere_sweep object in your code, replacing it with:

         #local Radii = array [2] { 0.05, r }
         #local CtrlPts = array [points]
         #local CtrlPts[0] = <0,0,0>;
         #for (pt, 1, points - 1)
           #local CtrlPts[pt] =
             <R*cos(pt*P+ph+ph_tot_), pt*L, R*cos(pt*P+ph_tot_)>;
         #end
         SphereSweep_Approx (SSWP_CUBIC_SPLINE, CtrlPts, Radii, 5, 0)

You will get a warning about the spline feature.  Ignore it.

The SphereSweep module can be downloaded at:
http://lib.povray.org/searchcollection/index2.php?objectName=SphereSweep&contributorTag=Cousin%20Ricky

My result is the file umbach-spline_question-sswp.png.  Because you are 
using 3.7, I felt free to use a #for instead of a #while.  There are 
bright areas where the coils are normal to the camera, but this is due 
to the longer trace path through the emitting media, rather than a bug 
of any sort.

I also replaced the union in macro emission_3 with a merge, to eliminate 
the dark spot where the cone joins the coil.  Although the POV-Ray 
documentation doesn't recommend merge with sphere_sweep objects, it does 
not appear to cause any problems in this case.
________________________

I have a few other suggestions for best practices that are unrelated to 
your problem:

  - As I mentioned above, always put a #version at the top of every
    scene description file.  (You should have received a warning about
    this during your render.)

  - 0.0 is not a valid value for roughness.  (You should have received
    a warning about this during your render.)  Since your specular
    value is also 0.0, the roughness statement is unnecessary anyway.

  - User-defined identifiers should have at least one uppercase letter,
    although this is not enforced.  This recommendation is to prevent
    possible conflicts with new keywords in a future version of
    POV-Ray.  (Some POVers have already been burned by this.)

  - Variables that are temporary to a macro should be declared with
    #local to prevent namespace collisions.  Although POV-Ray has some
    regrettable loopholes which make this far from foolproof, it is a
    general good programming practice.


Post a reply to this message


Attachments:
Download 'umbach-spline_question-3.7.png' (13 KB) Download 'umbach-spline_question-sswp.png' (12 KB)

Preview of image 'umbach-spline_question-3.7.png'
umbach-spline_question-3.7.png

Preview of image 'umbach-spline_question-sswp.png'
umbach-spline_question-sswp.png


 

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