2
\$\begingroup\$

I'm building a game engine in OpenTK (OpenGL for C#). Is it ossible to take a terrain mesh (in any format) and convert it into a text file (or a really small character-filled file, no more than a few bytes). Then, afterwards, I'd take that file and generate the terrain from it.

The only reason I'm doing this is to save some memory on the computer. I think it would be more efficient if we had to quickly generate a crude terrain, and then smooth it instead of loading in a large mesh file.

Is this possible, and if so, how could I do it?

\$\endgroup\$
1
  • \$\begingroup\$ Take a look at the .obj model files they are essentially what you are looking for. \$\endgroup\$ Commented Sep 28, 2014 at 20:54

1 Answer 1

5
\$\begingroup\$

I think the obj file format is what you need. OBJ is pretty commonly used in 3D graphics, and it's a text file. You will need to walk through your mesh properties and write your own file. Then you'll be able to load and display it.

\$\endgroup\$
1
  • \$\begingroup\$ Glad it helped. And thank you, @jhocking for the edit. \$\endgroup\$ Commented Sep 29, 2014 at 14:28

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.