Added and Revised Items in 1.2.0

Graphics

Animation

Particle

Troubleshooting:

How do I display more than one character having the same motion?

See Sharing Skeletons.

How do I dynamically change the world matrix of a model?

See Overwriting the world matrix of a node or bone.
For information regarding callbacks, also see Interupting updates or rendering using callbacks.

How do I set the visibility of a mesh using DCC node names

If the Mesh Visibility Mode option of the DCC exporter is set to Bind By Name, DCC node names, and a mesh visibility flag table corresponding those nodes, is output. This table can be used to look up and change a flag by name, allowing you to set mesh visibility using the DCC node name. The logical product of this flag and the visibility flag for the mesh itself is taken when drawing meshes.

Similar tables also exist for model resources and model instances. Flags actually referenced when drawing meshes are actually stored in the model instance table, so this table cannot be used to look them up by name. Therefore, when setting visibility, first get the index from the model resource table using name look-up, and then set the flag by specifying the index in the model instance table.

The sample code below is for setting invisibility for the node named Shield that belongs to the model.

Model* model;
int idx = model->GetResModel().GetMeshNodeVisibilitiesIndex("Shield");
NW_ASSERT(idx != -1); // Can't find node having the specified name
model->GetResMeshNodeVisibilities(idx).IsVisible = false;

You can also set animations for this visibility table. The method for setting animations is the same as for other visibility animations.

How do I get the scale for nodes and bones

See Handling Scaling.

Ambient light is not applied

Ambient light cannot be applied if one or more fragment lights does not exist. This is due to hardware restrictions.
If you want to apply an ambient light only, this can be done by adding a black colored fragment light.

Named visibilities at the node level under DCC are not enabled

Setting the Mesh Visibility Mode option of the DCC exporter to Bind By Name, sets visibility a t the node name level under DCC rather than using mesh numbers.

This visibility flag is saved in table format within the model class, rather than as a mesh. It must be obtained using nw::gfx::ResModel:GetMeshNodeVisibilitiesIndex and GetResMeshNodeVisibilities. In addition, the function IsMeshVisible is also available for returning the logical product of mesh visibilities and named visibilities.

Because these determinations are made automatically, you do not usually need to take them into consideration. However, if you have customized the render queue, visibility determination processing must also be changed as necessary. For details, see the implementation of nw::gfx::BasicEnqueueModelFunctor.

How do I change a bone pose using TransformAnimEvaluator::Bind and ChangeAnim?

When calling TransformAnimEvaluator::Bind and ChangeAnim, the bone pose changes at that point (even if animation evaluation is not being performed).
The value of each frame does not need to be written for elements not being animated. The bind pose only needs to be written once when calling Bind and ChangeAnim.

How do I execute an IsLightEnabled animation of a light?

IsLightEnabled animations are only enabled when the scene environment light set includes the target light.

The same is true when directly setting a flag without using animation.

How do I improve rough motion that results when changing the playback speed of a frame-format skeletal animation?

The value of a fractional frame is found using linear interpolation to find the value of the previous and next frame.
This algorithm emphasizes accuracy over speed.

How do I make the double buffer work smoothly?

Particle behavior such as particles not being displayed in locations where they should exist, particles being displayed in places where they shouldn't exist, and particles not moving smoothly may arise due to the VBO cache.

See the VBO explicit cache.

How do I change resource parameters?

See Changing Resource Parameters.

How do I change individual particle values?

See Changing Particle Information

How do I make the initializer disappear?

Sometimes after an attempt to change resources, the initializer cannot be found even if you search for it. This happens because the initializer has been deleted due to optimization.

See Conditions for Optimizing Streams to Parameters.

How do I execute a user-defined process on particles?

See User Updaters.

How do I change the size?

For details on enlarging or reducing the size of the coordinate syatem, see Usage of Each Scale.

See Enlarging and reducing particles during rendering.

The GPU hands after certain operations

A dual buffer is used for the command buffer. If CPU and GPU processes are executing in parallel and an operation that causes a change in the buffer accessed by the GPU occurs, rendering may not be performed correctly any longer and the GPU may hang.

The following operation should not be executed at a time when there may be access from the GPU (when particle rendering is not complete).

If the message "Vertex-lights or user-registers might be overridden by bone matrices." appears

This message indicates that vertex lights or user registers may have been overwritten by bone matrices.
If this message appears, be sure to either limit the number of bones using the DCC plug-in or reduce the number of vertex lights and user registers.
Since you can also reduce the number of usable bones by half by using the bone normal matrix, be sure to check that flag to.


CONFIDENTIAL