POV-Ray : Newsgroups : povray.general : At-render texture blending : Re: At-render texture blending Server Time
30 Jul 2024 02:23:27 EDT (-0400)
  Re: At-render texture blending  
From: Reactor
Date: 28 Nov 2009 05:15:01
Message: <web.4b10f729dd0a65f9d6eed2cf0@news.povray.org>
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote:
>
> I suppose you could do this for instance:
>
> #declare P = texture {plain code};
> #declare F1 = texture {fleet1 code};
> #declare F2 = texture {fleet2 code};
>
> #declare Plain is on;
> #declare Fleet1 = on;
>

> I suppose you could do this for instance:
>
> #declare P = texture {plain code};
> #declare F1 = texture {fleet1 code};
> #declare F2 = texture {fleet2 code};



But what if there will be more fleets in the future??

#declare TextureList = array[3]
{
texture { /* plain code  */ },
texture { /* fleet1 code */ },
texture { /* fleet2 code */ }
}

#declare FleetNumber = 1; // 0 would be plain, 1 would be fleet1, etc


Then, in the ships:
object{
    Ship
    texture{ TextureList[FleetNumber] }
}


Same idea, different implementation ;)

-Reactor


Post a reply to this message

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