|
![](/i/fill.gif) |
When I create a tga in leveller and use it as a height-field, everything is
fine.
However, when I try and use the same tga as a pigment-function in a height
field, it looks like garbage.
I've been able to get around the problem by rendering an orthographic hf of the
tga, applying a gradient pigment, no lights and ambient 1, and then using the
resultant bitmap in my function.
Still, do any leveller users understand the problem? I have to say that loading
the leveller output into PSP shows a much more messy image than I'd expect -
closer to the iso-output than the hf output.
I've put a zip that will show the problem in scene-files.binaries.
Any ideas/insight?
Oh, one final question - I would expect:
F_Img(x,0,z).gray (where F_Img is the pigment function) to return a value
between 0 - 255, so F_Img(x,0,z).gray/255 would return a value between 0 -1.
This, however, returns a completely flat surface, and I find I have to use a
value of around gray/10 to get anything back at all. Huh?
--
#macro A(V,B,C,R)#while(B-256)#if(V-128/B>=0)sphere{0,.5translate<C-4R-1,9>
pigment{rgb<1-C/8R/2C/8>}}#local V=V-128/B;#end#local B=B*2;#local C=C+1;#
end#end A(234,1,0,2)A(85,1,0,1)A(81,1,0,0)light_source{-5 1}//Tom Melly
Post a reply to this message
|
![](/i/fill.gif) |