LDCad POVray export


RE: LDCad POVray export
#2
(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.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
LDCad POVray export - by Michael Horvath - 2018-02-17, 21:47
RE: LDCad POVray export - by Roland Melkert - 2018-02-18, 21:01
RE: LDCad POVray export - by Michael Horvath - 2018-02-18, 21:28
RE: LDCad POVray export - by Roland Melkert - 2018-02-18, 21:48
RE: LDCad POVray export - by Michael Horvath - 2018-02-18, 23:03
RE: LDCad POVray export - by Orion Pobursky - 2018-02-18, 23:31
RE: LDCad POVray export - by Michael Horvath - 2018-02-18, 23:43
RE: LDCad POVray export - by Orion Pobursky - 2018-02-18, 23:50
RE: LDCad POVray export - by Orion Pobursky - 2018-02-19, 2:05
RE: LDCad POVray export - by Michael Horvath - 2018-03-03, 12:18
RE: LDCad POVray export - by Philippe Hurbain - 2018-03-03, 13:10
RE: LDCad POVray export - by Roland Melkert - 2018-03-03, 18:06
RE: LDCad POVray export - by Roland Melkert - 2018-02-19, 18:34

Forum Jump:


Users browsing this thread: 1 Guest(s)