POV-Ray : Newsgroups : povray.tools.poser : Future implementations of Poseray. A wish list : Re: Future implementations of Poseray. Place of uv_mapping code Server Time
27 Apr 2024 16:08:21 EDT (-0400)
  Re: Future implementations of Poseray. Place of uv_mapping code  
From: Thomas de Groot
Date: 12 Nov 2009 08:22:01
Message: <4afc0bf9@news.povray.org>
"Ive" <"ive### [at] lilysoftorg"> schreef in bericht 
news:4afbe599@news.povray.org...
>
> I see your point but as I do never use the material files as generated by 
> PoseRay this would force me to also edit the geometry file every time I 
> convert an object file. I *need* separate control about the pigment or 
> normals or both being uv_mapped for multiple reasons.
>
> A solution that should help us both would be to put the uv_mapping 
> statement directly into the texture block and not into the pigment/normal 
> blocks like:
>
> material {
>   texture {
>     uv_mapping
>     pigment {MyPigment}
>     normal {MyNormal}
>   }
> }
>
> As far as I do remember this does also solve the transparency by alpha 
> channel problem.
>

Yes indeed. This is also the solution proposed by Clipka by the way and it 
is certainly more elegant. My suggestion was just a step back to an earlier 
version, but I admit that it is not the most ideal.

When using a transparency map instead of using the alpha channel, the code 
in Poseray should then also be as follows (note the place of uv_mapping) 
e.g.:

//Material definitions
#declare MyTexTex__opaque=
texture {
  uv_mapping
  pigment { p_map1}
  normal {MyNormal}
  finish {MyFinish}
}
#declare MyTexTex_=
material {
  texture {
    uv_mapping
    pigment_pattern { p_map2}
    texture_map {
      [0 MyTex__opaque]
      [1 pigment {Clear}]
    }
  }
}

Thomas


Post a reply to this message

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