[Unity] 3.3 create a model with 3ds Max 2015 and import it to Unity, 3 dsunity

Source: Internet
Author: User
Tags unity 5

[Unity] 3.3 create a model with 3ds Max 2015 and import it to Unity, 3 dsunity

Classification: Unity, C #, VS2015

Date of creation: I. Introduction to commonly used 3D software

Because the modeling function of the Game Engine itself is relatively weak, neither professionalism nor freedom can be compared with professional 3D software, therefore, most of the models, animations, and other resources in the game are produced through professional 3D software. After the production is complete, import it into Unity for use.

Unity supports almost all mainstream 3D file formats, such as. FBX,. dae, 3Ds,. dxf, And. obj. Among them, the most commonly used 3D modeling software are: 3Ds Max, Blender, Maya ,...... .

After you export files to the resources folder of the Unity project in 3Ds Max, Blender, or Maya, Unity will automatically update these resources and then use them in the project.

1. 3ds Max

Autoscaling 3D studio Max (3ds Max or MAX) is a PC-based 3D animation rendering and production software developed by Autodesk. 3ds Max is widely used in advertising, film and television, industrial design, architectural design, 3D animation, multimedia production, games, auxiliary teaching, and engineering visualization.

The file extension for 3ds Max 2015 (16.9 for business) is ". you can use the fbx export plug-in provided by this software to export data directly. fbx files (this plug-in is automatically included during installation ).

After the. fbx file exported using this software is imported to Unity, the grid (Meshes), texture (Textures), animation (Animations), and Bones are supported.

2. Maya

Autodesk Maya is a 3D software developed by Autodesk in the United States. Its application field is specialized in film and TV advertisements, role animation, and film stunt. Maya provides excellent 3D modeling, animation, special effects, and rendering functions. It is a high-end 3D production software for movies. Maya can run on Windows, Mac OS, and other operating systems.

After the. fbx file exported using this software is imported to Unity, the grid (Meshes), texture (Textures), animation (Animations), and Bones are supported.

3. Blender

Blender is an open-source, cross-platform, all-around 3D software. It provides a series of animated short film production solutions, including modeling, animation, material, rendering, audio processing, and video editing. Blender uses Python as the built-in script and supports the Yafaray Renderer. It also has a built-in game engine and rich functions.

After the. fbx file exported using this software is imported to Unity, the grid (Meshes), texture (Textures), animation (Animations), and Bones are supported.

4. Cinema 4D

Cinema 4D is a set of 3D software developed by Maxon Computer in Germany. It is famous for its high computing speed and powerful rendering plug-ins. Cinema 4D is widely used and has outstanding performance in advertising, film, industrial design and other aspects. It is becoming the preferred choice for many stream artists and film companies.

After the. fbx file exported using this software is imported to Unity, the grid (Meshes), texture (Textures), animation (Animations), and Bones are supported.

5. LightWave

LightWave is a cost-effective 3D animation production software developed by NewTek, USA. It is extremely powerful in biological modeling and role animation. The rendering Module Based on ray tracing, light energy transmission, and other technologies makes its rendering quality perfect. LightWave version 11.5 (or later) has become a powerful 3D animation software that supports most operating systems and has a consistent operating interface for each operating system.

After the. fbx file exported using this software is imported to Unity, the grid (Meshes), texture (Textures), animation (Animations), and Bones are supported. Ii. How to import the model to the Unity Project

When you import a 3D model created using other software, Unity will express it as many different objects, including game objects and grids (you can skin the model based on the import options) animation clips (AnimationClip. In the folder under the Project, the leading object is the Model Prefab ).

For Mesh, The Mesh Filter component must be used to attach the imported Mesh to the game object. To make the Mesh visible, the game object must also be attached with a Mesh Renderer or other rendering components. With these components, the mesh can be visible at the location of the game object (GameObject). The exact appearance of the mesh depends on the material used by the Renderer.

Mesh filters are combined with Mesh Renderer to make the model appear on the screen.

The Unity grid import program provides many options to control grid generation and associate it with its texture and material.

1. Export the model to. fbx or. obj format.

In this way, you first use a 3D software to export a 3D file, such as A. FBX or. OBJ file, and then import the exported 3D file to Unity.

This is the recommended method.

