RE: LDCad POVray export
2018-02-18, 21:28 (This post was last modified: 2018-02-18, 21:29 by Michael Horvath.)
2018-02-18, 21:28 (This post was last modified: 2018-02-18, 21:29 by Michael Horvath.)
(2018-02-18, 21:01)Roland Melkert Wrote: 1:
Those would require .dat changes and an extension to the texture map spec to allow for bump maps or something like that.
For some reason I recalled L3P supporting parts with bumps, but this apparently is only true for LGEO parts. My mistake.
(2018-02-18, 21:01)Roland Melkert Wrote: 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
Yes, I can make my own array. But I was hoping for official support within LDCad.
(2018-02-18, 21:01)Roland Melkert Wrote: 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.
I already delete all colors from each POV file and simply link to an external INC file with colors in it. I do this for L3P and LDView, as well, so now I can swap between all three whenever I want to in any model.