POV-Ray : Newsgroups : povray.binaries.images : uv_mapping for cylinder, disc, cone & lemon : Re: uv_mapping for cylinder, disc, cone & lemon Server Time
19 Apr 2024 14:30:05 EDT (-0400)
  Re: uv_mapping for cylinder, disc, cone & lemon  
From: Le Forgeron
Date: 4 Sep 2018 07:28:20
Message: <5b8e6c54$1@news.povray.org>
Le 04/09/2018 à 01:21, clipka a écrit :
> Am 03.09.2018 um 21:12 schrieb Le_Forgeron:
>> user control is achieved by adding "uv_mapping direction" in cylinder,
>> disc, cone and lemon
>>
>> code available at
>>
https://github.com/LeForgeron/povray/commit/83a269c227ab08e6e426670f30ed18a524360b17
> ...
> 
>> cone { -y * 0.5, 0.5, 0.5 * y, 0.25  uv_mapping x texture { Verso }
>> transform{ Trans }  translate VS* y + 6 * x }
> 
> I haven't taken a closer look at it yet, but I presume the UV mapping is
> oriented such that the seam lies in the half-plane defined by the axis
> of rotation and the vector specified after `uv_mapping`?

Exactly !

> 
> That's the parameterization I would have suggested, too.
> 
> However, I'm not happy with the syntax, as `uv_mapping` without any
> parameter is already a valid general object modifier, which allows to
> turn on UV mapping in the object rather than in the texture.
> 
> That modifier could be hacked to allow for an optional vector parameter
> when the object is a cylinder, cone or lemon, but that would indeed be
> rather... hackish.
> 

Oh, I didn't notice uv_mapping was an object modifier, and not a pattern 
(texture/pigment/... ) only.

Might have to introduce a new keyword then, for that purpose.

My current problem is adding such rotation of uv in sphere_sweep: it is 
far simpler for sphere_sweep to get a float between 0 and 1 for that 
purpose... unless I drop the current computation of the first mapping 
which use the plane of the first two non-colinear segment for setting 
the current origin.

So, one or two keywords to find, meaningful... and short, but not ambiguous.


Post a reply to this message

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