[Nebula2] problems and solutions when using 3dmax7 and nmaxtoolbox to export models to nebul-A2

Source: Internet
Author: User
1. Length Unit
If opende is used in nebula2, the length unit is generally used as the metric meter (you can also adjust the gravity acceleration quality and other units as needed ).
The length unit of internal data can be adjusted within 3dmax.
Customise-> units setup...-> System Unit setup
To any unit, you only need to ensure the Unit
Display Unit
Scale), the 'data' size during export is the value viewed in measure.
The nebula export options contains a scale geometry.
If you change the value of by to 1.0, the size remains unchanged. (The default value is 0.01. We recommend that you set System
Unit is centimeter,

The display unit is meters to ensureProgramThe unit of the length used in is the same as the unit used in model creation)

2. Coordinate Axis
3dsmax is the coordinate axis of the right hand side, and the positive direction of the Z axis is up. Nebula2 is the right hand, and the Y axis is positive and upward. This change is automatically converted when nmaxtoolbox is exported.

3. Rendering node surround box offset
After a series of transformations are performed on the non-skeleton model, the result is that the intransformnode node of the entire model is inconsistent with the intransformnode endpoint of the actual object. In

An error is returned when the object is visible and dropped.
There are two solutions: first, reset after model transformation
Convert XForm to editable mesh again
The second is that the visible reduction of all objects in the program is not in the unit of model, but in the actual nshapenode. (This method is only an assumption and has not been tried)

4. Hierarchical Model Animation
When the parent-child relationship is set between models, the child model will be affected by the parent Model Animation, such as simulating two different axial joints of the monitor probe. You only need to set the relative animation process of the Parent and Child respectively.

5. Assembly connection between bone animation and models in the program
The model can get the assembly point by binding the skeleton, but the assembly point bone direction needs to be set to the direction (0, 0) (that is, to point to the positive direction of the X axis of 3dsmax) to get the model to the top.
In the program, the transformation matrix of the assembly point skeleton can be taken directly to the transformation matrix of the assembly model.
For example, the turret of a tank is assembled above the tank. The barrel is assembled at the front of the turret.
// Set tank Tower
MX. ident ();
MX. rotate_y (this-> tower_turn.x); // horizontal steering of tank turret
If (this-> joint [0])
{
MX * = This-> joint [0]-> getmatrix (); // assemble the skeleton
}
MX * = mx_tank; // tank Transformation Matrix
This-> tower-> transform (). setmatrix (MX );
This-> tower-> render ();

// set Tank Gun
MX. ident ();
MX. rotate_x (this-> tower_turn.y); // turn the barrel up and down
If (this-> joint [1])
{< br> MX * = This-> joint [1]-> getmatrix (); // barrel mounted on Turret
}< br> MX. rotate_y (this-> tower_turn.x); // horizontal turret rotation
If (this-> joint [0])
{< br> MX * = This-> joint [0]-> getmatrix (); // Turret mounted on tank
}< br> MX * = mx_tank; // transformation matrix of tank

This-> gun-> transform (). setmatrix (MX );
This-> gun-> render ();
6. Create and export shadow bodies
Shadow is used to generate shadow.
Volume and nebula2 can generate shadow only when the model creates the corresponding shadow.
Volume.
There are two types of shadow: static shadow and skinned shadow.
The Shadow must be closed. Otherwise, the generated shadow will display excess films at the boundary.
Multiple shadow bodies can overlap or overlap.
You can copy the original model and modify the mesh to create a shadow in 3dsmax.
Options is shadow and then exported.
If you use skinned
Shadow, add the modifier Skin to the Shadow body, and then select include mesh for final export.
Options modifier re-export (which may be a defect in nmaxtoolbox). Otherwise, the shadow is considered as a normal model during export.

Add shadow
The closure of the Shadow must not only add holes in the shadow model, but also unify the texture of the shadow to the same texture space if the shadow is a multi-texture copied from the original model, otherwise, the exported shadow will split the shadow into multiple models that are not closed Based on Multiple textures.

======================================

Release nmaxtoolbox in use. The modification content is as follows:
1.
Export the castshadows parameter from the light source, and export the lightrange parameter from the point light source (omni/Point) (the default value is 500.f)
2.
Material export renderpri parameter, which is used in nebula2 for rendering and sorting of Objects
3.
Default texture value: use the default value defined in shaders: shaders. XML (only supports ambientmap0, bumpmap0, diffmap0). The latest official updates support all types of textures, but the default values are fixed for each type.
4. To work with shadow2 of nebula2, The shadow2 separately exports the mesh file:
Static
Shadow exports mesh files with the suffix _ shadow. The vertex format is coord,
3 float
Skinned
Shadow exports mesh files with the suffix _ skinnedshadow. The vertex format is coord,
Weight, jindices, 11 float
5. The export menu does not call nviewer.

:
Http://zikaizhang.googlepages.com/nmaxtoolbox_2006_10_12.exe

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.