Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Idea for a future feature: text to mesh function

NatNat
edited February 2012 in Suggestions Posts: 143

How easy would it be to turn a font, size and text string to geometry that could be turned into a mesh?

Comments

  • Posts: 2,820

    It would really slow down the process of the program because I assume Codea would have to simplify (turn it to an image) the text, and then do the mesh. It would then have to test if you changed the text, and do it again.

  • NatNat
    Posts: 143

    Fonts are already stored as vectors, so there is no need to render them as images.

    I don't understand what you mean by testing if the text changes. This would be a function: pass in a string, font & font size, get back a mesh (or a table of points you can use to create a mesh).

  • Posts: 2,820

    @Nat - Sorry. I was confused. What I meant was that I thought that you would have to simplify the text to an image and then use mesh on the image, but I didn't understand that mash can work on vector objects (makes sense). Never mind that.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @Nat you mean turning each character into triangulated geometry? It's not possible in Codea at the moment since we don't expose that info (unless you were to render to texture then run a tracing algorithm on the resultant texture, then triangulate() it).

    We also deal with text at a higher level than that internally. It's a very interesting thought, though.

  • Posts: 2,820

    You could do it by using setContext(), right? I haven't tried it yet.

Sign In or Register to comment.