POV-Ray : Newsgroups : povray.beta-test : NEW FEATURE: Suggesting "aka" (Textures) : Re: NEW FEATURE: Suggesting "aka" (Textures) Server Time
28 Apr 2024 20:17:00 EDT (-0400)
  Re: NEW FEATURE: Suggesting "aka" (Textures)  
From: Alain
Date: 20 Dec 2015 14:12:41
Message: <5676fda9@news.povray.org>
Le 15-12-20 01:17, Sven Littkowski a écrit :
> The new feature I am describing here might not be of much use for
> regular scenes, but I think, it comes handy for testing purposes.
>
> Let me give an example.
>
> I want to test a complex scene, because I had added some new parts to
> it. I copy parts of the complex scene into a new file, and simplify the
> requested textures of the original file (textures with large images,
> complicated functions, or multiple textures) like this:
>
> #declare TSimplified = texture
> {
>   pigment { rgb < 0.50, 0.50, 0.50 > }
> }
>
> #declare TA = texture { HullGray50 }
> #declare TB = texture { HullGray50 }
> #declare TC = texture { HullGray50 }
> #declare TD = texture { HullGray50 }
> #declare TE = texture { HullGray50 }
> #declare TF = texture { HullGray50 }
> #declare TG = texture { HullGray50 }
> #declare TH = texture { HullGray50 }
> #declare TI = texture { HullGray50 }
> #declare TJ = texture { HullGray50 }
> #declare TK = texture { HullGray50 }
> #declare TL = texture { HullGray50 }
> ...
>
> This way, I avoid loading a number of large pictures, or calling
> functions that slow down the test renders of the test scene. But as you
> see, I have to declare for each texture again and again.
>
> -------------------------------------------
>
> Here my suggestion. Please have a look to the declaration:
>
> #declare TSimplified aka(TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL) = texture
> {
>   pigment { rgb < 0.50, 0.50, 0.50 > }
> }
>
> Or, using the keyword "all" inside the brackets, this texture becomes
> placeholder for all used textures within that scene:
>
> #declare TSimplified aka(all) = texture
> {
>   pigment { rgb < 0.50, 0.50, 0.50 > }
> }
>
> -------------------------------------------
>
> Knowing that many scene developers use describing names for their
> various texture declarations, maybe we could even think about a feature
> that applies the simplified test texture for all textures containing the
> one or another word, here again an example:
>
> #declare TSimplified aka(all("gray","Hull")) = texture
> {
> pigment { rgb < 0.50, 0.50, 0.50 > }
> }
>
> This last example would apply the simplified test texture only to all
> those textures, that contain the string "gray" and/or the string "Hull".
> The number of strings to be added to the keyword "all" in brackets can
> range from one to x strings (any amount or so, if that would make sense).
>
> The strength of this new proposed feature ("all") is, that it can
> replace with only one line all existing requested textures. Or, just a
> number of them (something the "Quality" command line feature does not
> give to you). So you achieve a partial simplification while you can keep
> high details on other areas.
>

A common practice for that is to have a controll variable declared early 
in the scene, and use some #if()...#else...#end constructs.

For example:
#declare Final = 0;
...
#if(Final)
	#declare My_Texture texture{Some_Complicated_Texture}
#else
	#declare My_Texture texture{pigment{rgb<1,0,1>}}
#end

or

#declare Test = 1;
...
#if(Test)
	#declare My_Texture texture{pigment{rgb<1,0,1>}}
#else
	#declare My_Texture texture{Some_Complicated_Texture}
#end


When you construct your scene, you set the controll variable to sellect 
the simplified textures, and set it to use the advanced textures when 
you are finished with constructing the geometry.

You may also try the quick_colour feature and use +q1 on the command 
line. That cause most advanced, and some not so advanced, features to be 
turned off, such as area_light, radiosity, photons, shadow computation, 
reflection and transparance,...


Alain


Post a reply to this message

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