1
\$\begingroup\$

If I want to use no textures in a game (ie. no png images), could I just break down my drawing into triangles, combined into the shape I want to draw, and draw those triangles instead?

For example, I found this in Google Images, showing how an "arrow" graphic could be drawn as a triangle mesh instead of a textured sprite:

Diagram of an arrow decomposed into triangles on graph paper

\$\endgroup\$
3
  • 1
    \$\begingroup\$ The image is interesting but insufficient to explain what you want or how to accomplish it. Please add more detail. I'm voting to close for this same reason, but I wanted you to improve your question early. This question seems like it could be good if fleshed out. \$\endgroup\$ Commented Mar 28, 2014 at 19:45
  • \$\begingroup\$ @SethBattin I'm trying to figure out how to make it better. My goal here is to figure out how to draw my textures/sprites without using .pngs, but rather straight OpenGL. \$\endgroup\$
    – Jasmine
    Commented Mar 28, 2014 at 23:21
  • 1
    \$\begingroup\$ That's fine, I am just suggesting that you add it to your question's text. You posted an idea and an image; elaborate a little bit. \$\endgroup\$ Commented Mar 28, 2014 at 23:27

2 Answers 2

2
\$\begingroup\$

Yes, you can do that exactly as you describe.

I made a 2D game a few years ago where an artist decided to make all our "sprites" as meshes in Blender, due partly to a limitation in the v1.0 of the engine that didn't support textures (the engine I wrote for the shipping version did, but the character art was already made and the meshes were smaller than the corresponding rasterized sprite sheets would have been).

Note that that arrow is a bad example of triangularization. You want to avoid long and thin triangles. Rasterization hardware often works in such a way that works more slowly with long and thin triangles than with shorter triangles. This desire to avoid long triangles applies to many other contexts where triangularization is used, like navmesh generation.

\$\endgroup\$
0
-1
\$\begingroup\$

I would suggest using alpha blended textures instead, as simpler alternative.

The texture would then look like this, and instead of triangulating it you just draw one textured quad with it:

a

The big advantage is that you will have much greater artistic control over it, since you can create textures like this with almost any application and can replace them by more complex sprites if you ever want to.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .