I need to export a terrain mesh from my 3ds scene to a text format so that I can read it into my game. I would like some additional data about the faces of the triangles exported as well such as what surface type ( concrete, grass, dirt ) they represent. Is there a way of assigning additional data about faces in 3ds max and then a way to export to a text file that I can read.
0
votes
1 Answers
0
votes
For a custom human-readable file, you can use the MAXScript language – there are many exporter scripts to look at and/or modify (search google for MAXScript csv export, for example) and a set of chapters in the MAXScript reference. The surface type you are asking for sounds just like material ID (so you'd use getFaceMatID for that). If you need to store/retrieve more info, there's also simpleFaceManager. Depending on how you'll be using the text file output, you can either directly write to a fileStream or use something more advanced such as XmlDocument.