|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
[Running Windows 10]
This might be old news, although I could not find a reference to it in a
newsgroup search.
An interior_texture cannot be pre-#declared in the usual way. The following
constructs do not parse in either 'official' v3.7.0 or 3.8 beta 1, fatal errors:
#declare INT_TEX_1A =
interior_texture{pigment{rgb <.2,.2,1>} finish{ambient .1 emission 0 diffuse
..8}}
or...
#declare TEX_2 =
texture{pigment{rgb <.2,.2,1>} finish{ambient .1 emission 0 diffuse .8}}
#declare INT_TEX_2 = interior_texture{TEX_2}
or as a #default...
#default{interior_texture{pigment{rgb <1,.4,.1>} finish{ambient .1 emission 0
diffuse .8}}}
However, it *can* be pre-#declared by using a 'material' wrapper, which is
undocumented:
#declare TEX_4 =
material{
interior_texture{
pigment{rgb <.2,.2,1>}finish{ambient .1 emission 0 diffuse .8}
}
}
I assumed that an interior_texture and a 'regular' texture were similar entities
under-the-hood, but apparently not(?)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Kenneth" <kdw### [at] gmailcom> wrote:
> [Running Windows 10]
>
> This might be old news, although I could not find a reference to it in a
> newsgroup search.
>
> An interior_texture cannot be pre-#declared in the usual way. The following
> constructs do not parse in either 'official' v3.7.0 or 3.8 beta 1, fatal errors:
>
> #declare INT_TEX_1A =
> interior_texture{pigment{rgb <.2,.2,1>} finish{ambient .1 emission 0 diffuse
> ..8}}
>
> or...
>
> #declare TEX_2 =
> texture{pigment{rgb <.2,.2,1>} finish{ambient .1 emission 0 diffuse .8}}
> #declare INT_TEX_2 = interior_texture{TEX_2}
>
> or as a #default...
>
> #default{interior_texture{pigment{rgb <1,.4,.1>} finish{ambient .1 emission 0
> diffuse .8}}}
>
> However, it *can* be pre-#declared by using a 'material' wrapper, which is
> undocumented:
>
> #declare TEX_4 =
> material{
> interior_texture{
> pigment{rgb <.2,.2,1>}finish{ambient .1 emission 0 diffuse .8}
> }
> }
>
> I assumed that an interior_texture and a 'regular' texture were similar entities
> under-the-hood, but apparently not(?)
A shot in the dark!
Did you try
texture{TextureA}
interior_texture{TextureB}
in an object?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
What you can do is declare it as a regular texture, and then invoke it using the
interior_texture keyword.
Think about it like object {}.
Once you already have a "thing" declared, you can USE that object {} in
something like a CSG - but I don't believe that you can do it all in one go.
(as in: object {sphere {0, 1}} )
[I don't have the parser handy to check]
So in the same way, you need to make a "thing" - your texture - and THEN you can
USE that texture in a construct to assign it as the interior_texture.
(and yes, I've tried declaring an interior_texture in exactly the way you're
trying to, and was initially irked until I grasped the paradigm.)
- BW
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Leroy" <whe### [at] gmailcom> wrote:
>
> A shot in the dark!
> Did you try
> texture{TextureA}
> interior_texture{TextureB}
> in an object?
Yes, that's the way (the only way, AFAIK) to actually *use* an
interior_texture-- a FIRST 'texture' needs to come before it, for use in an
object for example.
But I'm beginning to see what you and B.E. mean:
> So in the same way, you need to make a "thing" - your texture - and THEN you
> can USE that texture in a construct to assign it as the interior_texture.
Ah, I get it: No need to #declare the interior_texture *as* such, but just as a
'regular' texture which is then plugged in appropriately. It works:
#declare TEX_5 =
texture{pigment{rgb <1,0,0>} finish{ambient .1 emission 0 diffuse .8}}
#declare TEX_6 = // not yet an 'interior' one
texture{pigment{rgb <0,0,1>}finish{ambient .1 emission 0 diffuse .8}}
box{0,1
texture{TEX_5}
interior_texture{TEX_6}
}
In any case, I'm still a bit perplexed that an interior_texture can't be
#declared *by itself* beforehand (except in a material wrapper, as mentioned; I
came across that solution only by experimenting.) Of course, *both* the initial
texture and the interior one could be wrapped as a pair inside a 'material'
statement, and #declared as a single entity for use later.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|