POV-Ray : Newsgroups : povray.binaries.images : Just in time for Christmas, Hopefully Server Time
5 Nov 2024 04:27:04 EST (-0500)
  Just in time for Christmas, Hopefully (Message 1 to 10 of 19)  
Goto Latest 10 Messages Next 9 Messages >>>
From: Anthony D  Baye
Subject: Just in time for Christmas, Hopefully
Date: 15 Dec 2007 00:00:01
Message: <web.47635f3fd0e9aafab80d39510@news.povray.org>
I've been working on a holiday themed offering, and it was going rather well.
But I've been having problems with a model I made, and I can't figure out why.

The bulb object is made from a lathe, using a linear_spline.  There are 3600 odd
 control points, placed with loops.  I used a debug statement to observe the uv
coordinates around the defect, and they tell me I'm seeing things, but the
defect remains, no matter what texture I apply.

Other than that, I'll let the attached image speak for itself.

Any comments or suggestions would be helpful.

A.D.B


Post a reply to this message


Attachments:
Download 'ornaments.jpg' (253 KB)

Preview of image 'ornaments.jpg'
ornaments.jpg


 

From: M a r c
Subject: Re: Just in time for Christmas, Hopefully
Date: 15 Dec 2007 02:47:03
Message: <47638677$1@news.povray.org>

message de news: web.47635f3fd0e9aafab80d39510@news.povray.org...
> Any comments or suggestions would be helpful.

 Very nice!

You could use sturm (more accurate root solver) in your lathes.


Marc


Post a reply to this message

