as i understand, when this parameter is near to 0.0 there should result in almost no modification of those vertexes white rotating or moving the bone, but the effect is the same than a max value, i.e. 'Weight'=1.0
Test:
Code: Select all
InitEngine3D(#PB_Engine3D_NoLog,#PB_Compiler_Home+"Compilers\Engine3d.dll"):InitSprite():InitKeyboard():InitMouse()
OpenWindow(0, 0,0, 1280,720, "[Esc] to end",#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, WindowWidth(0), WindowHeight(0), 0, 0, 0)
CreateCamera(0, 0, 0, 100, 100):MoveCamera(0,0,1,4):CameraLookAt(0,0,0,0):CameraBackColor(0,$446666)
CreateLight(0,$ffffff, 10, 10, 0)
CreateShaderMaterial(0,#PB_Material_ColorShader)
SetMaterialColor(0,#PB_Material_AmbientColor|#PB_Material_DiffuseColor,$4455ff):MaterialShininess(0,64,$ffffff)
MaterialCullingMode(0,#PB_Material_NoCulling)
;creacion del esqueleto
CreateCylinder(0,0.2,1,6,4,0):TransformMesh(0,0,1/2,0,1,1,1,0,0,0,0)
CreateSkeleton(0)
;juntas del esqueleto:
CreateSphere(10,0.05)
CreateMaterial(10,0,$eeeeee)
junta$="junta"
CreateBone(0,junta$,"",0,0,0,0,0,0,0,#PB_Orientation_PitchYawRoll)
CreateEntity(10,MeshID(10),MaterialID(10))
for i.a=0 to 13
VertexBoneAssignment(0,0,i,0,0.001); <- This command does not listen to its 'Weight.f' parameter:
;to assign bone index 0 an influence of 0.001 to first 14 vertexes of the mesh
;should result in almost no modification of those vertexes white rotating the bone,
;but the effect is the same than a max value, i.e. 'Weight'=1.0
Next
FinishBoneAssignment(0,0)
CreateEntity(0,MeshID(0),MaterialID(0))
MaterialShadingMode(0,#PB_Material_Wireframe)
Repeat:While WindowEvent():Wend
ExamineKeyboard():ExamineMouse()
MouseX.f=MouseDeltaX()*5E-2:MouseY.f=MouseDeltaY()*5E-2
RotateCamera(0,MouseY.f,MouseX.f,0,#PB_Relative)
MoveCamera(0,0,0,MouseWheel())
EnableManualEntityBoneControl(0,junta$,1,1)
RotateEntityBone(0,junta$,0,0,1,#PB_Relative)
RenderWorld()
FlipBuffers():Delay(11)
Until KeyboardPushed(#PB_Key_Escape)