|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Good morning,
Newbie here. I've been going through an old pov script for the Enterprise
and updating the code so it works in 3.5. Mostly what I have been doing
is tacking semicolons on declare statements and adding the pigment keyword
to textures to make the color fly right. But now I've run into something
that
I can't get to work. Here is the code:
#declare Line = texture
{ gradient <0 0 1>
color_map
{ [0 0.0005 color Gridgray color Gridgray]
[0.0005 1 color Clear color Clear ]
}
scale <1 1 25>
}
#declare Saucer_top_texture = texture
{ Line
color_map
{ [0 0.0005 color Gridgray color Gridgray]
[0.0005 1 color Hullcol color Hullcol ]
}
specular layer_specular
}
I've messed with it and can't get it right. The first thing I did was
enclose
the gradiant and color map in the Line texture inside a set of pigment
braces,
like this:
#declare Line = texture
{ pigment
{ gradient <0 0 1>
color_map
{ [0 0.0005 color Gridgray color Gridgray]
[0.0005 1 color Clear color Clear ]
}
}
scale <1 1 25>
}
That allowed that statement to work, but it hung on the next one. Looking
at the old 3.1g documentation, I believe that the second statement is merely
a layered texture. And reading 2.7.10.1 Declaring Layered Textures gave
me the impression that leaving off the texture wrapper in the second state-
ment was my problem. I've been fooling with it for an hour now and I can't
get it to run.
Any help would be appreciated.
Thanks, Miker
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
ZSpider wrote:
I think you just need some commas:
#declare Line = texture
{ pigment
{ gradient <0, 0, 1>
color_map
{ [0, 0.0005 color Gridgray color Gridgray]
[0.0005, 1 color Clear color Clear ]
}
}
scale <1, 1, 25>
}
/Ib
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi!
I rewrote the code to 3.5 syntax. Is this what you need?
#declare Line =
texture{
pigment {
gradient z // <0,0,1>
color_map {
[0 color Gridgray]
[0.0005 color Clear]
}
scale <1,1,25>
}
}
#declare Saucer_top_texture =
texture {Line}
texture {
pigment {
gradient z // ??
color_map{
[0 color Gridgray]
[0.0005 color Hullcol]
}
}
finish {specular layer_specular}
}
This could of course be done in several ways.. I rewrote it the way you did,
but I'd prefer to do it like this:
#declare Texture1 = texture {...}
#declare Texture2 = texture {...}
#declare Layered_Texture =
texture {Texture1}
texture {Texture2}
or
#declare Layered_Texture =
texture {...}
texture {...}
A better way, IMHO!
Note that I haven't tried the texture on an object, but it parses. (You have
to #declare Gridgray.. etc. Of course.)
I reccomend DOC reading for color_map : "6.7.1.3 Color maps"
Hope this helped.
-Peter
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thank you, Ib and Peter. You guys got me back on the road again!
I need to look over what you sent me and figure out why yours
worked and mine didn't. I've found that some of the old files take
quite a bit of reworking to make them 3.5-compatible!
Thanks again, Miker
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Well, bad news. I finally had to give up on converting the Enterprise
model to 3.5. There were a huge amount of textures, and apparently
the syntax has changed quite a bit over the years. Besides the problems
I already outlined, I started running into problems with image maps in
the textures, which I believe has been changed over to a material map.
It comes down to textures containing a pretty complex set of parameters,
and as a newbie it was just too much for me.
Thanks anyway, Miker
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |