This is a blatant act of minimalism; even this description is going to be succinct. This snippet is a simple demonstration of using text in 3D space.
There is nothing new here, but it is good for learners to be aware of this facilitation.
Features heavy use of
Matrix1 commands. (Yes, single parameter ink command, RGB colours with alpha channel and image drawing commands)
There are practically no comments in the snippet because it is so simple.
There are three planes used to handle drawing of text on screen with different lighting settings and manipulation.
This opens the door for HLSL text shading and brings the best of the text and 3D command libraries together.
For experimental computer scientists out there, might be a good idea to play around with
Madbits billboard plugin to create animated text.
This is also a principle that supports the use of particle systems to be used for text effects.
` Minimalistic 3D Billboard Text
Chris Tate
[email protected]
`======================
#CONSTANT NAVY_BLUE 0x000070
Make Object Plane 1, 1024, 128
Make Object Plane 2, 1024, 128
Make Object Plane 3, 1024, 128
Make Image 1, 1024, 128
Draw To Image 1
Set Text Size 64
CLS NAVY_BLUE
Center Text 512, 32, "Use Opaque Billboards!"
Make Image 2, 1024, 128
Draw To Image 2
Center Text 512, 32, "Use Transparent Billboards!"
Make Image 3, 1024, 128 : YRotate Object 3, 180 : Fix Object Pivot 3
Draw To Image 3
Ink RGB(200,255,128,50)
Center Text 512, 32, "Hello, I always face the camera!"
Draw To Bitmap 0
Texture Object 1, 1 :
Texture Object 2, 2 : Set Object Transparency 2, 1 : Set Object Light 2, 0
Texture Object 3, 3 : Set Object Transparency 3, 1 : Set Object Light 3, 0
Move Object Up 2, 128
Move Object Up 3, 384
Set Object Cull 1, 0
Sync Rate 30
Do
Control Camera Using ArrowKeys 0, 16, 1
Turn Object Left 1, 0.3
Turn Object Right 2, 0.3
Set Object To Camera Orientation 3
Loop