Beveled 3d text?

I’d like to know if I can generate beveled 3dtext as I’d do in 3dsmax. I think that I can generate 3d text (EXTRUDED text from a TrueType shaped font (directly from Unity or via extruding?-that’s would be another question-)) but I’d love to generate beveled text.

I’d love to generate this 3dtext through the Inspector panel via a general variable in order to have a text with such a similar aspect to the showed in the attatched image but without having to import each time each object etc.

Additionally I’ve found a script which is supposed can parse a string and this will give me much more power to what I desire to do.

So, 3 questions in one:
a).-May I create 3d EXTRUDED text from a 3dmesh text in Unity directly or I need an additional script to extrude it?. Till now what I’ve watched is a shape that you can handle as a 3dobject but not an extruded 3dtext.

b).-Do you know how to bevel a 3dtext shape?. Do you have any idea to implement this with a script?.

c).-Parse string works fine from: link text

alt text

Thank you very much.

I guess you can make your own font library, from 3D models, its gonna take some time and effort though. plus you'll end up with performance issues when you get enough text on the screen.

It's not a bad idea...

Well, you could write a ttf interpreter which creates text on the fly (as I assume the one in 3dsmax does)

ttf interpreter?...This what Unity3D has already implemented, hasn't it?. What I want is making an extruding instantaneously...You know: creating a font with its three dimensions. Does any script exist for doing this?...Another more ambicious question is cerating bevel effects.

1 Answer

1

You could make a really simple script out of this if you set up each letter on beforehand as a separate model.

Put the models in a folder called `Resources/Text/` where Resources is in the root of your Asset-folder.

Then do something like this:

#pragma strict
#pragma downcast

var text : String = "";

private var offset : float = 0.0;

function Start () {
    for (var letter in text.ToCharArray()) {
        if(letter!=" " && Resources.Load("Text/"+letter)!=null) {
            var letterGo : GameObject = Instantiate(Resources.Load("Text/"+letter), transform.position+Vector3(offset, 0, 0), Quaternion.identity);
            letterGo.transform.parent = transform;
        }
        offset+=4.0;
    }
}

You can do all sorts of nifty things with the offset, the size etc depending on uppercase/lowercase or any other variables after this.

There's also nothing that stops you from combining them into fewer meshes procedurally when they're instantiated.

Just as a footnote, extruding 3d-models out of vectors applying rounding will give you something to think about for a couple of days - but when you're done this will be gladly bought by many on asset-store. This is the quick(est?) version for a result.

Thank you very much. I've created my whole custom 3D objects for each letter exporting from 3DSMAX and now I know thanks to you how to take each object and instanciate if the name file is like the letter I want to instanciate...Other thing is making the extrude and much more making a bevel in the corners...Anyway, thank you.

I'd strongly recommend to use predefined objects for each letter. Not only will this take less time for you, it will be faster to initialize in the game. Good luck!