Advantages:

  • Export only the required data
  • Use verifiable data (re-import to 3D resource package in Unity)
  • Files are usually smaller
  • Modular approaches are encouraged-for example, selecting different components based on the collision type or interactivity.
  • Other 3D packages are supported (not in its proprietary format ).

Disadvantages:

  • The pipeline of the prototype and iteration will lead to a slower running speed.
  • It is easy to lose version information records between source work files and game data (such as exported FBX.
  • Direct import of professional 3D software engineering documents

In this way, you can directly import a 3D application file to Unity. For example, you can directly import a. Max file created using 3DS max or a. Blend file created using Blender.

This method is generally not used.

Advantages:

  • Fast iteration process (saving time for source files and Unity re-import)
  • Simplified initial stage.

Disadvantages:

  • License copies must be installed on all machines that use the Unity project.
  • Useless data will greatly increase the file capacity.
  • Too many files reduce the speed of Unity updates.
  • This increases the difficulty of troubleshooting.

3. Scale Factor and File Scale)

The default measurement unit of Unity is "meters". If you want to import models created by other professional 3D software to Unity 5.3.4, you need to set the scaling factor if you want the models to be the same as the original size, the default proportional relationship is as follows:

When importing 3ds Max, set the scaling factor to 0.01.

When importing Lightwave, set the scaling factor to 0.01.

When importing Maya, set the scaling factor to 100.

When importing Cinema4D, set the scaling factor to 100.

If it is an imported file, Unit will provide a file zoom ratio, which is actually the zoom factor.

The following describes the procedure through examples. Iii. Example-import the. fbx model created with 3ds Max 2015 to Unity

The following uses 3ds Max 2015 (16.9 for business) as an example to describe how to create a model using professional 3D software and how to import the created model to Unity.

1. Solve the Problem of the 3ds Max 2015 display driver first

I don't know why. The display driver (Direct3D 2015) recommended by 3ds Max 11.0 cannot display models normally on my computer. It can only display wireframes. To solve this problem, you need to change the display driver first. The specific method is: Run 3ds Max 2015, choose Custom> preferences on the main menu, and change display driver to Direct3D 9.0 in the pop-up window ", as shown in:

After the modification, restart 3ds Max 2015 to display the model or wiremap normally (F3 switch ).

2. Set the measurement unit

Because. when the fbx model is imported to Unity, the default scaling factor is 0.01. To ensure that the size of the created model is consistent after being imported to Unity, you can set the system unit and display unit of 3ds Max 2015 to "Centimeter ". The following describes the procedure.

Start 3ds Max 2015, choose Custom> unit settings, as shown in the left-side figure below. In the pop-up interface on the right, set "display unit ratio" to "Centimeter ":

Click the system unit Settings button on the right. In the displayed page below, set the system unit proportion to "cm ":

Click OK to complete unit settings.

3. Create a cube

Create a cube with a length, width, and height of 100cm and move its position to the coordinate origin. As shown in:

4. Export the model to. fbx format

Select the created cube and choose export> export selected object to export the model to a file named Box001.fbx. As shown in.

Remember the location of the exported file for future use.

Another easier way is to directly import the model to a folder of the Unity project, in this way, you can directly double-click the model in the Unity project to open 3ds Max 2015 and edit the model. After the model is edited, Unity will automatically update the model without copying it.

To demonstrate how to import an existing model, the example in this section does not directly Save the model to the Unity Project (this method is described in the following example ).

5. Import the model to Unity

Run Unity, open the ch03Demos project, and then import the Box001.fbx file exported from 3ds Max 2015. (if there are other files and folders, import them one by one) drag and Drop to the Models folder under the Assets folder of the project view:

Observe the viewer and you can see that the [File Scale] of this model is 0.01, and the [Scale Factor] is 1:

6. Use the imported Model

Drag and Drop Box001.fbx to the hierarchical view and adjust its position, as shown in:

7. Textures

Drag and Drop the brick Texture in the Texture folder to Box001 in the hierarchical view to see the effect of the model Texture in the scene:

Through this example, we understand the basic operation steps from creating models with 3ds Max 2015 to importing and using these models in Unity. Later, you can create models by yourself, you can also directly import various complex models created by others.

Related Article

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.