POV-Ray : Newsgroups : povray.binaries.images : Can we join together to make a baseball? : Re: Can we join together to make a baseball? Server Time
7 Aug 2024 09:22:28 EDT (-0400)
  Re: Can we join together to make a baseball?  
From: Jim Charter
Date: 13 Apr 2006 23:14:47
Message: <443f13a7$1@news.povray.org>
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

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