"Unity" 3.4 imports existing 3DS Max models into Unity

Source: Internet
Author: User
Tags unity 5

Categories: Unity, C #, VS2015

Date Created: 2016-04-05 I. INTRODUCTION

In this section we use a "gun" model with a "bullet and load" animation, which describes the process of editing it in 3DS Max 2015 and importing it into unity.

The gun model described in this section can be found in the resources included with Unity 4.x from getting started to mastering and searching the Web yourself. Second, export Gun.max model to FBX format

1. Open Gun.max in 3DS Max 2015

Open the Gun.max file in 3DS Max 2015:

Click Play animation to observe the process of the bullet being loaded:

Click the go to Start button on the far left-back to frame No. 0, press the M key to eject the material editor to see the object's material name is gun, the material type is "standard" material, and the corresponding map has been specified on the diffuse map channel and on the Bump map channel:

Note: The 3DS max material supported by Unity includes: Standard, multi/sub-object (multi-dimensional sub-material), and you need to be aware that each sub-material must be a standard material. In addition, the name of the material should be as far as possible to match the name of the model, the proposal is named after English characters.

2. Export Gun.max to FBX format

After confirming the animation, the material is correct, then the resource is exported. Click the button in the upper-left corner and select export:

In the pop-up dialog box, select Save as type Autodesk (*. FBX) and save it to the assets folder of the Ch03demos project.

Again, although the path stored in the FBX file export is freely specified, if you export it directly to the assets folder in the Unity project, it will automatically refresh the resources in the Assets folder when you open the Unity project. This allows you to manually import resources into unity, which is very handy.

Click the Save button, and then, in the next dialog box that pops up, tick the check box under Animation, and the check box under Bake Animation:

Uncheck the "Camera" and "Lights" options to not import the camera and lights. Also, tick "Embed Media" to export the embedded resources:

Expand the view below to see the export of the FBX version when the y-axis is up-pointing:

Click the "OK" button to complete the export process.

Turn off 3DS Max 2015. Third, observing the GUN.FBX model in Unity

Run Unity 5.3.4f1 (64-bit), open the Ch03demos project, and observe the results of the 3DS Max 2015 export.

As soon as the Ch03demos project was opened, the following "Normalmap Settings" dialog box pops up because the model you just exported has a normal map:

Click Fix Now, and then you can see the imported model under assets:

1. Observe the imported model properties

The meanings of the properties in the viewer are as follows:

(1) Meshes

Grid.

Scale Factor: Scaling factor. If the imported model size is different, you can adjust the zoom factor by it.

Mesh Compression: Mesh compression. There are 4 options, off Wei not compressed, low, Medium, and high in turn represents the increase in compression values, the larger the compression value, the smaller the file size of the mesh, but it may cause the grid error. To adjust according to the actual situation.

Read/write enab!ed: Read/write Enabled. When checked, the grid can be read and written in real time, and is checked by default.

Optimize Mesh: Optimized mesh. When checked, the grid is optimized to accelerate unity rendering efficiency.

Cenerate colliders: Creates a collision body. Tick to create a collider for the imported object.

Swapuvs: Swapping Uvs. If the light map identifies the wrong UV channel, tick this option to swap the first and second UV channels.

Cenerate Lightmap: Generates a light map UV channel. Checking this option will produce the second UV channel used for the light map and will pop up the advanced options option, with the following parameters:

    • Hard Angle: Rigid edge angle. This option is used to control the threshold of the angle between adjacent triangles, which can be adjusted according to the shape of the mesh, and which edges will be processed as hard edges and seams. If you set this value to 180°, all corners will be rounded and the default value is 88 (88°).
    • Pack Margh: Tight interval. This option controls the interval of the UV coordinate cluster, minimizing the interval of the UV coordinate cluster, thus maximizing the generation of the illumination map resource with a default value of 4.
    • Ang!e Error: Angle error. The maximum UV angle error that may be caused by the angle of the mesh face is used to control the percentage of the similarity of the UV coordinate clusters based on the original mesh (the larger the value is, the more the triangular polygon). Setting a smaller value avoids problems when baking a light map, with the default setting of 8 (8%).
    • Area error: Face orange error. The largest UV surface of the mesh surface orange error, used to control based on the original mesh relative UV coordinate cluster area similarity percentage, this value is not set-a larger value can be more complete UV coordinate cluster, the default is not set 15 (15%).

(2) Normas & tangents

Normals and tangents.

Normas: Normal. Defines the normals of the mesh, with 3 items to choose from:

Import: Imports. This is the default option to import normals from the model file.

Cakulate: Calculation. According to smoothing angle calculation of normal, the selection will activate smooting angle slider, according to the angle threshold between the mesh surface to calculate the normal, the truth value can be adjusted between 0~18度, the default is 60 degrees.

None: None. Select this option if the model does not require a normal map mapping and does not require real-time illumination.

Tangens: Tangent. Defines how tangents are calculated and adjusts when the grid is given a normal map (for normal maps) with 3 options:

    • Import: Imports. The calculation of tangent and Vice normals in a way that is set up in a three-dimensional software can be understood as determining whether a normal map is computed based on the default in the three-dimensional software. Only files are. This option is only available when FBX,. Dae,. 3Ds,. dxf,. obj, and other formats are imported from a file.
    • Calculate: Calculation. The default option, which calculates the tangent and Vice Normals, is understood to calculate the normal map. This option is available only if the normal map has been imported and calculated.
    • None: None. Turning off Tangents and vice Normals is understood to not calculate normal maps. The mesh will not have tangents, so the normal map shader will not be supported.

Smoothing Angle: Smooth angle. The angle threshold of the mesh patch is not set and is used to adjust the normal map tangent.

Split tangents: Split tangent. Activating this option can fix seam problems if the model has seams due to normal maps.

(3) Material

Material.

Import naming: Imports materials. Tick the item and the system will replace the material on the FBX import with the default diffuse material.

Material naming: Material naming. Decide how unity materials are named. There are 3 options:

    • By base Texture name: According to the base map names. The diffuse map name in the imported material is used as the name of the object's material (if the imported material does not contain a diffuse map, unity will be named with the imported material name).
    • From model ' s Material: The material names from the models. Use the name of the imported model as the name of the object's material.
    • Mode name + model ' s Material: Model name + models material name. Use the name of the imported model plus the imported material name as the name of the object material.
    • Material Search: Material searches. Decide how unity depends on the material naming option to locate the appropriate material. There are 3 options:
    • Local Material folder: partial material folders. Search only in subfolders that are in the same folder as the model file.
    • Recursive-up: Up. Unity will search up all of the material subfolders in the Assets folder in turn.
    • Project-wide: Project scope. Unity will search for the material in the entire Assets folder.

2. Drag and drop the model into the scene

Drag and drop the model into a scene or hierarchy view, then zoom to rotate it to get the following effect:

Press <ctrl>+s to save the scene.

"Unity" 3.4 imports existing 3DS Max models into Unity

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.