View Full Version : creating text in a 3D world
dsdsdsdsd
01-13-2005, 09:23 PM
hello;
I would like to have a sign in a 3d world, hanging from a wall maybe or a sign in front of a building;
the text that I would like to display will come from a variable value: this_var = "hello";
any thoughts on how to get text into a 3D world;
thanks
Shannon Burnett
Asheville NC USA
wowens
01-14-2005, 09:17 PM
The Lingo script below is from Paul Catanese's book "Director's Third Dimension". There are additional scripts used in preceding frames to initialize the Director movie. However, this should get you started in the right direction. I would strongly recommend buying Mr. Catanese's book. It is the best book on the subject of 3D programming in Macromedia Director.
create3Dtext("nameofmodel", "textyouwanttoextrude", font, fontsize, tunneldepth, rgb(r,g,b))
global scene
on create3Dtext modelname, whattext, whatfont, whatsize, howdeep, whatcolor
if scene.model(modelname) = void then
newtext = new(#text)
newtext.font = whatfont
newtext.fontsize = whatsize
newtext.text = whattext
res = member(newtext).extrude3D(scene)
newtext.erase()
res.tunneldepth = howdeep
obj = scene.newmodel(modelname, res)
shd = scene.newshader(modelname & "shd", #standard)
shd.diffuse = whatcolor
shd.texture = void
obj.shaderlist = shd
return obj
else
return false
end if
end
dsdsdsdsd
01-16-2005, 06:44 PM
wowens, thanks for your response;
I am unfamiliar with that book but I think I have come across the name "Catanese";
I should have specified in my post that I was looking for a way to put text fields literally into a 3d world; maybe not literally - but essentially a surface with text on it; for instance a virtual 3D restaurant would need a menu hanging outside of it's front door;
and the text will come from a variable and will contain several thousand characters;
I have toyed with the idea of 3D text and removing the back face and the tunnel faces from the extruded text;
OR turning text fields into a bitmap and then applying as a texture on a shader;
it will be a few days before I get back into the text issue;
thanks
Shannon Burnett
Asheville NC USA
wowens
01-17-2005, 08:28 AM
Shannon -- I believe Paul Catanese's book also covers turning text into a texture and then appling the new texture onto a 3D plane.
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.