POV-Ray : Newsgroups : povray.newusers : can't i rotate a pigment? Server Time
29 Mar 2024 20:49:05 EDT (-0400)
  can't i rotate a pigment? (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: Anton Sherwood
Subject: can't i rotate a pigment?
Date: 7 May 2015 04:34:48
Message: <554b23a8$1@news.povray.org>
I have a scene with

	mesh2 {
		...
	        pigment { Tufte rotate N*y }
		...
		}

but the pigment does not rotate.  (Tufte is my own creation.)
Have I forgotten something?

-- 
*\\* Anton Sherwood *\\* www.bendwavy.org


Post a reply to this message

From: Thomas de Groot
Subject: Re: can't i rotate a pigment?
Date: 7 May 2015 07:42:52
Message: <554b4fbc$1@news.povray.org>
On 7-5-2015 10:34, Anton Sherwood wrote:
> I have a scene with
>
>      mesh2 {
>          ...
>              pigment { Tufte rotate N*y }
>          ...
>          }
>
> but the pigment does not rotate.  (Tufte is my own creation.)
> Have I forgotten something?
>

There is no reason why it should not, imo. We need a bit more info 
though. First of all, is the mesh2 uv_mapped? From the basic 
construction of your code I suppose not, but...

-- 
Thomas


Post a reply to this message

From: Anton Sherwood
Subject: Re: can't i rotate a pigment?
Date: 7 May 2015 13:16:36
Message: <554b9df4$1@news.povray.org>
On 2015-5-07 01:34, Anton Sherwood wrote:
> 	        pigment { Tufte rotate N*y }

D'oh!  Tufte is made of "slope"s; one can understand that
rotating it might not work.  I'll try this:

	object {
		...
		rotate -N*y
		pigment { Tufte }
		rotate N*y
		}

-- 
*\\* Anton Sherwood *\\* www.bendwavy.org


Post a reply to this message

From: Anton Sherwood
Subject: Re: can't i rotate a pigment?
Date: 7 May 2015 14:04:55
Message: <554ba947@news.povray.org>
On 2015-5-07 10:16, Anton Sherwood wrote:
> I'll try this:
>
> 	object {
> 		...
> 		rotate -N*y
> 		pigment { Tufte }
> 		rotate N*y
> 		}

No luck.

-- 
*\\* Anton Sherwood *\\* www.bendwavy.org


Post a reply to this message

From: Stephen
Subject: Re: can't i rotate a pigment?
Date: 7 May 2015 16:11:32
Message: <554bc6f4$1@news.povray.org>
On 07/05/2015 19:04, Anton Sherwood wrote:
> On 2015-5-07 10:16, Anton Sherwood wrote:
>> I'll try this:
>>
>>     object {
>>         ...
>>         rotate -N*y
>>         pigment { Tufte }
>>         rotate N*y
>>         }
>
> No luck.
>
Try changing the direction vector

pigment {
   slope {
     < 0.500, 0.000, 0.500 >  // <- Direction
   }
   color_map {
     [0.000 rgbft <1.000,0.000,0.000,0.000,0.000>]
     [0.534 rgbft <0.000,1.000,0.000,0.000,0.000>]
     [1.000 rgbft <0.000,0.000,1.000,0.000,0.000>]
   }

}


-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: can't i rotate a pigment?
Date: 8 May 2015 02:58:43
Message: <554c5ea3$1@news.povray.org>
On 7-5-2015 20:04, Anton Sherwood wrote:
> On 2015-5-07 10:16, Anton Sherwood wrote:
>> I'll try this:
>>
>>     object {
>>         ...
>>         rotate -N*y
>>         pigment { Tufte }
>>         rotate N*y
>>         }
>
> No luck.
>
No surprise: You rotate /the object/ a certain value around the y-axis, 
apply the pigment, rotate the object back the same value. You have not 
rotated /the pigment/ itself.

However, if the pigment is a slope pattern (along y-axis I suppose) I do 
not expect much to happen if you rotate it around the y-axis in any case.

-- 
Thomas


Post a reply to this message

From: Anton Sherwood
Subject: Re: can't i rotate a pigment?
Date: 8 May 2015 03:18:00
Message: <554c6328@news.povray.org>
On 2015-5-07 23:58, Thomas de Groot wrote:
> No surprise: You rotate /the object/ a certain value around the y-axis,
> apply the pigment, rotate the object back the same value. You have not
> rotated /the pigment/ itself.

Why not?  Generally

	object { ...
		texture { foo }
		translate ...
		}

is not the same as

	object { ...
		translate ...
		texture { foo }
		}

> However, if the pigment is a slope pattern (along y-axis I suppose)
> I do not expect much to happen if you rotate it around the y-axis
> in any case.

Not even if it's built of slopes along, say, some other vector(s)?

-- 
*\\* Anton Sherwood *\\* www.bendwavy.org


Post a reply to this message


Attachments:
Download 'tufte.inc.txt' (1 KB)

From: Anton Sherwood
Subject: Re: can't i rotate a pigment?
Date: 8 May 2015 03:19:14
Message: <554c6372$1@news.povray.org>
As there's only one object in the scene, I sidestepped the problem by 
rotating the object *and* the camera while letting the pigment stay put.

-- 
*\\* Anton Sherwood *\\* www.bendwavy.org


Post a reply to this message

From: Thomas de Groot
Subject: Re: can't i rotate a pigment?
Date: 8 May 2015 03:27:21
Message: <554c6559$1@news.povray.org>
On 8-5-2015 9:17, Anton Sherwood wrote:
> On 2015-5-07 23:58, Thomas de Groot wrote:
>> No surprise: You rotate /the object/ a certain value around the y-axis,
>> apply the pigment, rotate the object back the same value. You have not
>> rotated /the pigment/ itself.
>
> Why not?  Generally
>
>      object { ...
>          texture { foo }
>          translate ...
>          }
>
> is not the same as
>
>      object { ...
>          translate ...
>          texture { foo }
>          }
>

Hmm yes. I stand corrected for that one :-)

>> However, if the pigment is a slope pattern (along y-axis I suppose)
>> I do not expect much to happen if you rotate it around the y-axis
>> in any case.
>
> Not even if it's built of slopes along, say, some other vector(s)?
>

You are tickling the limits of my knowledge ;-)  Slope is a difficult 
pattern to use in my experience and I always need a lot of 
experimentation to get it right.

I shall need to make a test scene to see what happens. Back soon.

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: can't i rotate a pigment?
Date: 8 May 2015 03:54:46
Message: <554c6bc6$1@news.povray.org>
On 8-5-2015 9:19, Anton Sherwood wrote:
> As there's only one object in the scene, I sidestepped the problem by
> rotating the object *and* the camera while letting the pigment stay put.
>

After testing, I can confirm that it is not possible to rotate a slope 
pattern, in contrast to other patterns. Even more puzzling, I can 
confirm that this is true too when applying the pigment and then 
rotating the object: the pigment remains unchanged and does not rotate 
with the object.

I do not know if this is a bug or is intentional. If the latest case, 
the documentation does not mention it while at the same time indicating 
the use of Pigment Modifiers in the example.

I believe we need the voice of an expert now.

-- 
Thomas


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

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