POV-Ray : Newsgroups : povray.beta-test : NEW FEATURE: Suggesting "aka" (Textures) Server Time
31 Oct 2024 20:10:56 EDT (-0400)
  NEW FEATURE: Suggesting "aka" (Textures) (Message 11 to 14 of 14)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Sven Littkowski
Subject: Re: NEW FEATURE: Suggesting "aka" (Textures)
Date: 20 Dec 2015 20:53:30
Message: <56775b9a@news.povray.org>
Yes, I know. It is just the amount of additional lines I tried to
prevent. :-)


Post a reply to this message

From: Sven Littkowski
Subject: Re: NEW FEATURE: Suggesting "aka" (Textures)
Date: 20 Dec 2015 20:56:07
Message: <56775c37$1@news.povray.org>
Loooooong time in place.   :-)

But it shows, that you made deep thoughts about this subject, respect to
that.   :-D

#declare ShowHullMidship         = on;
#declare ShowHullCommand         = on;
#declare ShowHullAntennas        = on;
#declare ShowHullHangars         = on;

#declare MyBackground            = "SL_Space_Scene_003"; // Wormhole
#declare ShowStarFleetComparison = off; // Enterprise


Post a reply to this message

From: Thomas de Groot
Subject: Re: NEW FEATURE: Suggesting "aka" (Textures)
Date: 21 Dec 2015 02:56:11
Message: <5677b09b$1@news.povray.org>
On 20-12-2015 15:20, clipka wrote:
> Here's a fun language construct for you:
>
>      #declare TSimplified = texture { ... }
>      #declare (TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,) = (
>        #for (I,1,12) TSimplified, #end
>      );
>
> (The extra comma at the end of the identifier list is intentional.)
>
> Needs POV-Ray 3.7.1-alpha.8141620 or later.
>

Hey! Thanks! This is a construct I didn't know about!


> - Wherever you use a pre-defined texture, use a macro call instead,
> passing the texture name as a string; thus, instead of this:
>
>      texture { MyTexture }
>
> you would now use:
>
>      Texture("MyTexture")
>
> - In the macro, define whatever rules you deem fit to select your
> texture, possibly making use of the Parse_String macro from strings.inc,
> like so:
>
>      #include "strings.inc"
>      #macro(TextureName)
>        #if(FullTextures)
>          texture { Parse_String(TextureName) }
>        #elseif(substr(TextureName,1,4) = "gray")
>          texture { ... }
>        #else
>          // nothing; don't apply any texture at all
>        #end
>      #end
>
>
> Note how this approach, even though using only existing features, can
> provide far more flexibility than your suggested mechanism could ever be
> designed to provide.
>

Yes, this is what I was struggling with above without success. I did 
something similar in one of my scenes but that was a simpler case. 
Thanks for this Christoph. I shall add this to my workflow.

-- 
Thomas


Post a reply to this message

From: Sven Littkowski
Subject: Re: NEW FEATURE: Suggesting "aka" (Textures)
Date: 21 Dec 2015 11:53:57
Message: <56782ea5$1@news.povray.org>
/signed


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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