![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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](/povray.binaries.images/attachment/%3Cweb.47635f3fd0e9aafab80d39510%40news.povray.org%3E/ornaments.jpg?ttop=443866&toff=3500&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp <war### [at] tag povray org> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Anthony D. Baye" <Sha### [at] spamnomore hotmail com> wrote:
> Warp <war### [at] tag povray org> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Art Flint <afl### [at] stx rr com> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |