POV-Ray : Newsgroups : povray.binaries.images : Oval Box : Re: Oval Box Server Time
9 Aug 2024 11:26:01 EDT (-0400)
  Re: Oval Box  
From: Jeremy M  Praay
Date: 14 Feb 2005 19:56:16
Message: <421148b0@news.povray.org>
"Jim Charter" <jrc### [at] msncom> wrote in message 
news:421115c3$1@news.povray.org...
> Jeremy M. Praay wrote:
>>
>> UV-mapping?  Blasphemy!  ;-)
>>
>> It's all procedural.
>
> Okay ;) I would have thought it odd if it wasn't but I just wanted to be 
> sure.  I think to be fair, if you use the hf_cylinder macro you are using 
> a type of uv mapping implicitly, in the sense that a uv space is being 
> projected, which is what I meant.

Ahh.  Ok, then.  I'll forgive the heresy.  ;-)

I actually looked at the hf_cylinder macro, and it scared me, so I simply 
used a isosurface-pigment-image_map-thing.  I have no idea how to refer to 
it, but it's something I've used before, so it was easy to adapt.  I think 
Christoph Hormann does something similar in some of the iso_csg library 
macros (IC_HF_Cylinder).

>
> I think I used about 5-6 layers of texture to create
>> the wood.  Actually, I have nothing against uv-mapping, but I generally 
>> find it easier (and more fulfilling) to use procedural unless I'm dealing 
>> with something where pictures/drawings are involved.
>
> Well the fine grain of the wood is *extremely* convincing whatever the 
> case. So you are using a texture like granite or crackle which works the 
> same in all dimensions and so appears to wrap very well, especially on 
> regular shapes.  This is also my preferred solution.  Are you applying a 
> normal too it looks like?

Yep.  Granite, bozo, agate.  Then I generally just stretched them in one 
direction or the other.  For the lid, I also used a warp {repeat 2*x flip 
<1,0,0>} on each layer, and rotate it slightly (before the warp).  It's 
something I figured out a long time ago, and haven't modified much since. 
It makes nice veneer too, but it can also create the appearance of a wood 
cross-section without using "wood."

<snip>
>> To make the fingers have a different texture than the wood that they are 
>> tacked onto, I simply made a cylinder slightly larger than most of the 
>> heightfield cylinder (technically an isosurface) and said "translate 
>> x*20" for the texture.  I experimented with more complex solutions 
>> ("cylindrical" pigments), but that was the simplest solution.
>>
>> I had a difficult time forcing myself to use a heightfield, and I 
>> actually produced a version that was pure CSG.
>
> How?  You are still dependent on the image_map to displace the "fingers" 
> are you not?  I can picture uv mapping the image to a cylinder, and I can 
> picture making the image a function and displacing an iso's surface with 
> it, but I can't picture doing both.

I should probably restate that.  I had a cylinder for the box, then I 
created the fingers by differencing cylinders (turned 90 degrees) from a 
cylinder (the same size as the box) and then unioning the box-cylinder with 
the differenced (fingers) cylinder and translating the differenced one 
slightly -z, so that the fingers would stick out.  But then I realized that 
rounding the differenced parts was nearly impossible, and without some 
rounded edges on the fingers, it just didn't look right, so I gave up on 
that, and turned to heightfields, which up to that point, I hadn't used.

To be technically correct, the rounded edges (on top of the lid) which you 
see now are actually the Round_Cylinder_Union.

I think I'll add the source to the pov-ray wiki, though I might want to 
clean it up a little bit first.

-- 
Jeremy
www.beantoad.com


Post a reply to this message

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