POV-Ray : Newsgroups : povray.newusers : UV texture scale center Server Time
23 Nov 2024 10:36:53 EST (-0500)
  UV texture scale center (Message 1 to 10 of 19)  
Goto Latest 10 Messages Next 9 Messages >>>
From: Mr
Subject: UV texture scale center
Date: 22 Jan 2015 09:10:00
Message: <web.54c103967eea5e3a6ee70590@news.povray.org>
Hello, I am meeting a problem with the scale keyword used for texture, it seems
that the POV scale factor and repetition factor in Blender do not use the same
center. I would guess that Blender seems to scale the texture from the zero of
the UV space, like in this picture, it is scaled by half (repeat factor of 2)
http://www.pasteall.org/pic/show.php?id=82692
while POV maybe from the 1, I don't know can someone tell me?
it's result, with a scale of 0.5 is this:
http://www.pasteall.org/pic/show.php?id=82693

My goal is to have both pictures always the same whatever the blender interface
parameters for texture scale are.
I don't know if this has always been the case, it seems that some images
rendered
with early 3.7 betas did not behave this way and were more consistent with
Blender renders, but I may be wrong.


Post a reply to this message

From: clipka
Subject: Re: UV texture scale center
Date: 22 Jan 2015 10:10:38
Message: <54c112ee$1@news.povray.org>
Am 22.01.2015 um 15:06 schrieb Mr:
> Hello, I am meeting a problem with the scale keyword used for texture, it seems
> that the POV scale factor and repetition factor in Blender do not use the same
> center. I would guess that Blender seems to scale the texture from the zero of
> the UV space, like in this picture, it is scaled by half (repeat factor of 2)
> http://www.pasteall.org/pic/show.php?id=82692
> while POV maybe from the 1, I don't know can someone tell me?
> it's result, with a scale of 0.5 is this:
> http://www.pasteall.org/pic/show.php?id=82693
>
> My goal is to have both pictures always the same whatever the blender interface
> parameters for texture scale are.
> I don't know if this has always been the case, it seems that some images
> rendered
> with early 3.7 betas did not behave this way and were more consistent with
> Blender renders, but I may be wrong.

