|
|
Op 4-4-2024 om 14:59 schreef Chris R:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> Op 3-4-2024 om 23:25 schreef Bald Eagle:
>>> "Chris R" <car### [at] comcastnet> wrote:
>>>
>>>> So, somewhere, the parsing for layered textures inside of a material is
>>>> different than the parsing of layered textures when declaring a texture
>>>> identifier.
>>>
>>> remove the texture {} wrapper
>>>
>>> https://wiki.povray.org/content/Reference:Layered_Textures
>>>
>>> You make a copy of the macro, and have a parallel macro with a slightly
>>> different name to make a texture rather than a material. Then your developer
>>> heart will avoid any mRNA induced myocarditis. :)
>>>
>>> Once you declare the texture, then I think you can use that in a final texture
>>> definition with any other modifiers. It seems to be just a matter of
>>> hierarchies and syntax at this point.
>>>
>>> And I can tell you from experience that that "just" can drive you crazy.
>>>
>>> - BE
>>>
>> Hmmm... doesn't seem to be as /simple/ as that... Have you tried this? I
>> am getting nowhere [drives me crazy indeed]
>>
>> --
>> Thomas
>
> A few posts back in this thread I posted my solution as an attachment.
> Essentially I did the following:
>
> 1. Modify the CRand macro:
> #macro CRand(Intensity)
> #local _t = texture { ... }
> _t
> #end
>
> 2. Rename the DakotaRedGranite(...) macro to DakotaRedGranite_texture(...)
> 3. At the end of the macro I did the following:
> #local _t_crand = texture { CRand(0.25) }
> #local _t_result =
> #if (Pol)
> ...
> #else
> #if (Type=1)
> texture {T1_DakotaRedFro}
> texture {_t_crand}
> #else
> texture {T1_DakotaRedFro}
> texture {T2_DakotaRedFro}
> texture {_t_crand}
> #end
>
> #end
>
> _t_result
>
> 4. Create a new macro named DakotaRedGranite(...)
> #macro DakotaRedGranite(...)
> #local _m = material {
> texture { DakotaRedGranite_texture(...) }
> interior { ior 1.6 }
> scale M_scale
> rotate M_rotate
> translate M_trans
> }
>
> _m
> #end
>
> That all seems to parse correctly and works.
>
> -- Chris R
>
Indeed. And I gave a few ideas for slight improvements on that, a couple
of days ago. Did you see those?
I am probably wrong, but I thought BE was referring to something else...
--
Thomas
Post a reply to this message
|
|