|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Well the opening pitches have been thrown this year..
I have been trying to find a decent baseball in a current (3.6?) POVRAY
version for ages with not much luck. Someone posted one that was close
back in old posting in p.b.i.
http://news.povray.org/povray.binaries.images/thread/%3C38AFF53B.4A483B33%40stud.ntnu.no%3E/?mtop=12
; however, I didn't see all the source posted and what was posted seemed to
be some other related render (maybe MEga PoV?). Somewhere slse in the
newsgroup someone posted a link to a tutorial describing how to make a
baseball seam but the link is now broken.
Anyway can we pool our resources and make a reasonable baseball the
community can use? I would think we can leave off any logo that involves
an image map for now unless someone is industrious.
Sadly, so far I have the basic drity leather ball in the scene. It seems a
little more speckled than the original I based it on for some reason and
making it a much brighter scene didn't help much.
I imagine blobing could be used to add the raised part at the seems but how
to get the red stitches is beyond me. Here is what I have:
//baseball attempt
//modified from
http://news.povray.org/povray.binaries.images/thread/%3C38AFF53B.4A483B33%40stud.ntnu.no%3E/?mtop=12
#declare AreaLightOn = off;
#include "colors.inc"
// radiosity (global illumination) settings
global_settings {
radiosity {
pretrace_start 0.08 // start pretrace at this size
pretrace_end 0.04 // end pretrace at this size
count 35 // higher -> higher quality (1..1600) [35]
nearest_count 5 // higher -> higher quality (1..10) [5]
error_bound 1.8 // higher -> smoother, less accurate [1.8]
recursion_limit 3 // how much interreflections are
calculated (1..5+) [3]
low_error_factor .5 // reduce error_bound during last pretrace
step
gray_threshold 0.0 // increase for weakening colors (0..1)
[0]
minimum_reuse 0.015 // reuse of old radiosity samples [0.015]
brightness 1 // brightness of radiosity effects (0..1)
[1]
adc_bailout 0.01/2
//normal on // take surface normals into account [off]
//media on // take media into account [off]
//save_file "file_name" // save radiosity data
//load_file "file_name" // load saved radiosity data
//always_sample off // turn sampling in final trace off [on]
//max_sample 1.0 // maximum brightness of samples
}
}
camera {
location <0, 10, -36>
direction 1*z
look_at <-.2, 0, 0>
}
light_source {
<0, 20, -70> color White *1.6
#if (AreaLightOn=yes)
area_light 75*x, 75*y, 75, 75
adaptive 1
jitter
#end
}
/*
light_source {
<80, 120, -200> color White
#if (AreaLightOn=yes)
area_light 10*x, 10*y, 5, 5
adaptive 1
jitter
#end
}
*/
plane {
z, 2.5
hollow
pigment { White }
finish { ambient .5 }
}
# declare ball=
pigment { bozo
colour_map {
[0 rgb <255,249,227>/255]
[0.5 rgb <233,255,227>/255 ]
[0.8 rgb <219,205,150>/255 ]
[1 rgb <255,249,227>/255]
}
}
# declare darkness=
pigment { ripples
colour_map {
[0 rgb 1]
[0.8 rgbf <131,105,55,90>/255 ]
[1 rgbf 1]
}
}
# declare R =3;
sphere {<0, 0, 0>, R*3.05
texture{pigment {ball}}
texture{pigment {darkness}}
finish {specular .1 roughness .05}
normal { granite 0.5 scale .001 }
}
Post a reply to this message
Attachments:
Download 'basic baseball from old povray newsgroup.jpg' (31 KB)
Preview of image 'basic baseball from old povray newsgroup.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
wayne461 wrote:
> Well the opening pitches have been thrown this year..
> I have been trying to find a decent baseball in a current (3.6?) POVRAY
> version for ages with not much luck. Someone posted one that was close
> back in old posting in p.b.i.
>
http://news.povray.org/povray.binaries.images/thread/%3C38AFF53B.4A483B33%40stud.ntnu.no%3E/?mtop=12
>
> ; however, I didn't see all the source posted and what was posted seemed to
> be some other related render (maybe MEga PoV?). Somewhere slse in the
> newsgroup someone posted a link to a tutorial describing how to make a
> baseball seam but the link is now broken.
> Anyway can we pool our resources and make a reasonable baseball the
> community can use? I would think we can leave off any logo that involves
> an image map for now unless someone is industrious.
>
> Sadly, so far I have the basic drity leather ball in the scene. It seems a
> little more speckled than the original I based it on for some reason and
> making it a much brighter scene didn't help much.
> I imagine blobing could be used to add the raised part at the seems but how
> to get the red stitches is beyond me. Here is what I have:
>
> //baseball attempt
> //modified from
>
http://news.povray.org/povray.binaries.images/thread/%3C38AFF53B.4A483B33%40stud.ntnu.no%3E/?mtop=12
> #declare AreaLightOn = off;
> #include "colors.inc"
>
>
> // radiosity (global illumination) settings
> global_settings {
> radiosity {
> pretrace_start 0.08 // start pretrace at this size
> pretrace_end 0.04 // end pretrace at this size
> count 35 // higher -> higher quality (1..1600) [35]
> nearest_count 5 // higher -> higher quality (1..10) [5]
> error_bound 1.8 // higher -> smoother, less accurate [1.8]
> recursion_limit 3 // how much interreflections are
> calculated (1..5+) [3]
> low_error_factor .5 // reduce error_bound during last pretrace
> step
> gray_threshold 0.0 // increase for weakening colors (0..1)
> [0]
> minimum_reuse 0.015 // reuse of old radiosity samples [0.015]
> brightness 1 // brightness of radiosity effects (0..1)
> [1]
>
> adc_bailout 0.01/2
> //normal on // take surface normals into account [off]
> //media on // take media into account [off]
> //save_file "file_name" // save radiosity data
> //load_file "file_name" // load saved radiosity data
> //always_sample off // turn sampling in final trace off [on]
> //max_sample 1.0 // maximum brightness of samples
> }
> }
>
>
> camera {
> location <0, 10, -36>
> direction 1*z
> look_at <-.2, 0, 0>
> }
>
>
>
> light_source {
> <0, 20, -70> color White *1.6
> #if (AreaLightOn=yes)
> area_light 75*x, 75*y, 75, 75
> adaptive 1
> jitter
> #end
> }
> /*
> light_source {
> <80, 120, -200> color White
> #if (AreaLightOn=yes)
> area_light 10*x, 10*y, 5, 5
> adaptive 1
> jitter
> #end
> }
> */
>
> plane {
> z, 2.5
> hollow
> pigment { White }
> finish { ambient .5 }
> }
>
>
>
> # declare ball=
> pigment { bozo
> colour_map {
> [0 rgb <255,249,227>/255]
> [0.5 rgb <233,255,227>/255 ]
> [0.8 rgb <219,205,150>/255 ]
> [1 rgb <255,249,227>/255]
> }
> }
>
> # declare darkness=
> pigment { ripples
> colour_map {
> [0 rgb 1]
> [0.8 rgbf <131,105,55,90>/255 ]
> [1 rgbf 1]
> }
> }
>
>
>
>
> # declare R =3;
>
> sphere {<0, 0, 0>, R*3.05
> texture{pigment {ball}}
> texture{pigment {darkness}}
> finish {specular .1 roughness .05}
> normal { granite 0.5 scale .001 }
> }
>
>
> ------------------------------------------------------------------------
>
Not bad guess at the texture. He oiously also layed in some scuffs with
a large bumps or dents of some such.
Most of his code there looks straightforward enough to me. He is using
a patched version that circulated for awhile that allowed you to replace
the #declare with a $ sign. The eval_3d_spline macro is pretty tame as
I recall. But all of that is obviously just a way to get the raised
seams. But what we don't have is the actually spline definition which
is at the heart of the path of the seam on the sphere.
I recall there was a nice tutorial circulating in the Wings3D community
that demonstrated how to model the shape of that style of seam (which
exists on other sports balls too) It took advange of how subdivision
smoothing worked against a cube as I recall. But I can no longer find it.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Jim Charter <jrc### [at] msncom> wrote:
> Not bad guess at the texture. He oiously also layed in some scuffs with
> a large bumps or dents of some such.
>
> Most of his code there looks straightforward enough to me. He is using
> a patched version that circulated for awhile that allowed you to replace
> the #declare with a $ sign. The eval_3d_spline macro is pretty tame as
> I recall. But all of that is obviously just a way to get the raised
> seams. But what we don't have is the actually spline definition which
> is at the heart of the path of the seam on the sphere.
>
> I recall there was a nice tutorial circulating in the Wings3D community
> that demonstrated how to model the shape of that style of seam (which
> exists on other sports balls too) It took advange of how subdivision
> smoothing worked against a cube as I recall. But I can no longer find it.
Jim,
So do you know if the eval_3d_spline macro converted into POVRAY 3.6
anywhere?
Do we really even need a spline though? I thought that with some
well-placed pieces of tori (plural or torus?) and the blob function we
could add the seams? The placement of the red stitches was what I thought
would be the hardest because I don't know easily who to place them along
the seam defined by the tori.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
wayne461 wrote:
> Jim Charter <jrc### [at] msncom> wrote:
>
>>Not bad guess at the texture. He oiously also layed in some scuffs with
>>a large bumps or dents of some such.
>>
>>Most of his code there looks straightforward enough to me. He is using
>>a patched version that circulated for awhile that allowed you to replace
>>the #declare with a $ sign. The eval_3d_spline macro is pretty tame as
>>I recall. But all of that is obviously just a way to get the raised
>>seams. But what we don't have is the actually spline definition which
>>is at the heart of the path of the seam on the sphere.
>>
>>I recall there was a nice tutorial circulating in the Wings3D community
>>that demonstrated how to model the shape of that style of seam (which
>>exists on other sports balls too) It took advange of how subdivision
>>smoothing worked against a cube as I recall. But I can no longer find it.
>
> Jim,
> So do you know if the eval_3d_spline macro converted into POVRAY 3.6
> anywhere?
>
> Do we really even need a spline though? I thought that with some
> well-placed pieces of tori (plural or torus?) and the blob function we
> could add the seams? The placement of the red stitches was what I thought
> would be the hardest because I don't know easily who to place them along
> the seam defined by the tori.
>
>
>
It might be possible to approximate the effect with torii and maybe
cylinders at the joins but a spline does seem the way to go. Torii
curve in a plane whereas this seam moves smoothly through three
dimensions. All the rest is relatively easy (depending on the degree of
resolution you want) if that curve could be defined.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
wayne461 wrote:
> So do you know if the eval_3d_spline macro converted into POVRAY 3.6
> anywhere?
Don't know. I barely remember it or it's history, where it came in etc.
I think I used it but really didn't understand the value added.
Probably too subtle for me. But it doesn't add anything significant
here. It just returns a point on the spline afaik
>
Anyway I came up with a brute force seam spline which you can find
posted in p.b.scene-files. There is also some code there for walking
the spline and creating a parallel set of points on either side of a seam.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Jim Charter <jrc### [at] msncom> wrote:
> Anyway I came up with a brute force seam spline which you can find
> posted in p.b.scene-files. There is also some code there for walking
> the spline and creating a parallel set of points on either side of a seam.
Wow, that spline is great!!! We are really close. Thanks for all your
help!!
Okay, so I integrated everything we have so far and put it in the same
thread in p.b.scene file. It looks a little elongated in the y direction.
I don't quite now why but it may be the camera and the "up" or "direction"
I left from the older scene. I rendered it at 2960 by 1920 so the ratio was
the same as 640/480 like in the camera definition.
If I could bother you some more...Part of the code is stil beyond my ability
though. Did you envision the "cross" as the part of the code allowing me to
walk the spline and make a red cylinder between theparallel set of points on
either side of a seam to make red stiches along the seam?
Here is the work in progress so far:
Post a reply to this message
Attachments:
Download 'baseball with spline wip.jpg' (56 KB)
Preview of image 'baseball with spline wip.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Among other things, Jim Charter saw fit to write:
> Anyway I came up with a brute force seam spline which you can find
> posted in p.b.scene-files. There is also some code there for walking
> the spline and creating a parallel set of points on either side of a seam.
You may find this interesting:
http://www.mathcurve.com/courbes3d/couture/couture.shtml
--
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby
Post a reply to this message
|
|
| |
| |
|
|
From: Jim Charter
Subject: Re: Can we join together to make a baseball?
Date: 17 Apr 2006 05:08:40
Message: <44435b18@news.povray.org>
|
|
|
| |
| |
|
|
wayne461 wrote:
> If I could bother you some more...Part of the code is stil beyond my ability
> though. Did you envision the "cross" as the part of the code allowing me to
> walk the spline and make a red cylinder between theparallel set of points on
> either side of a seam to make red stiches along the seam?
>
Yes but it is also how I made the parallel bunching along the seam. The
vcross gives the cross product. The cross product of two vectors gives
a vector that is perpendicular to the plane of the two vectors you take
the cross product of.
So here's how it works:
In my illustration you can see that the actual spline rides above the
surface of the sphere. (Jellby's contribution my eliminate the need for
this but...later* )
The orange ball is some point on the spline as we loop along it:
SeamSpline(I/Grain)
The green cylinder is a segment of the spline which I called Seg
SeamSpline(I/Grain)-SeamSpline((I-1)/Grain)
The blue cylinder runs perpendicular to the ball's surface from
the orange ball which I call Norm
The cyan plane is the plane that the two vectors Norm and Seg lie in
The red cylinder is the cross product of the Norm and Seg vectors and
is therefore perpendicular to the cyan plane.
I use it to locate a point along-side the spline, the red sphere
Now you see in the code that I use the trace() function.
This function finds the point where the magenta cylinder intersects
the ball's surface, marked by the magenta sphere. The magenta cylinder
is nothing more that the path from the red sphere to the center of the
ball. The magenta sphere is the same as the spherical blob components
that I use to make the lumps along the seam.
* But now with Jelby's contribution it is probably possible to define
points directly on the surface of a sphere, thus obviating much of this.
Post a reply to this message
Attachments:
Download 'img.0000.jpg' (25 KB)
Preview of image 'img.0000.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> This function finds the point where the magenta cylinder intersects
> the ball's surface, marked by the magenta sphere. The magenta cylinder
> is nothing more that the path from the red sphere to the center of the
> ball. The magenta sphere is the same as the spherical blob components
> that I use to make the lumps along the seam.
>
> * But now with Jelby's contribution it is probably possible to define
> points directly on the surface of a sphere, thus obviating much of this.
Glad to see this is coming together with so much help from Jim and now
Jelby.
It seems for a basball we still may want the seam to be just above the ball.
On baseball it makes a slight ridge there so maybe it would need to be toned
down from the current code, Jim?
I am posting a link to a real upclose image of an actual baseball to support
this.
http://images.google.com/imgres?imgurl=http://www.justinnewitter.com/stock/Baseball.JPG&imgrefurl=http://www.justinnewi
tter.com/stock/page_01.htm&h=1600&w=1200&sz=521&tbnid=1MNLzbzsnPsJ:&tbnh=149&tbnw=112&prev=/images%3Fq%3Dbaseball%26hl%
3Den%26lr%3D&start=1&sa=X&oi=images&ct=image&cd=1
However, I think now Jelby's lead might help us more finely code the holes
in the ball and stitches exiting and going into ball? Is that how you see
things proceeding, Jim? Do you want me to play around and see what I can
come up with?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
wayne461 wrote:
> However, I think now Jelby's lead might help us more finely code the holes
> in the ball and stitches exiting and going into ball? Is that how you see
> things proceeding, Jim? Do you want me to play around and see what I can
> come up with?
>
The math on the page Jellby quoted might be used to make a more accurate
spline. Not urgent at the moment. Mine is not very accurate. But in my
opinion using a spline gives the ability to work within sdl without
knowing sophisticated math.
The code I showed you was meant as more of a direction than a solution.
For instance the pigment yellow and magenta pigment was included only to
show the influence of the added blob components. A shallower ridge can
be gotten by tweaking down the threshold value ( get it low, maybe .03
or so ) while increasing the radius of the ridge blobs ( maybe .14 )
You migh also notice that I also locate the blobs just under the surface
of the ball.
Also in the original thread you quoted, H E Day posted a suggestion for
how to "feather" the edges ( which was the original question on the
thread.) His suggestin was to replace each blob component with several
in the same place each one trading off radius v strength
So
instead of something like:
Radius=.14
Strength=1
blob { threshold .03
sphere { 0, 1, 1 }
STARTLOOP
sphere ( Location, Radius, Strenght )
ENDLOOP
}
do something like:
Radius1=.10
Strenght1=1.2
Radius2=.12
Strength2=1.1
Radius3=.14
Strenght3=1.0
blob { threshold .03
sphere { 0, 1, 1 }
STARTLOOP
sphere { Location, Radius1, Strength1 }
sphere { Location, Radius2, Strength2 }
sphere { Location, Radius3, Strength3 }
ENDLOOP
}
I think you could try and tweak these factors before we attack the
threading issue.
I am not sure how radically you would need to vary the Radius and
Strenght over the three "copies" in order to get the effect H Day
describes. I have never tried the technique myself. But H E Day was a
blob master. Perhaps try some controlled experiments to assure yourself
of how the technique works before working directly on the ball model.
-Jim
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|