POV-Ray : Newsgroups : povray.general : At-render texture blending : Re: At-render texture blending Server Time
30 Jul 2024 08:27:00 EDT (-0400)
  Re: At-render texture blending  
From: Reactor
Date: 29 Nov 2009 16:55:00
Message: <web.4b12ed6fdd0a65f9ffc2ddb80@news.povray.org>
"Siber" <nomail@nomail> wrote:
> Figured out some things, but there are still some missing peices.
>
> UV mapped textures can't be layered, but you can layer textures and then UV map
> them only afterward. My ancient photoshop wasn't saving out the alpha channel,
> but I found a format it would do so for. So now I can layer the textures
> properly, but when I try to use the recoloring macro from the other thread on
> the team and stripe layers, it errors out.
>
> "Parse Error: No matching } in 'texture', macro identifier found instead"
>
> This is with the exact same line that works if used in an unlayered texture by
> itself. Not perfectly, however. When I test it on it's own, it appears to lose
> it's transparency, which would make layering it somewhat useless.
>
> In an attempt to help you help me, I've packaged all the necessary files here:
> http://dl.dropbox.com/u/896078/UNH_FII.rar



I tried that and noticed that one of the files was named incorrectly -
UNH_FII_HULL_DIFFUSE.png was named UNH_FFI_HULL_DIFFUSE.png (note two 'F's
instead of two 'I's).  I renamed it and changed the wm_UNH_FII_HULL texture to
the function method I was describing:

//----------------- Begin Code:
#declare TEAMCOLOR = <1.0,0,0>;
#declare STRIPECOLOR = <0,0,1.0>;

#local TeamMap   = function { pigment{ image_map { "UNH_FII_HULL_TEAM.bmp"  } }
}
#local StripeMap = function { pigment{ image_map { "UNH_FII_HULL_STRIPE.bmp"} }
}


#declare wm_UNH_FII_HULL =
texture{ // underlying hull texture
     pigment{
         image_map{
             png "UNH_FII_HULL_DIFFUSE.png"
         }
     }
}
texture{ // Team colors
     pigment{
     function{ TeamMap(x,y,z).gray }
         color_map{
         [0.00 color rgbt 1 ]
         [1.00 color rgb TEAMCOLOR ]
             }
     }
}
texture{ // Stripe colors
     pigment{
     function{ StripeMap(x,y,z).gray }
         color_map{
         [0.00 color rgbt 1 ]
         [1.00 color rgbt STRIPECOLOR ]
             }
     }


     finish {
         ambient rgb <0.000000, 0.000000, 0.000000>
         diffuse 0.700000
         brilliance 1.000000
         metallic 0.000000
         specular 1.000000
         roughness 0.010000
     }
}

//----------------------
   -Reactor


Post a reply to this message

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