In POV-Ray, if you scale any texture, the origin of scaling is at 
<0,0,0>. For UV-mapped textures, UV-mapping is applied after scaling 
(you're UV-mapping the scaled texture).

At least that's what should happen. If closer investigation shows it 
doesn't, please let us know.


Post a reply to this message

From: Alain
Subject: Re: UV texture scale center
Date: 22 Jan 2015 14:28:08
Message: <54c14f48@news.povray.org>

> Hello, I am meeting a problem with the scale keyword used for texture, it seems
> that the POV scale factor and repetition factor in Blender do not use the same
> center. I would guess that Blender seems to scale the texture from the zero of
> the UV space, like in this picture, it is scaled by half (repeat factor of 2)
> http://www.pasteall.org/pic/show.php?id=82692
> while POV maybe from the 1, I don't know can someone tell me?
> it's result, with a scale of 0.5 is this:
> http://www.pasteall.org/pic/show.php?id=82693
>
> My goal is to have both pictures always the same whatever the blender interface
> parameters for texture scale are.
> I don't know if this has always been the case, it seems that some images
> rendered
> with early 3.7 betas did not behave this way and were more consistent with
> Blender renders, but I may be wrong.
>
>
>
>

Apart from the lighting and highlights, those two images are prety 
similar. The details are prety much in the same locations.

Remember that in POV-Ray, ALL transforms are always relative to the 
origin : <0,0,0>


Post a reply to this message

From: Mr
Subject: Re: UV texture scale center
Date: 24 Jan 2015 05:30:00
Message: <web.54c374131bfbdbf6c31ce6010@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 22.01.2015 um 15:06 schrieb Mr:
> > Hello, I am meeting a problem with the scale keyword used for texture, it seems
> > that the POV scale factor and repetition factor in Blender do not use the same
> > center. I would guess that Blender seems to scale the texture from the zero of
> > the UV space, like in this picture, it is scaled by half (repeat factor of 2)
> > http://www.pasteall.org/pic/show.php?id=82692
> > while POV maybe from the 1, I don't know can someone tell me?
> > it's result, with a scale of 0.5 is this:
> > http://www.pasteall.org/pic/show.php?id=82693
> >
> > My goal is to have both pictures always the same whatever the blender interface
> > parameters for texture scale are.
> > I don't know if this has always been the case, it seems that some images
> > rendered
> > with early 3.7 betas did not behave this way and were more consistent with
> > Blender renders, but I may be wrong.
>
> In POV-Ray, if you scale any texture, the origin of scaling is at
> <0,0,0>. For UV-mapped textures, UV-mapping is applied after scaling
> (you're UV-mapping the scaled texture).
>
> At least that's what should happen. If closer investigation shows it
> doesn't, please let us know.

So instead of this exemple:


 #declare MAT_MaterialTex =
texture{
    pigment_pattern {
        uv_mapping image_map{
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\SpecularTest.png"
map_type 0  interpolate 2 }
        translate <-0,0,0> scale <1,1,1>

    }
    texture_map {
        [0
            pigment {
                pigment_pattern {
                uv_mapping image_map{
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\AlphaTest.png"
map_type 0  interpolate 2 } translate <-0,-0,0> scale <1,1,1>}
                pigment_map {
                    [0 color rgbft<0,0,0,1,1>]
                    [1 uv_mapping image_map {
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\DiffuseTest.png"
map_type 0  interpolate 2 } translate <0.25,0,-1> scale <1.5,1,1>]
                }
            }
            finish {shader_MaterialTex0}
            normal {uv_mapping bump_map {
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\BumpTest.png"
map_type 0  interpolate 2   bump_size 10 } translate <-0,-0,0> scale <1,1,1>}
        ]
        [1
            pigment {pigment_pattern {uv_mapping image_map{
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\AlphaTest.png"
map_type 0  interpolate 2 }translate <-0,-0,0> scale <1,1,1>}
                pigment_map {
                    [0 color rgbft<0,0,0,1,1>]
                    [1 uv_mapping image_map {
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\DiffuseTest.png"
map_type 0  interpolate 2 } translate <0.25,0,-1> scale <1.5,1>]
                }
            }
            finish {shader_MaterialTex1}
            normal {uv_mapping bump_map {
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\BumpTest.png"
map_type 0  interpolate 2   bump_size 10 } translate <-0,-0,0> scale <1,1,1>}
        ]
    }
}

The shader should have other brackets? I can't seem to move the scale closer to
the texture.


Post a reply to this message

From: clipka
Subject: Re: UV texture scale center
Date: 24 Jan 2015 09:30:59
Message: <54c3aca3$1@news.povray.org>
Am 24.01.2015 um 11:29 schrieb Mr:

>   #declare MAT_MaterialTex =
> texture{
>      pigment_pattern {
>          uv_mapping image_map{
>
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\SpecularTest.png"
> map_type 0  interpolate 2 }
>          translate <-0,0,0> scale <1,1,1>
>
>      }
>      texture_map {
>          [0
>              pigment {
>                  pigment_pattern {
>                  uv_mapping image_map{
> "F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\AlphaTest.png"
> map_type 0  interpolate 2 } translate <-0,-0,0> scale <1,1,1>}
>                  pigment_map {
>                      [0 color rgbft<0,0,0,1,1>]
>                      [1 uv_mapping image_map {
> "F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\DiffuseTest.png"
> map_type 0  interpolate 2 } translate <0.25,0,-1> scale <1.5,1,1>]

                                         ^^^^^^^^^^^
Beware - you're moving the texture here, not just scaling it!

Note again that scaling /always/ has its origin at <0,0,0>; if you do 
this /after/ translation, it's no longer the <0,0> of the image, but 
rather its <-0.25,0>. To scale from the /image's/ <0,0>, you need to 
scale first, and only then translate; you'll probably need to fix the 
translation vector though:

     scale <1.5,1,1> translate <1.5,1,1>*<0.25,0,-1>


Post a reply to this message

From: Mr
Subject: Re: UV texture scale center
Date: 24 Jan 2015 15:05:01
Message: <web.54c3f9bf1bfbdbf6c31ce6010@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 24.01.2015 um 11:29 schrieb Mr:
>
> >   #declare MAT_MaterialTex =
> > texture{
> >      pigment_pattern {
> >          uv_mapping image_map{
> >
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\SpecularTest.png"
> > map_type 0  interpolate 2 }
> >          translate <-0,0,0> scale <1,1,1>
> >
> >      }
> >      texture_map {
> >          [0
> >              pigment {
> >                  pigment_pattern {
> >                  uv_mapping image_map{
> > "F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\AlphaTest.png"
> > map_type 0  interpolate 2 } translate <-0,-0,0> scale <1,1,1>}
> >                  pigment_map {
> >                      [0 color rgbft<0,0,0,1,1>]
> >                      [1 uv_mapping image_map {
> >
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\DiffuseTest.png"
> > map_type 0  interpolate 2 } translate <0.25,0,-1> scale <1.5,1,1>]
>
>                                          ^^^^^^^^^^^
> Beware - you're moving the texture here, not just scaling it!
>
> Note again that scaling /always/ has its origin at <0,0,0>; if you do
> this /after/ translation, it's no longer the <0,0> of the image, but
> rather its <-0.25,0>. To scale from the /image's/ <0,0>, you need to
> scale first, and only then translate; you'll probably need to fix the
> translation vector though:
>
>      scale <1.5,1,1> translate <1.5,1,1>*<0.25,0,-1>

This looks almost ok, thank you, but not yet :
Here is the Blender result
http://www.pasteall.org/pic/show.php?id=82782
it uses repeat factor of 0.75

And here is POV
http://www.pasteall.org/pic/show.php?id=82783
It uses scale factor of 1/0.75 = 1.33
and the method you advised for translation

the translate I have to add to get closer to the original is of <-0.175,0,0> but
this is not constant: with a slightly higher tiling number still under 1 it
reduces slightly closer to <0,0,0>

I'm at a loss. what's happening here?


Post a reply to this message

From: clipka
Subject: Re: UV texture scale center
Date: 24 Jan 2015 15:15:58
Message: <54c3fd7e$1@news.povray.org>
Am 24.01.2015 um 21:02 schrieb Mr:

> Here is the Blender result
> http://www.pasteall.org/pic/show.php?id=82782
> it uses repeat factor of 0.75
>
> And here is POV
> http://www.pasteall.org/pic/show.php?id=82783
> It uses scale factor of 1/0.75 = 1.33
> and the method you advised for translation
>
> the translate I have to add to get closer to the original is of <-0.175,0,0> but
> this is not constant: with a slightly higher tiling number still under 1 it
> reduces slightly closer to <0,0,0>
>
> I'm at a loss. what's happening here?

Can you post the generated POV-Ray code for this particular case?

My best bet is that you still have some translate lurking before the 
scaling.


Post a reply to this message

From: clipka
Subject: Re: UV texture scale center
Date: 24 Jan 2015 15:19:31
Message: <54c3fe53$1@news.povray.org>
Am 24.01.2015 um 15:30 schrieb clipka:

>> map_type 0  interpolate 2 } translate <0.25,0,-1> scale <1.5,1,1>]
>
>                                          ^^^^^^^^^^^
> Beware - you're moving the texture here, not just scaling it!
>
> Note again that scaling /always/ has its origin at <0,0,0>; if you do
> this /after/ translation, it's no longer the <0,0> of the image, but
> rather its <-0.25,0>. To scale from the /image's/ <0,0>, you need to
> scale first, and only then translate; you'll probably need to fix the
> translation vector though:
>
>      scale <1.5,1,1> translate <1.5,1,1>*<0.25,0,-1>

I think I wrote nonsense here: Translating after scaling, but with the 
scaling factor applied to the translation, has /exactly/ the same effect 
as your translating before scaling.

The proper question here would be, why is there a translate in there at 
all, and exactly what effect is it supposed to have?


Post a reply to this message

From: Mr
Subject: Re: UV texture scale center
Date: 24 Jan 2015 15:35:00
Message: <web.54c401291bfbdbf6c31ce6010@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 24.01.2015 um 15:30 schrieb clipka:
>
> >> map_type 0  interpolate 2 } translate <0.25,0,-1> scale <1.5,1,1>]
> >
> >                                          ^^^^^^^^^^^
> > Beware - you're moving the texture here, not just scaling it!
> >
> > Note again that scaling /always/ has its origin at <0,0,0>; if you do
> > this /after/ translation, it's no longer the <0,0> of the image, but
> > rather its <-0.25,0>. To scale from the /image's/ <0,0>, you need to
> > scale first, and only then translate; you'll probably need to fix the
> > translation vector though:
> >
> >      scale <1.5,1,1> translate <1.5,1,1>*<0.25,0,-1>
>
> I think I wrote nonsense here: Translating after scaling, but with the
> scaling factor applied to the translation, has /exactly/ the same effect
> as your translating before scaling.
>
> The proper question here would be, why is there a translate in there at
> all, and exactly what effect is it supposed to have?

The translate is there in many 3d editors. it's a bad legacy, but it alows to
offset a texture in the UV space if it's a tiled texture and yu don't want to
change the uv unwraping,  you can offset the texture itself. itc can be used as
a quick hack to hide some visible seam or pattern in textures not repeating too
much. For textures repeating a lot, some people use it to tweak the exact phase
regarding geometry of some tiled patterns (like pavement over some steps,
etc...)

Here is the complete scene for this particular case:


//----------------------------------------------
//--Exported with POV-Ray exporter for Blender--
//----------------------------------------------

#version 3.7;

//--Global settings--

global_settings {
    assumed_gamma 1.0
    max_trace_level 5
    ambient_light rgb<0, 0, 0>
}

//--Custom Code--

#declare CURFRAMENUM = 1;
//#include "/home/user/directory/animation_include_file.inc"

//--Patterns Definitions--


 #declare PAT_Alpha =
pigment {
}

#declare fPAT_Alpha=
function{pigment{PAT_Alpha}}



 #declare PAT_Bump =
pigment {
}

#declare fPAT_Bump=
function{pigment{PAT_Bump}}



 #declare PAT_Diffuse =
pigment {
}

#declare fPAT_Diffuse=
function{pigment{PAT_Diffuse}}



 #declare PAT_Specular =
pigment {
}

#declare fPAT_Specular=
function{pigment{PAT_Specular}}



//--Background--

background {rgbt<0.0509, 0.0509, 0.0509, 0>}

//--Cameras--

#declare camLocation  = <7.481132, 5.343666, 6.507640>;
#declare camLookAt = <-27.098163, 46.688390, -0.903519>;
camera {
    location  <0, 0, 0>
    look_at  <0, 0, -1>
    right <-1.7777777777777777, 0, 0>
    up <0, 1, 0>
    angle  49.134343
    rotate  <-27.098163, 46.688390, -0.903519>
    translate <7.481132, 5.343666, 6.507640>
}

//--Lamps--

light_source {
    < 0,0,0 >
    color rgb<1, 1, 1>
    fade_distance 14.999991
    fade_power 2
    matrix <-0.290865, -0.055189, -0.955171,  -0.771101, 0.604525, 0.199883,
0.566393, 0.794672, -0.218391,  -0.547114, 2.224058, -1.255785>
}
#declare lampTarget1= vrotate(<0.5471,-1.256,-2.224>,<0.6503,0.05522,1.866>);

//--Material Definitions--

#default{ pigment{ color rgb 0.8 }}
#declare shader_ = finish {  //translation of spec and mir levels for when no
map influences them
    diffuse 0.8
    phong 70.0
}

#declare shader_MaterialBlack = finish {  //translation of spec and mir levels
for when no map influences them
    brilliance 1.8
    phong 0.5
    phong_size 25.2
    diffuse 0.8 0
    ambient 1
    emission 0
    conserve_energy
}

#declare shader_MaterialTex = finish {  //translation of spec and mir levels for
when no map influences them
    brilliance 1.8
    phong 0.5
    phong_size 25.2
    diffuse 0.2 0
    ambient 1
    emission 0
    conserve_energy
}

#declare shader_MaterialTex0 = finish {  //No specular nor Mirror reflection
    brilliance 1.8
    specular 0
    diffuse 0.2 0
    ambient 1
    emission 0
    conserve_energy
}

#declare shader_MaterialTex1 = finish {  //Maximum Spec and Mirror
    specular 1
    diffuse 0.2 0
    ambient 1
    emission 0
    conserve_energy
}


//--Mesh objects--

#declare DATACube =
mesh2 {
    vertex_vectors {
        8,
        <1.000000, 1.000000, -1.000000>,
        <1.000000, -1.000000, -1.000000>,
        <-1.000000, -1.000000, -1.000000>,
        <-1.000000, 1.000000, -1.000000>,
        <1.000000, 0.999999, 1.000000>,
        <0.999999, -1.000001, 1.000000>,
        <-1.000000, -1.000000, 1.000000>,
        <-1.000000, 1.000000, 1.000000>
    }
    normal_vectors {
        6,
        <0.000000, 0.000000, -1.000000>,
        <-0.000000, -1.000000, -0.000000>,
        <1.000000, -0.000000, 0.000000>,
        <-1.000000, 0.000000, -0.000000>,
        <0.000000, 1.000000, 0.000000>,
        <0.000000, -0.000000, 1.000000>
    }
    uv_vectors {
        14,
        <0.000000, 1.000000>,
        <1.000000, 2.000000>,
        <-1.000000, 1.000000>,
        <0.000000, 0.000000>,
        <-1.000000, 0.000000>,
        <1.000000, -2.000000>,
        <2.000000, 1.000000>,
        <0.000000, 2.000000>,
        <2.000000, 0.000000>,
        <0.000000, -1.000000>,
        <0.000000, -2.000000>,
        <1.000000, 0.000000>,
        <1.000000, -1.000000>,
        <1.000000, 1.000000>
    }


 #declare MAT_MaterialTex =
texture{
    pigment_pattern {
        uv_mapping image_map{
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\SpecularTest.png"
map_type 0  interpolate 2 }
        translate <-0,0,0> scale <1,1,1>

    }
    texture_map {
        [0
            pigment {
                pigment_pattern {
                uv_mapping image_map{
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\AlphaTest.png"
map_type 0  interpolate 2 } translate <-0,-0,0> scale <1,1,1>}
                pigment_map {
                    [0 color rgbft<0,0,0,1,1>]
                    [1 uv_mapping image_map {
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\DiffuseTest.png"
map_type 0  interpolate 2 } scale <1.333,1,1> translate <1.333,1,1>*<0,0,0>]
                }
            }
            finish {shader_MaterialTex0}
            normal {uv_mapping bump_map {
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\BumpTest.png"
map_type 0  interpolate 2   bump_size 10 } translate <-0,-0,0> scale <1,1,1>}
        ]
        [1
            pigment {pigment_pattern {uv_mapping image_map{
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\AlphaTest.png"
map_type 0  interpolate 2 }translate <-0,-0,0> scale <1,1,1>}
                pigment_map {
                    [0 color rgbft<0,0,0,1,1>]
                    [1 uv_mapping image_map {
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\DiffuseTest.png"
map_type 0  interpolate 2 } scale <1.333,1,1> translate <1.333,1,1>*<0,0,0>]
                }
            }
            finish {shader_MaterialTex1}
            normal {uv_mapping bump_map {
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\BumpTest.png"
map_type 0  interpolate 2   bump_size 10 } translate <-0,-0,0> scale <1,1,1>}
        ]
    }
}


 #declare MAT_MaterialBlack =
texture{
pigment {rgbft<0, 0, 0, 0, 0>}
finish {shader_MaterialBlack}
}


 #declare MAT_MaterialTex =
texture{
pigment_pattern {
    uv_mapping image_map{
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\SpecularTest.png"
map_type 0  interpolate 2 }
    translate <-0,0,0> scale <1,1,1>

}
texture_map {
    [0
        pigment {
            pigment_pattern {
            uv_mapping image_map{
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\AlphaTest.png"
map_type 0  interpolate 2 } translate <-0,-0,0> scale <1,1,1>}
            pigment_map {
                [0 color rgbft<0,0,0,1,1>]
                [1 uv_mapping image_map {
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\DiffuseTest.png"
map_type 0  interpolate 2 } scale <1.333,1,1> translate <1.333,1,1>*<0,0,0>]
            }
        }
        finish {shader_MaterialTex0}
        normal {uv_mapping bump_map {
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\BumpTest.png"
map_type 0  interpolate 2   bump_size 10 } translate <-0,-0,0> scale <1,1,1>}
    ]
    [1
        pigment {pigment_pattern {uv_mapping image_map{
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\AlphaTest.png"
map_type 0  interpolate 2 }translate <-0,-0,0> scale <1,1,1>}
            pigment_map {
                [0 color rgbft<0,0,0,1,1>]
                [1 uv_mapping image_map {
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\DiffuseTest.png"
map_type 0  interpolate 2 } scale <1.333,1,1> translate <1.333,1,1>*<0,0,0>]
            }
        }
        finish {shader_MaterialTex1}
        normal {uv_mapping bump_map {
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\BumpTest.png"
map_type 0  interpolate 2   bump_size 10 } translate <-0,-0,0> scale <1,1,1>}
    ]
}
}
texture_list {
        2
 texture{MAT_MaterialBlack}

 texture{MAT_MaterialTex}
}
face_indices {
    12,
    <0,1,2>, 0,0,0,
    <0,2,3>, 0,0,0,
    <4,7,6>, 1,1,1,
    <4,6,5>, 1,1,1,
    <0,4,5>, 0,0,0,
    <0,5,1>, 0,0,0,
    <1,5,6>, 0,0,0,
    <1,6,2>, 0,0,0,
    <2,6,7>, 0,0,0,
    <2,7,3>, 0,0,0,
    <4,0,3>, 0,0,0,
    <4,3,7>, 0,0,0
}
normal_indices {
    12,
    <0,0,0>,
    <0,0,0>,
    <5,5,5>,
    <5,5,5>,
    <2,2,2>,
    <2,2,2>,
    <1,1,1>,
    <1,1,1>,
    <3,3,3>,
    <3,3,3>,
    <4,4,4>,
    <4,4,4>
}
uv_indices {
    12,
    <3,11,13>,
    <3,13,0>,
    <9,10,5>,
    <9,5,12>,
    <3,9,12>,
    <3,12,11>,
    <11,8,6>,
    <11,6,13>,
    <13,1,7>,
    <13,7,0>,
    <4,3,0>,
    <4,0,2>
}
interior {
    ior 1.000000
    caustics 0.5
}
radiosity {
    importance 0.5
}
}
//----Blender Object Name:OBCube----
object {
    DATACube
    matrix <-1.000000, -0.000000, -0.000000,  -0.000000, 0.000000, 1.000000,
0.000000, 1.000000, -0.000000,  0.000000, 0.000000, 0.000000>

}


Post a reply to this message

From: clipka
Subject: Re: UV texture scale center
Date: 24 Jan 2015 15:56:59
Message: <54c4071b@news.povray.org>
Am 22.01.2015 um 15:06 schrieb Mr:
> Hello, I am meeting a problem with the scale keyword used for texture, it seems
> that the POV scale factor and repetition factor in Blender do not use the same
> center. I would guess that Blender seems to scale the texture from the zero of
> the UV space, like in this picture, it is scaled by half (repeat factor of 2)
> http://www.pasteall.org/pic/show.php?id=82692
> while POV maybe from the 1, I don't know can someone tell me?
> it's result, with a scale of 0.5 is this:
> http://www.pasteall.org/pic/show.php?id=82693

I'm wondering right now, could it be that blender scales textures (at 
least when UV-mapped) from their center (i.e. <0.5,0.5>) rather than the 
corner (<0,0>)?

In that case you'd need to use:

     translate <-0.5,-0.5,0>
     scale <1/REPEAT_X,1/REPEAT_Y,1>
     translate <0.5,0.5,0>

or, to save one translate:

     scale <1/REPEAT_X,1/REPEAT_Y,1>
     translate <0.5-0.5/REPEAT_X,0.5-0.5/REPEAT_Y,0>

or:

     translate <0.5*REPEAT_X-0.5,0.5*REPEAT_Y-0.5,0>
     scale <1/REPEAT_X,1/REPEAT_X,1>


Post a reply to this message

Goto Latest 10 Messages Next 9 Messages >>>

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