POV-Ray : Newsgroups : povray.general : Nested uv_mapping Server Time
25 Nov 2024 15:39:35 EST (-0500)
  Nested uv_mapping (Message 1 to 3 of 3)  
From: David Given
Subject: Nested uv_mapping
Date: 8 Dec 2013 09:49:46
Message: <52a4870a$1@news.povray.org>
So I have:

texture {
	uv_mapping function { ...something in terms of x and y... }

	texture_map {
		[... Texture1]
		[... Texture2]
		[...etc...]
	}
}

Looking at the results, it appears that the uv_mapping transformation of
the texture coordinates doesn't just apply to the outer texture's
function; it also applies to Texture1, Texture2 etc. That is, the inner
textures are calculated in terms of (u,v) as well.

Is there a way I can get the inner textures to be calculated in terms of
(x,y,z) and only have the uv_mapping being applied when selecting a
texture from the texture_map?

-- 
┌─── dg@cowlark.com ─────
http://www.cowlark.com ─────
│ "There does not now, nor will there ever, exist a programming
│ language in which it is the least bit hard to write bad programs." ---
│ Flon's Axiom


Post a reply to this message

From: Alain
Subject: Re: Nested uv_mapping
Date: 8 Dec 2013 14:01:35
Message: <52a4c20f@news.povray.org>
Le 13-12-08 09:49, David Given a écrit :
> So I have:
>
> texture {
> 	uv_mapping function { ...something in terms of x and y... }
>
> 	texture_map {
> 		[... Texture1]
> 		[... Texture2]
> 		[...etc...]
> 	}
> }
>
> Looking at the results, it appears that the uv_mapping transformation of
> the texture coordinates doesn't just apply to the outer texture's
> function; it also applies to Texture1, Texture2 etc. That is, the inner
> textures are calculated in terms of (u,v) as well.
>
> Is there a way I can get the inner textures to be calculated in terms of
> (x,y,z) and only have the uv_mapping being applied when selecting a
> texture from the texture_map?
>

Not tested.
Did you try using the UV maping inside the texture_map?

Something like this:
texture {
	//uv_mapping function { ...something in terms of x and y... }

	texture_map {
		[... uv_maping Texture1]
		[... Texture2]
		[...etc...]
	}
}


Post a reply to this message

From: David Given
Subject: Re: Nested uv_mapping
Date: 9 Dec 2013 07:11:04
Message: <52a5b358$1@news.povray.org>
On 08/12/13 19:01, Alain wrote:
[...]
> Not tested.
> Did you try using the UV maping inside the texture_map?

That doesn't work, but you gave me an idea, and this does:

    texture
    {
	pigment_pattern
	{
	    uv_mapping function { x }
	    pigment_map
	    {
	        [0 rgb <0, 0, 0>]
		[1 rgb <1, 1, 1>]
	    }
        }
	
	texture_map
	{
            [0 XYZ_Texture]
            ...
        }
    }

XYZ_Texture is evaluated using XYZ coordinates, even though the texture
is selected using the U ordinate. It's kind of evil, but it works. Thanks!

-- 
┌─── dg@cowlark.com ─────
http://www.cowlark.com ─────
│ "There does not now, nor will there ever, exist a programming
│ language in which it is the least bit hard to write bad programs." ---
│ Flon's Axiom


Post a reply to this message

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