|
|
/*
right=up.eye
eye=right.up
up=eye.right
*/
#declare campos = <0,80,-250>;
#declare cameye = vnormalize(<20,12,0>-campos);
#declare camup = <0,1,0>;
#declare camright = vnormalize(vcross(camup,cameye));
#declare camup = vnormalize(vcross(cameye,camright));
#declare FontSize = _clamp(1.7,0.1,2);
#declare camang = 40;
camera {
location campos
right camright
up camup *(image_height/image_width)
direction cameye*(image_height/image_width)
angle camang
}
#macro label(Text,objv,r,col)
#local vl = vlength(objv-campos)/88;
#local pnt = camup*((r*.95)+vl*FontSize)+objv;
#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.28)
scale <vl*FontSize,vl*FontSize,vl*FontSize>
popmatrix(vnormalize(vcross(camup,eye)),vnormalize(vcross(eye,vcross(camup,eye))),eye,pnt)
no_shadow
}
#end
label("HELLO 162",<60,24,80>,48,<0.0196, 0.0196, 0.2156>)
label("Here are 492",y* 29.9,24*.8,<0.30196, 0.0196, 0.2156>)
so u can likely tweak to get the result
Post a reply to this message
Attachments:
Download 'labels9.png' (213 KB)
Preview of image 'labels9.png'
|
|