|
![](/i/fill.gif) |
I'm looking for an optimisation. I've used material_map in the past to
control finish properties like reflectivity, specular properties and so on.
Based on a procedure posted some time ago on this news group (in 2000, I
think) I do something like
texture {
material_map {
tga "specular_map.tga"
#declare Count = 1;
#while (Count <= 255)
texture {
pigment { rgb 1 }
finish {
specular (Count/255)
}
}
#local Count = Count + 1;
#end
}
}
The above is wrapped in a simple macro that accepts arbitrary pigments and
specular map file names and spits out the texture. It works, but it takes a
long time to parse. For example, I tried this with a 14.5MB mesh and a
1024x1024 specular map stored as a TGA file. On disk, this TGA
file (RLE compressed) is a few hundred K. If I load the specular map
into a dummy texture but don't use it in the above code (i.e. I don't use
specular mapping) then the parse time is 15 seconds (and a 640x360 takes
about 4 seconds to render). If I then remove the dummy and use the specular
map in the above code, I get a parse time of 32 seconds, which I would like
to reduce greatly. Even with specular mapping on the render time remains
between 4 and 5 seconds, which I was very happy with.
Now, this inflated parse time is maybe not too bad - if it's a disk access
issue then it should disappear when I render from a RAMdisk. However, if
anyone knows a more efficient way to achive the same result then I might be
able to avoid a RAMdisk altogether (desirable, since I'm going to be doing
animation). If it's not a disk access issue then I'm looking for a more
minimalist approach that produces the same result. Does anyone know of such
a way? I am using POVRay 3.6.1 on Windows XP (service pack 2)
Post a reply to this message
|
![](/i/fill.gif) |