 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
What's a good way to make a wicker basket model, using what's available in
base plus MegaPOV?
--John
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
John M. Dlugosz <joh### [at] dlugosz com> wrote in message
news:3a5d4726$1@news.povray.org...
> What's a good way to make a wicker basket model, using what's available in
> base plus MegaPOV?
>
Sphere_sweeps should work quite well, however they tend to be slow
to render.
Gail
--
********************************************************************
* gsh### [at] monotix co za * System.dat not found. *
* http://www.rucus.ru.ac.za/~gail/ * Reformat hard drive Y)es O)k *
********************************************************************
* If at first you don't succeed, call it version 1.0 *
********************************************************************
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"John M. Dlugosz" wrote:
>
> What's a good way to make a wicker basket model, using what's available in
> base plus MegaPOV?
I have had fairly good success in the past using cylinders and #while
loops. It takes a creative approach but the results were satisfactory
and did not take all that long to render. A lot of it depends of the
level of detail needed and how close the object will be to the camera.
--
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"John M. Dlugosz" <joh### [at] dlugosz com> wrote in message
news:3a5d4726$1@news.povray.org...
> What's a good way to make a wicker basket model, using what's available in
> base plus MegaPOV?
>
> --John
You could try splines - I've posted some code in text.scene-files as an
example.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Colefax posted a scene in p.b.i on 23 Oct 2000 that used his spline
include file to create a wicker basket. You might want to take a look at
that, the title is "Basket-weaving (fun with spline objects)". You can find
Chris's include files at http://www.geocities.com/SiliconValley/Lakes/1434/
"John M. Dlugosz" wrote:
> What's a good way to make a wicker basket model, using what's available in
> base plus MegaPOV?
>
> --John
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Wasn't it John M. Dlugosz who wrote:
>What's a good way to make a wicker basket model, using what's available in
>base plus MegaPOV?
Here's something that almost works:-
Take the built in "mesh1" isosurface function and add it to a cylinder.
From some viewpoints, the result looks fairly convincing, and it's quite
quick.
To get it right, you really need to bend the mesh round the cylinder,
but I'm not sure how to do that.
#version unofficial MegaPov 0.6;
camera { location <0, 0, -5> look_at <0, 0, 0>}
light_source {<-100,200,-100> colour rgb 1}
// Function for cylinder radius 1.0
#declare Cyl =function{(x^2 + z^2 - 1.0^2)}
// Built in mesh1 function
#declare Mesh = function {"mesh1" <1,0.2,1,0.1,2>}
// Swap the z and y coordinates of the mesh to make it vertical
// and apply a threshold (cotrols the fatness of the weave)
#declare Mesh2 = function {(Mesh(x,z,y) - 0.08)}
// Scale the mesh by <1/5,1/5,1> and add 0.3 of it
// to the cylindrical surface
isosurface {
function (Cyl(x,y,z)
+ Mesh2(5*x,5*y,z)*0.3)
method 2
eval
accuracy 0.001
contained_by{sphere{0,2}}
pigment {rgb <1,1,.6>}
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I'm thinking that the cross-section of the thing isn't round. Aren't there
features to extrude a 2-D defined shape in a complex curve?
"Gail Shaw" <gsh### [at] monotix co za> wrote in message
news:3a5d4cbc@news.povray.org...
>
> John M. Dlugosz <joh### [at] dlugosz com> wrote in message
> news:3a5d4726$1@news.povray.org...
> > What's a good way to make a wicker basket model, using what's available
in
> > base plus MegaPOV?
> >
>
>
> Sphere_sweeps should work quite well, however they tend to be slow
> to render.
>
> Gail
> --
> ********************************************************************
> * gsh### [at] monotix co za * System.dat not found. *
> * http://www.rucus.ru.ac.za/~gail/ * Reformat hard drive Y)es O)k *
> ********************************************************************
> * If at first you don't succeed, call it version 1.0 *
> ********************************************************************
>
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Pretty close detail -- it is for a still-life that will fill most of the
frame. Can you post a link to your rendering?
"Ken" <tyl### [at] pacbell net> wrote in message
news:3A5D5141.2164EDF4@pacbell.net...
>
>
> "John M. Dlugosz" wrote:
> >
> > What's a good way to make a wicker basket model, using what's available
in
> > base plus MegaPOV?
>
> I have had fairly good success in the past using cylinders and #while
> loops. It takes a creative approach but the results were satisfactory
> and did not take all that long to render. A lot of it depends of the
> level of detail needed and how close the object will be to the camera.
>
> --
> Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
> http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thanks for the pointer! I'm interested in isosurfaces but have not jumped
in yet, due to lack of tutorials and examples.
Re bent in a sphere: Since I'm after a diamond-shaped basket, 4 flats should
be fine. I'm just worried I won't have enough control on the individual
twigs to get them lined up with the trip pieces, or enough variation between
pieces.
--John
"Mike Williams" <mik### [at] nospam please> wrote in message
news:rVI### [at] econym demon co uk...
> Wasn't it John M. Dlugosz who wrote:
>
> >What's a good way to make a wicker basket model, using what's available
in
> >base plus MegaPOV?
>
> Here's something that almost works:-
>
> Take the built in "mesh1" isosurface function and add it to a cylinder.
> From some viewpoints, the result looks fairly convincing, and it's quite
> quick.
>
> To get it right, you really need to bend the mesh round the cylinder,
> but I'm not sure how to do that.
>
>
>
> #version unofficial MegaPov 0.6;
>
> camera { location <0, 0, -5> look_at <0, 0, 0>}
>
> light_source {<-100,200,-100> colour rgb 1}
>
> // Function for cylinder radius 1.0
> #declare Cyl =function{(x^2 + z^2 - 1.0^2)}
>
> // Built in mesh1 function
> #declare Mesh = function {"mesh1" <1,0.2,1,0.1,2>}
>
> // Swap the z and y coordinates of the mesh to make it vertical
> // and apply a threshold (cotrols the fatness of the weave)
> #declare Mesh2 = function {(Mesh(x,z,y) - 0.08)}
>
> // Scale the mesh by <1/5,1/5,1> and add 0.3 of it
> // to the cylindrical surface
> isosurface {
> function (Cyl(x,y,z)
> + Mesh2(5*x,5*y,z)*0.3)
> method 2
> eval
> accuracy 0.001
> contained_by{sphere{0,2}}
> pigment {rgb <1,1,.6>}
> }
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
That is beautiful! Thanks for the pointer. I'll follow up that thread on
p.b.i.
--John
"Kevin Wampler" <wam### [at] u arizona edu> wrote in message
news:3A5DF712.A54A5731@u.arizona.edu...
> Chris Colefax posted a scene in p.b.i on 23 Oct 2000 that used his spline
> include file to create a wicker basket. You might want to take a look at
> that, the title is "Basket-weaving (fun with spline objects)". You can
find
> Chris's include files at
http://www.geocities.com/SiliconValley/Lakes/1434/
>
> "John M. Dlugosz" wrote:
>
> > What's a good way to make a wicker basket model, using what's available
in
> > base plus MegaPOV?
> >
> > --John
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
John M. Dlugosz <joh### [at] dlugosz com> wrote:
> That is beautiful! Thanks for the pointer. I'll follow up that thread on
> p.b.i.
Thank you! As I wrote in the original message with the image, the basket
was created as an example of my Spline Macro File.
The entire construction is defined by four splines giving the profile of the
basket, the weft around the basket (circular in this case), the looped edges
and the handle. A combination of pipe splines (using cylinders to follow
the shape of the path) and torus pipe splines/coil splines (using torii
segments) is then used to create the basket. The beauty of the torus
splines is that given the right settings they automatically create the waved
shape of the weft, without having to specify each curve. The entire scene
file is just over 2 Kb.
If you want to create weavings with non-circular cross sections, you can
define your own macros for creating objects based on splines, using triangle
meshes, bicubic patches (which can be translated directly to spline
segments), or really any type of objects you like. And in the absence of
complete documentation, please feel free to contact me if you need help....
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> > That is beautiful! Thanks for the pointer. I'll follow up that thread
on
> > p.b.i.
>
> Thank you! As I wrote in the original message with the image, the basket
> was created as an example of my Spline Macro File.
I sent you email direct after following up on that macro.
> The entire construction is defined by four splines giving the profile of
the
> basket, the weft around the basket (circular in this case), the looped
edges
> and the handle. A combination of pipe splines (using cylinders to follow
> the shape of the path) and torus pipe splines/coil splines (using torii
> segments) is then used to create the basket. The beauty of the torus
> splines is that given the right settings they automatically create the
waved
> shape of the weft, without having to specify each curve. The entire scene
> file is just over 2 Kb.
The part about the beauty of torus splines I see: I figured as much upon
reading your tutorial. I don't follow the rest of it. The weaving is a
hierarical system of splines, one for the overall shape and another for the
weave??
Grabbing digital camera... here is a life-model of what I was thinking about
(posted to p.b.i.), but after seeing yours, I really like the open weave,
too. So now I'm thinking of the diamond-shape "dish" like mine, but with a
more open weave like yours, to show the contents better. Each of the 4
sides and bottom would be flat, maybe made as individual panels and tied to
a metal frame.
> If you want to create weavings with non-circular cross sections, you can
> define your own macros for creating objects based on splines, using
triangle
> meshes, bicubic patches (which can be translated directly to spline
> segments), or really any type of objects you like. And in the absence of
> complete documentation, please feel free to contact me if you need
help....
I'm thinking of thin, flat strips of wood or bark. Sticking a wood texture
on an isosurface or carefully "carved" undulation pattern would not look
right -- it's more like a U-V mapping, not cut from material in that shape.
Know what I mean? If strips are cut parallel to the grain, that might be
close enough, though.
--John
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
John M. Dlugosz <joh### [at] dlugosz com> wrote:
> The part about the beauty of torus splines I see: I figured as much upon
> reading your tutorial. I don't follow the rest of it. The weaving is a
> hierarical system of splines, one for the overall shape and another for
the
> weave??
Yes - one spline defines the profile that is revolved to form the shape of
the basket, another is a simple circle which is repeated at intervals along
the profile spline to create the weave.
> Grabbing digital camera... here is a life-model of what I was thinking
about
> (posted to p.b.i.), but after seeing yours, I really like the open weave,
> too. So now I'm thinking of the diamond-shape "dish" like mine, but with
a
> more open weave like yours, to show the contents better. Each of the 4
> sides and bottom would be flat, maybe made as individual panels and tied
to
> a metal frame.
>
> I'm thinking of thin, flat strips of wood or bark. Sticking a wood
texture
> on an isosurface or carefully "carved" undulation pattern would not look
> right -- it's more like a U-V mapping, not cut from material in that
shape.
> Know what I mean? If strips are cut parallel to the grain, that might be
> close enough, though.
Looking at the shape of the basket you posted the photo of, I would say
breaking the construction into parts is probably the best option. The base
could be created using cylinders and waved torus splines, stretched in the
horizontal direction to flatten them.
The sides might be a little more complicated, particularly as the photo
doesn't clearly reveal exactly how they're woven. You could define a
continuous spline that follows the perimeter of the basket, using this for
the horizontal canes that build up the sides, and for spacing the binding
canes that hold them together (which could be defined by another spline).
But if you wanted a more open weave, perhaps you could use vertical struts
with a weft around the sides instead.
Texture wise, I think using UV mapping to follow the exact bending of each
object might be termed "overkill"! Given that the texture will probably
have some amount of turbulence, a little mapping to follow the general shape
of the basket (rather than the individual canes) should be sufficient.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Looking at the shape of the basket you posted the photo of, I would say
> breaking the construction into parts is probably the best option. The
base
> could be created using cylinders and waved torus splines, stretched in the
> horizontal direction to flatten them.
I'll start with the bottom. This "surface" is then general-purpose and I
can use for sides of things too, like hampers. Then I'll design the
more-open sides.
I don't know the terminology you used, as I never took basket-weaving in
school. But I see the straight (not bent) sticks running in one direction
give it strength, and flat ribbons weave among them using a high "tension"
parameter. I see a blob_spline can be flattened like a ribbon, but I don't
see an option for torus_pipe_spline. You mean flatten the entire shape
after defining it? That means I'll need to pre-compensate the amplitude.
--John
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
John M. Dlugosz <joh### [at] dlugosz com> wrote:
> I'll start with the bottom. This "surface" is then general-purpose and I
> can use for sides of things too, like hampers. Then I'll design the
> more-open sides.
>
> I don't know the terminology you used, as I never took basket-weaving in
> school. But I see the straight (not bent) sticks running in one direction
> give it strength, and flat ribbons weave among them using a high "tension"
> parameter. I see a blob_spline can be flattened like a ribbon, but I
don't
> see an option for torus_pipe_spline. You mean flatten the entire shape
> after defining it? That means I'll need to pre-compensate the amplitude.
I (compulsorily) wove a few baskets at school when I was 10 or so - I would
suggest you don't take me as any sort of expert on the subject!
As for the flattening, this is why I suggested stretching in the horizontal
direction rather than flattening in the vertical, e.g. for a cross section
that measures 5 x 1 units, use a radius of 0.5 and scale by <5, 1, 1>
(presuming the spline runs in the +z direction, weaving up and down in the
+y). Otherwise, you can use inverse spline transformations, e.g.:
object {create_spline_object (MySpline, spline_scale (1/<1, 0.2, 1>))
scale <1, 0.2, 1>}
This way you can define the shape of the spline exactly as you want it,
because the transformations cancel out any effect on the shape of the spline
path itself (but still change the shape of the cross-section).
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> As for the flattening, this is why I suggested stretching in the
horizontal
> direction rather than flattening in the vertical, e.g. for a cross section
Oh, that would be easier. In my tests, I found that a vector for
spline_radius did not work for torus, and pre-multiplied the amplitude (in
the vector parameter, not using spline_scale) and then reduced the scale.
On my next go, I'll scale up the other direction instead.
I've posted a test render on p.b.i. that shows flattened slats weaving
around fixed sticks.
I think to give a less orderly result, I can start with a grid of points
that represent the intersections, and peterb them a little. The sticks can
bend too, but very slightly, using the same technology. I can also vary the
tension a little from strip to strip, to simulate the effect of thicker or
thinner pieces.
--John
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Why does changing the spline_steps from 120 to 60 (1210 frame level objects
vs. 610, a factor of 2)affect the rendring time by a factor of 7.6? It's
even slow on the blank "sky" area above the image and the blank "desk"
below. Bounding boxes, where art thou?
--John
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
John M. Dlugosz <joh### [at] dlugosz com> wrote:
> Why does changing the spline_steps from 120 to 60 (1210 frame level
objects
> vs. 610, a factor of 2)affect the rendring time by a factor of 7.6? It's
> even slow on the blank "sky" area above the image and the blank "desk"
> below. Bounding boxes, where art thou?
Where indeed? I don't specify any bounding boxes internally in the Spline
Macro File, as these will be overridden by POV-Ray unless the -UR command
line option is used. Instead, each torus is clipped using boxes that fit
the desired segment as closely as possible. Ideally, POV-Ray would the
bound each torus by its clipping box. You may find it's best to perform
some manual bounding, however (at least for the union that forms the
weaving, to prevent slow rendering above and below).
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Where indeed? I don't specify any bounding boxes internally in the Spline
> Macro File, as these will be overridden by POV-Ray unless the -UR command
> line option is used. Instead, each torus is clipped using boxes that fit
> the desired segment as closely as possible. Ideally, POV-Ray would the
> bound each torus by its clipping box. You may find it's best to perform
> some manual bounding, however (at least for the union that forms the
> weaving, to prevent slow rendering above and below).
Right, I thought POV will autobound just fine. There is no way the empty
areas should be computing intersections with the clipped segments! Why
would manual bounding be required? Is POV falling down on this particular
shape somehow? Is there an infinite object somewhere in your macro that
messes it up?
--John
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 17 Jan 2001 08:48:48 +1000, Chris Colefax wrote:
> Ideally, POV-Ray would the
>bound each torus by its clipping box.
Isn't that what bounded_by{clipped_by} is for?
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 17 Jan 2001 08:48:48 +1000, "Chris Colefax"
<chr### [at] tag povray org> wrote:
>Where indeed? I don't specify any bounding boxes internally in the Spline
>Macro File, as these will be overridden by POV-Ray unless the -UR command
>line option is used. Instead, each torus is clipped using boxes that fit
>the desired segment as closely as possible. Ideally, POV-Ray would the
>bound each torus by its clipping box. You may find it's best to perform
>some manual bounding, however (at least for the union that forms the
>weaving, to prevent slow rendering above and below).
The easiest would be to bound each torus segment like this:
bounded_by { clipped_by }
and then use -UR in the command line. POV *might* just be doing
something wrong.
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vip bg
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Peter Popov <pet### [at] vip bg> wrote:
: and then use -UR
I understand why this feature was firstly added in povray 3.0: Because
most old scenes had manually made bounding objects which weren't necessarily
optimal ones.
However, this was so long ago that I think a change could be necessary.
Nowadays it's more a rule than an exception that if people define a
bounding box to an object, it's for a good reason.
I think that the default should be changed, that is, by default povray
does NOT remove user-defined bounding objects, but you can, if you want,
make it remove them with +UR.
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Ron Parker <ron### [at] povray org> wrote:
> Isn't that what bounded_by{clipped_by} is for?
A quick test shows that POV-Ray's automatic bounding is winning out for the
most part - on a torus spline with 100 segments (201 objects including
joining spheres), using manual bounds removal renders in 32 seconds compared
to 68 when bounded_by {clipped_by} is used with -UR.
The problem John is having might be something to do with the number of
objects he's rendering, or their CSG structure, and possibly highlights a
failing of the automatic bounding system - I'll leave it to John to post the
offending code...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> The problem John is having might be something to do with the number of
> objects he's rendering, or their CSG structure, and possibly highlights a
> failing of the automatic bounding system - I'll leave it to John to post
the
> offending code...
Here is a complete file.
Post a reply to this message
Attachments:
Download 'test3.pov.txt' (3 KB)
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |