|
![](/i/fill.gif) |
Alain <aze### [at] qwerty org> wrote:
> > Hello Povray users!
> > I have a quite annoying problem which I've been trying to figure out for the
> > last
> > month...please help. The thing is have exported model with given texture(and
> > there are lots of elements with the same texture) the texture looks like that:
> >
> > texture
> > {
> > uv_mapping
> > pigment
> > {
> > color<0, 0, 0>
> > transmit 0.5
> > filter 1
> > }
> > finish
> > {
> > diffuse 1
> > ambient 0
> > }
> > }
> > }
> > I have declared another texture:
> >
> > #declare Milky =
> > texture{
> > pigment
> > {
> > rgbft<1, 1, 1, 0.4, 0.5>
> > }
> > finish
> > {
> > diffuse 1.5
> > ambient 0
> > specular 0.2
> > phong 0.4
> > roughness 0.1
> > reflection 0.05
> >
> > }}
> > And now the question is: HOW TO REPLACE THE EXPORTED TEXTURE WITH THE NEW ONE
> > ON ALL THESE ELEMENTS??
> >
> >
> >
> >
>
> If the texture is present as a texture block everywhere, you need to
> replace is with: texture{Milky} everywhere it's used.
>
> Do a search in the exported file for "texture".
> Then, you replace the content of the texture with "Milky".
>
> You also can remove all texture and use this:
>
> IF the exported file #declare the objects:
> object{ExportedObjectName texture{Milky}}
>
> Or, like this:
> union{object{Object001}
> object{Object002}
> ...
> texture{Milky}
> // Optional transforms
> scale<1,1,1>
> rotate<0,0,0>
> translate<0,0,0>
> }
>
> IF you include the file to place the objects (there are NO #declare in
> the file):
> union{
> #include "ExportedFile.inc"
> texture{Milky}
> // Optional transforms
> scale<1,1,1>
> rotate<0,0,0>
> translate<0,0,0>
> }
>
> If there is a #declare statement for it, you only need to change it's
> #declare to read as: #declare Texture=texture{Milky}
>
>
>
>
> Alain
Alain thank you for your reply. Following your tips I have made something like
that (those are the initial lines from my scene):
#declare Milky =
texture{
pigment
{
rgbft <1, 1, 1, 0.4, 0.5>
}
finish
{
diffuse 1.5
ambient 0
specular 0.2
phong 0.4
roughness 0.1
reflection 0.05
}}
#declare Texture=texture{Milky}
unfortunately it doesn't work (the elements keep their original texture) Did I
miss something?
Post a reply to this message
|
![](/i/fill.gif) |