From: Warp
Subject: Re: Just in time for Christmas, Hopefully
Date: 15 Dec 2007 06:30:54
Message: <4763baee@news.povray.org>
Anthony D. Baye wrote:
> The bulb object is made from a lathe, using a linear_spline.

  Try 'sturm', or my MeshLathe macro (from http://lib.povray.org/ ).
The latter might even render faster...


Post a reply to this message

From: Anthony D  Baye
Subject: Re: Just in time for Christmas, Hopefully
Date: 15 Dec 2007 13:40:01
Message: <web.47641f2a33ad2e29b80d39510@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Anthony D. Baye wrote:
> > The bulb object is made from a lathe, using a linear_spline.
>
>   Try 'sturm', or my MeshLathe macro (from http://lib.povray.org/ ).
> The latter might even render faster...

I tried using Sturm.  It takes longer, and there's no appreciable improvement.
I suppose I could try the macro...

Is it at all possible that the problem comes from having too many control
points?  Current count is 3338 (I'll admit this may be overkill.}  Also, the
defect seems to move upward as the incident angle increases.

Thanks for the input,

A.D.B.


Post a reply to this message

From: Warp
Subject: Re: Just in time for Christmas, Hopefully
Date: 15 Dec 2007 17:05:05
Message: <47644f91$1@news.povray.org>
Anthony D. Baye wrote:
> (I'll admit this may be overkill.}

  It is. Use a dozen or so control points and a smooth spline.


Post a reply to this message

From: Leef me
Subject: Re: Just in time for Christmas, Hopefully
Date: 15 Dec 2007 18:30:01
Message: <web.4764628b33ad2e29892adb1d0@news.povray.org>
"Anthony D. Baye" <Sha### [at] spamnomorehotmailcom> wrote:
> Warp <war### [at] tagpovrayorg> wrote:
> > Anthony D. Baye wrote:
> > > The bulb object is made from a lathe, using a linear_spline.
> >
> >   Try 'sturm', or my MeshLathe macro (from http://lib.povray.org/ ).
> > The latter might even render faster...
>
> I tried using Sturm.  It takes longer, and there's no appreciable improvement.
> I suppose I could try the macro...
>
> Is it at all possible that the problem comes from having too many control
> points?  Current count is 3338 (I'll admit this may be overkill.}  Also, the
> defect seems to move upward as the incident angle increases.
>
> Thanks for the input,
>
> A.D.B.

You can usually fix that with nail polish. Is it possible to render nail polish
in Povray?

It seems to me that the clear&gold ball with the Nativity scene on it is a
little out of round in some places. Did the glass get too hot and sag?

Leef_me


Post a reply to this message

From: Art Flint
Subject: Re: Just in time for Christmas, Hopefully
Date: 16 Dec 2007 09:39:41
Message: <476538ad@news.povray.org>
Could it be that you are seeing the plane through the ornament? All 
other ornaments in the picture
don't appear to be as see-through as the one in question.Try to test 
just that one ornament in slightly
different places on the plane to see if the defect moves or changes.

Anthony D. Baye wrote:
> The bulb object is made from a lathe, using a linear_spline.  There are 3600 odd
>  control points, placed with loops.  I used a debug statement to observe the uv
> coordinates around the defect, and they tell me I'm seeing things, but the
> defect remains, no matter what texture I apply.
>
>


Post a reply to this message

From: Anthony D  Baye
Subject: Re: Just in time for Christmas, Hopefully
Date: 16 Dec 2007 10:35:01
Message: <web.476544da33ad2e29b80d39510@news.povray.org>
Art Flint <afl### [at] stxrrcom> wrote:
> Could it be that you are seeing the plane through the ornament? All
> other ornaments in the picture
> don't appear to be as see-through as the one in question.Try to test
> just that one ornament in slightly
> different places on the plane to see if the defect moves or changes.

> > coordinates around the defect, and they tell me I'm seeing things, but the
> > defect remains, *******no matter what texture I apply.*******


Post a reply to this message

From: Tim Attwood
Subject: Re: Just in time for Christmas, Hopefully
Date: 16 Dec 2007 16:08:22
Message: <476593c6$1@news.povray.org>
>> Could it be that you are seeing the plane through the ornament? All
>> other ornaments in the picture
>> don't appear to be as see-through as the one in question.Try to test
>> just that one ornament in slightly
>> different places on the plane to see if the defect moves or changes.
>
>> > coordinates around the defect, and they tell me I'm seeing things, but 
>> > the
>> > defect remains, *******no matter what texture I apply.*******

Sometimes the normals on lathes get flipped, try using an
interior_texture and see if that has an effect.


Post a reply to this message

From: Anthony D  Baye
Subject: Re: Just in time for Christmas, Hopefully
Date: 17 Dec 2007 01:00:01
Message: <web.47660fa633ad2e29da3f66bb0@news.povray.org>
I've tried everything that's been suggested, so far, but nothing - aside from
decreasing the number of control points - had any effect.  And decreasing the
number of control points messed up my uv_mapping.

I'm posting the code for the bulb, if anyone can help me, I'd be grateful.


#macro ChristmasBulb(bulbMaterial, capMaterial, isMapped, Transform)

// These parameters control the size of the bulb.
// The cap is not linked to these parameters
#local r = 1.25;
#local r2 = 0.5;
#local T = 0.03125;

/* !--- DO NOT CHANGE THESE EQUATIONS. ---! */
#local h = sqrt(pow(r,2) - pow(r2,2));
#local s = degrees(atan(h/r2));

/*
intersection {
 box { -r, <r, (r*sin(radians(s)))+(r2*sin(radians(s))), r> }
 difference {
  union {
   sphere { 0.0, r }
   cylinder { 0.0, ((r*sin(radians(s)))+(r2*sin(radians(s))))*y r2 }
   }
  torus { (r2+(r2*cos(radians(s)))), r2 translate
((r*sin(radians(s)))+(r2*sin(radians(s))))*y }
  difference {
   merge {
    sphere { 0.0, r-T }
    cylinder { 0.0, ((r*sin(radians(s)))+(r2*sin(radians(s))))*y r2 }
    }
   torus { (((r-T)*cos(radians(s)))+((r2+T)*cos(radians(s)))), r2+T
    translate ((r*sin(radians(s)))+(r2*sin(radians(s))))*y }
   }
  cylinder { 0.0, ((r*sin(radians(s)))+(r2*sin(radians(s)))+0.03125)*y
     (((r-T)*cos(radians(s)))+((r2+T)*cos(radians(s))))-(r2+T) }
  #if(isMapped)
   uv_mapping
  #end
  }
  hollow on
  material { bulbMaterial }
   transform { Transform }
 }
*/

// Bulb object.
// Constructed out of a single lathe-object.
// Uses loops to determine the positions of the control points.
/* Note: There is a descernable visual flaw, when bulb is viewed straight-on: It
manifests
as a dark line around the equator of the bulb. At present, I do not know if this
is a design flaw,
or a program bug, but I have checked the coordinates of the control points, as y
approaches zero,
for both inner and outer surfaces, and I have not found any errors. - A.D.B. */

merge {
 lathe {
   linear_spline
   3338,
 #local a = 0;
 #while(a < s+90)
 #local P = vrotate(-r*y, a*z);

  <P.x, P.y>

 #local a = a + (s+90)/1500;
 #end
 #local b = s ;
 #while(b > 0)
 #local P = vrotate(-r2*x, b*z);

  <(r2+(r2*cos(radians(s))))+P.x,
   (r*sin(radians(s)))+(r2*sin(radians(s)))+P.y>

 #local b = b - s/169;
 #end
 #local c = 0;
 #while(c < s)
 #local P = vrotate(-(r2+T)*x, c*z);

  <(((r-T)*cos(radians(s)))+((r2+T)*cos(radians(s))))+P.x,
   ((r-T)*sin(radians(s)))+((r2+T)*sin(radians(s)))+P.y>

 #local c = c + s/169;
 #end
 #local d = s+90;
 #while(d > 0)
 #local P = vrotate(-(r-T)*y, d*z);

  <P.x, P.y>

 #local d = d - (s+90)/1500;
 #end
 #if(isMapped)
  uv_mapping
 #end
  }
 bounded_by { box { -(r+0.015625),
  <(r+0.015625), ((r*sin(radians(s)))+(r2*sin(radians(s))))+0.3125,
(r+0.015625)> } }
  hollow on
  material { bulbMaterial }
   transform { Transform }

 }

// A plain, silver Bulb cap.  Not parameterized.
difference {
 union {
  cylinder { -0.15625*y, 0.0 0.25 }
  cylinder { -0.15625*y, 0.03125*y 0.21875 }
  torus { 0.21875, 0.03125 }
  torus { 0.21875, 0.03125 translate -0.15625*y }
  torus { 0.125, 0.0078125 rotate 90.0*x translate 0.109375*y }
  }
 cylinder { -0.21875*y, 0.0 0.21875 }
  material { capMaterial }
   photons { target reflection on refraction off }
   transform {
    translate ((r*sin(radians(s)))+(r2*sin(radians(s))))*y
    Transform
    }
 }

#debug concat("Max Height: " str((r*sin(radians(s)))+(r2*sin(radians(s))), 0, 6)
"\n")

#end

Cheers,

A.D.B.


Post a reply to this message

Goto Latest 10 Messages Next 9 Messages >>>

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