1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"[]> 2<html xml:lang="en-US" lang="en-US"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../css/document.css" type="text/css" /> 7 <title>FAQ</title> 8 </head> 9 <body> 10 <h1 id="newlist1_2_0">Added and Revised Items in 1.2.0</h1> 11 <ul> 12 13 <li><a href="#gfx_global_ambient">Ambient light is not applied</a></li> 14 <li><a href="#gfx_mesh_node_visibility_unable">Named visibilities at the node level under DCC are not enabled</a></li> 15 <li><a href="#ptcl_gpuhungup">The GPU hands after certain operations</a></li> 16 17 </ul> 18 <h1>Graphics</h1> 19 <ul> 20 21 <li><a href="#gfx_shared_skeleton">How do I display more than one character having the same motion?</a></li> 22 <li><a href="#gfx_world_matrix">How do I dynamically change the world matrix of a model?</a></li> 23 <li><a href="#mesh_node_visibility">How do I set the visibility of a mesh using DCC node names</a></li> 24 <li><a href="#gfx_node_bone_scale">How do I get the scale for TransformNode and Bone?</a></li> 25 <li><a href="#gfx_global_ambient">Ambient light is not applied</a></li> 26 <li><a href="#gfx_mesh_node_visibility_unable">Named visibilities at the node level under DCC are not enabled</a></li> 27 28 29 </ul> 30 <h1>Animation</h1> 31 <ul> 32 <li><a href="#bind">How do I change a bone pose using TransformAnimEvaluator::Bind and ChangeAnim?</a></li> 33 <li><a href="#light_enabled">How do I execute an IsLightEnabled animation of a light?</a></li> 34 <li><a href="#koma_precision">How do I improve rough motion that results when changing the playback speed of a frame-format skeletal animation?</a></li> 35 </ul> 36 <h1>Particle</h1> 37 <ul> 38 <li><a href="#ptcl_flushvbo">How do I make the double buffer work smoothly?</a></li> 39 <li><a href="#ptcl_changeresource">How do I change resource parameters?</a></li> 40 <li><a href="#ptcl_changestream">How do I change individual particle values?</a></li> 41 <li><a href="#ptcl_optimizestream">How do I make the initializer disappear?</a></li> 42 <li><a href="#ptcl_userupdater">How do I execute a user-defined process on particles?</a></li> 43 <li><a href="#ptcl_drawoffset">How do I change the size?</a></li> 44 <li><a href="#ptcl_gpuhungup">The GPU hands after certain operations</a></li> 45 </ul> 46 47 <h1>Troubleshooting:</h1> 48 <ul> 49 <li><a href="#trouble_shader">If the message "Vertex-lights or user-registers might be overridden by bone matrices." appears</a></li> 50 </ul> 51 52 <!-- <GFX> --> 53 <h2 id="gfx_shared_skeleton">How do I display more than one character having the same motion?</h2> 54 <div class="section"> 55 See <a href="Coordinate.html#shared_skeleton">Sharing Skeletons</a>. 56 </div> 57 <h2 id="gfx_world_matrix">How do I dynamically change the world matrix of a model?</h2> 58 <div class="section"> 59 See <a href="Coordinate.html#world_matrix">Overwriting the world matrix of a node or bone</a>.<br /> For information regarding callbacks, also see <a href="AdvancedFeature.html#callback">Interupting updates or rendering using callbacks</a>. 60 </div> 61 <h2 id="mesh_node_visibility">How do I set the visibility of a mesh using DCC node names</h2> 62 <div class="section"> 63 <p> 64 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. 65 </p> 66 <p> 67 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. 68 </p> 69 <p> 70 The sample code below is for setting invisibility for the node named Shield that belongs to the model. 71 </p> 72 <pre> 73Model* model; 74int idx = model->GetResModel().GetMeshNodeVisibilitiesIndex("Shield"); 75NW_ASSERT(idx != -1); // Can't find node having the specified name 76model->GetResMeshNodeVisibilities(idx).IsVisible = false;</pre> 77 <p> 78 You can also set animations for this visibility table. The method for setting animations is the same as for other visibility animations. 79 </p> 80 </div> 81 <h2 id="gfx_node_bone_scale">How do I get the scale for nodes and bones</h2> 82 <div class="section"> 83 See <a href="Coordinate.html#node_bone_scale">Handling Scaling</a>. 84 </div> 85 86 <h2 id="gfx_global_ambient">Ambient light is not applied</h2> 87 <div class="section"> 88 <p> 89 Ambient light cannot be applied if one or more fragment lights does not exist. This is due to hardware restrictions.<br /> If you want to apply an ambient light only, this can be done by adding a black colored fragment light. 90 </p> 91 </div> 92 <h2 id="gfx_mesh_node_visibility_unable">Named visibilities at the node level under DCC are not enabled</h2> 93 <div class="section"> 94 <p> 95 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. 96 </p> 97 <p> 98 This visibility flag is saved in table format within the model class, rather than as a mesh. It must be obtained using <span>nw::gfx::ResModel:GetMeshNodeVisibilitiesIndex</span> and <a href="../../nw/gfx/Model/GetResMeshNodeVisibilities.html">GetResMeshNodeVisibilities</a>. In addition, the function <a href="../../nw/gfx/Model/IsMeshVisible.html">IsMeshVisible</a> is also available for returning the logical product of mesh visibilities and named visibilities. 99 </p> 100 <p> 101 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 <span>nw::gfx::BasicEnqueueModelFunctor</span>. 102 </p> 103 </div> 104 <!-- <ANIM> --> 105 <h2 id="bind">How do I change a bone pose using TransformAnimEvaluator::Bind and ChangeAnim?</h2> 106 <div class="section"> 107 <p> 108 When calling <a href="../../nw/gfx/TransformAnimEvaluator/Bind.html">TransformAnimEvaluator::Bind</a> and <a href="../../nw/gfx/TransformAnimEvaluator/ChangeAnim.html">ChangeAnim</a>, the bone pose changes at that point (even if animation evaluation is not being performed).<br /> 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. 109 </p> 110 </div> 111 <h2 id="light_enabled">How do I execute an IsLightEnabled animation of a light?</h2> 112 <div class="section"> 113 <p> 114 <a href="../../nw/gfx/res/ResLight/IsLightEnabled.html">IsLightEnabled</a> animations are only enabled when the scene environment light set includes the target light. 115 </p> 116 <p> 117 The same is true when directly setting a flag without using animation. 118 </p> 119 </div> 120 <h2 id="koma_precision">How do I improve rough motion that results when changing the playback speed of a frame-format skeletal animation?</h2> 121 <div class="section"> 122 <p> 123 The value of a fractional frame is found using linear interpolation to find the value of the previous and next frame.<br /> This algorithm emphasizes accuracy over speed. 124 <ul> 125 <li>Vector components used in scale and translate operations are subject to linear interpolation.</li> 126 <li>Each element in the rotate matrix for a rotate operation is also subject to linear interpolation.</li> 127 </ul> 128 </p> 129 </div> 130 <!-- <PTCL> --> 131 <h2 id="ptcl_flushvbo">How do I make the double buffer work smoothly?</h2> 132 <div class="section"> 133 <p>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. </p> 134 <p>See the <a href="Particle/Draw.html#flushvbo">VBO explicit cache</a>. 135 </p> 136 </div> 137 <h2 id="ptcl_changeresource">How do I change resource parameters?</h2> 138 <div class="section"> 139 See <a href="Particle/Calc.html#changeresource">Changing Resource Parameters</a>. 140 </div> 141 <h2 id="ptcl_changestream">How do I change individual particle values?</h2> 142 <div class="section"> 143 See <a href="Particle/Calc.html#changestream">Changing Particle Information</a> 144 </div> 145 <h2 id="ptcl_optimizestream">How do I make the initializer disappear?</h2> 146 <div class="section"> 147 <p>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. </p> 148 <p>See <a href="Particle/Calc.html#optimizestream">Conditions for Optimizing Streams to Parameters</a>. 149 </p> 150 </div> 151 <h2 id="ptcl_userupdater">How do I execute a user-defined process on particles?</h2> 152 <div class="section"> 153 See <a href="Particle/Calc.html#userupdater">User Updaters</a>. 154 </div> 155 <h2 id="ptcl_drawoffset">How do I change the size?</h2> 156 <div class="section"> 157 <p>For details on enlarging or reducing the size of the coordinate syatem, see <a href="Particle/Coordinate.html#scale">Usage of Each Scale</a>.</p> 158 <p>See <a href="Particle/Draw.html#drawoffset">Enlarging and reducing particles during rendering</a>. 159 </p> 160 </div> 161 <h2 id="ptcl_gpuhungup">The GPU hands after certain operations</h2> 162 <div class="section"> 163 <p>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. </p> 164 <p>The following operation should not be executed at a time when there may be access from the GPU (when particle rendering is not complete).</p> 165 <ul> 166 <li>ParticleSet::ClearParticleCollection</li> 167 <li>Destroying Classes</li> 168 <li>Changing streams on the PARTICLE_BUFFER_BACK side. </li> 169 </ul> 170</div> 171 172 <!-- <TROUBLE> --> 173 <h2 id="trouble_shader">If the message "Vertex-lights or user-registers might be overridden by bone matrices." appears</h2> 174 <div class="section"> 175 <p> 176 This message indicates that vertex lights or user registers may have been overwritten by bone matrices.<BR> 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.<br /> 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. 177 </p> 178 </div> 179 180<hr><p>CONFIDENTIAL</p></body> 181</html> 182