|
|
oh right, now I remember. for bottom text, consider font height.
#macro label(Text,objv,r,col,top)
#local vl = vlength(objv-campos)/88;
#if (top)
#local pnt = camup*(r*1.05)+objv;
#else
#local pnt = -camup*(vl*FontSize+r)+objv;
#end
#local eye = vnormalize(pnt-campos);
object {
text {
ttf "Arial.ttf" Text 2 0
texture { pigment { rgb col } finish { ambient 1 diffuse 0 } }
}
translate x*(strlen(Text)*-0.25)
scale <vl*FontSize,vl*FontSize,vl*FontSize>
popmatrix(vnormalize(vcross(camup,eye)),vnormalize(vcross(eye,vcross(camup,eye))),eye,pnt)
no_shadow
}
#end
Post a reply to this message
Attachments:
Download 'golfdimples10.png' (87 KB)
Preview of image 'golfdimples10.png'
|
|