Max export plug-in

Source: Internet
Author: User

There are currently two options for writing the Max export plug-in: one is to use the max script and the other is to use the max SDK.
The use of the Max SDK is divided into the use of the Max standard API and IGame interface.

I use the IGame interface to write the Max export plug-in.
The IGame interface encapsulates game export based on the Max standard API and simplifies the call of complicated operations into a function, at the same time, you can obtain the data structure of the standard API through the IGame interface to perform some complex operations using the standard API.

To compile the Max export plug-in, you must first have a general understanding of the data organization form in Max.
Max data, whether material, skeleton, or grid, is stored in a tree structure. Each data is stored on the corresponding node, you can obtain the node type and convert it to the corresponding data for further export.
It should be noted that the export (material, animation, grid) commonly used for games is like this. Materials use an independent tree, and each material has sub-materials. Note the need to export the materials. Both the skeleton and the grid are stored under the scenario tree, and are marked to identify whether the node is a grid node or a skeleton node (or another node, the game generally only focuses on the grid and the skeleton ), convert the grid node to the grid type and call the pMesh-> SetCreateOptimizedNormalList (); pMesh-> InitializeData (); function to make the smooth group take effect. The transformation matrix of a skeleton node is taken out. This is not only a matrix of the skeleton animation, but also the SetStaticFrame (), which affects the skeleton transformation matrix, that is to say, if you want to perform a skeleton animation everywhere, you need to call this function to set the animation, so that the resulting skeleton transformation matrix can be used.

Here we will talk about the differences between the. x file and the. xml file of ogre.
. The x file can specify the material used by each triangle. Therefore, it can see that the mesh (or submesh) uses different materials, which is flexible in performance, however, the consequence of this is that the dp will be relatively high, because the triangle surface in the mesh cannot be rendered at a time due to different materials, that is, the rendering unit is the triangle surface rather than the grid.
In the case of A. X file, you cannot use numbers, and the names cannot appear in Chinese, which makes it difficult to display (ms's mview.exe ).

Ogre requires that all triangles in The subgrid use only the same material. Therefore, it has certain requirements for art production, but it can ensure that a subgrid is drawn in one dp, high efficiency.

 

This article from the CSDN blog, reproduced please indicate the source: http://blog.csdn.net/Leo1981816/archive/2010/04/25/5527190.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.