(2018-02-17, 21:47)Michael Horvath Wrote: A couple of observations.
1. slope bricks are not bumpy/grainy like they should be
2. at the POV-Ray newsgroups we came up with some code to add blurred reflections to models:
Unfortunately, there's no way to differentiate between ABS (solid) and Polycarbonate (clear) plastics. Could you add another column to the `ldColor` array for the `BlurAmount` value, in addition to `ior`? It would be great.
1:
Those would require .dat changes and an extension to the texture map spec to allow for bump maps or something like that.
2:
You could check on alpha being <1.0 ( ldColor[getColorIndex(ldCode)][4]<1.0 ) for transparent ones.
If you need an extra parameter you could declare an array for mapping the odd ones, e.g.
Code:
#declare ldColorBlurCount=3;
#declare ldColorBlur=array[ldColorBlurCount][2] {
{2, 0.25},
{7, 0.4},
{256, 0.7}
}
#macro getColorBlur(ldCode)
#local result=-1
#local i=0;
#while (result=-1 & i<ldColorBlurCount)
#if (ldColorBlur[i][0]=ldCode)
#local result=i
#else
#local i=i+1;
#end
#end
#if (result>=0)
ldColorBlur[i][1];
else //def
1.0
#end
#end
FYI: did you notice you can apply your modifications to material definitions in the %appdata%/LDCad/povray/default/colors.pov file to avoid to have to post process each export. Or copy the default map so you can choose which set of scripts to use during export.