POV-Ray : Newsgroups : povray.binaries.images : Sphere sweep woes : Re: Sphere sweep woes Server Time
9 Aug 2024 11:31:04 EDT (-0400)
  Re: Sphere sweep woes  
From: Bill Hails
Date: 21 Feb 2005 13:50:56
Message: <421a2d8f@news.povray.org>
Tim McMurdo wrote:

> Back to modelling on the ship. I was referencing some photos of actual
> ships rigging when I noticed that rope comes in many shades depending on
> the wear and age of the rope (I am guessing). SO I thought I would revisit
> the macro that piles loops of rope on the belaying pins and have it vary
> the shade of the rope randomly withing a given range. That seems to work
> out pretty well, however...I don't like the fact that the texture does not
> follow the sphere sweep, but is applied to the entire sphere sweep after
> the fact. I can not find a fix for this in the documents. Does anybody
> know if there is a fix?
> 
> Tim

Well, not a fix, an alternative, but it's *seriously* slower:

Turn the points of your sphere sweep into a spline function.
Use the spline function to place spheres close together in a blob.
Keep track of the distance along the rope by adding up the
        distances between the spheres.
Use the distance along the rope to translate a texture from
        where the rope would be if it were streight to where
        it is when it is curled up, and rotate the texture also
        to point along the direction of the spline.
Texture each sphere of the blob separately in this way. If they
        are close enough together they will blend.
You can see the effect in that pic I just posted, the bark of
the nearby tree.

I can share the code if this doesn't sound like complete overkill! :-)

-- 
Bill Hails
http://thyme.homelinux.net/


Post a reply to this message

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