kaetemi / ryzomclassic

A classic fork of Ryzom. The goal is to remove outposts, reactivate the Ring, and only include the classic in-game web components.
https://ryzom.dev/
GNU Affero General Public License v3.0
1 stars 0 forks source link

Tryker windmill makes spastic movements #93

Closed kaetemi closed 3 years ago

kaetemi commented 4 years ago

Maybe gimbal locked. Look for max files named eolienne

kaetemi commented 3 years ago

windthings

kaetemi commented 3 years ago

Only occurs in release mode, not in debug mode...

kaetemi commented 3 years ago

/shape ge_mission_eolienne_tr.shape

kaetemi commented 3 years ago

This occurs only when there is more than one instance of this shape in the scene.

The skeletons between these windmills are shared for some reason, but it's animating them based on a random windmill's initial timing.

kaetemi commented 3 years ago

Based on distance sort.

kaetemi commented 3 years ago

The skeletons should not be shared, though.

Non-animated windmills are getting animated too, which indicates an incorrectly shared vertex buffer.

kaetemi commented 3 years ago

Only occurs on D3D driver.

kaetemi commented 3 years ago

Vertex buffers are re-used.

    nel_drv_direct3d_win_d.dll!NL3D::CDriverD3D::activeVertexBuffer(NL3D::CVertexBuffer & VB) Line 304  C++
    ryzom_client_dev_d.exe!NL3D::CMeshGeom::render(NL3D::IDriver * drv, NL3D::CTransformShape * trans, float polygonCount, unsigned int rdrFlags, float globalAlpha) Line 636   C++
>   ryzom_client_dev_d.exe!NL3D::CMesh::render(NL3D::IDriver * drv, NL3D::CTransformShape * trans, bool passOpaque) Line 2603   C++
    ryzom_client_dev_d.exe!NL3D::CTransformShape::traverseRender() Line 233 C++
    ryzom_client_dev_d.exe!NL3D::CRenderTrav::traverse(NL3D::UScene::TRenderPart renderPart, bool newRender, bool generateShadows) Line 252 C++
    ryzom_client_dev_d.exe!NL3D::CScene::renderPart(NL3D::UScene::TRenderPart rp, bool doHrcPass, bool doTrav, bool keepTrav) Line 661  C++
    ryzom_client_dev_d.exe!NL3D::CSceneUser::renderPart(NL3D::UScene::TRenderPart rp, bool doHrcPass, bool doTrav, bool keepTrav) Line 536  C++
    ryzom_client_dev_d.exe!renderMainScenePart(NL3D::UScene::TRenderPart renderPart, bool wantTraversals, bool keepTraversals) Line 484 C++
    ryzom_client_dev_d.exe!drawRenderScene(bool wantTraversals, bool keepTraversals) Line 762   C++
    ryzom_client_dev_d.exe!doRenderScene(bool wantTraversals, bool keepTraversals) Line 787 C++
    ryzom_client_dev_d.exe!mainLoop() Line 1746 C++
    ryzom_client_dev_d.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * __formal, char * cmdline, int __formal) Line 409  C++

<title>Document</title>

<!--StartFragment-->

&nbsp; | Name | Value | Type
-- | -- | -- | --
◢ | VB | {DrvInfos={pinfo=0x000001a2a92d1e80 {Ptr=0x000001a2b0592e98 {crefs=0x00000000 pinfo=0x000001a2a92d1e80 {...} } ...} ...} ...} | NL3D::CVertexBuffer &amp;
&nbsp; | ◢ NLMISC::CRefCount | {crefs=0x00000000 pinfo=0x000001a2abb52750 {Ptr=0x000001a2a8e8c3b8 {crefs=0x00000000 pinfo=0x000001a2abb52750 {...} } ...} } | NLMISC::CRefCount
&nbsp; | crefs | 0x00000000 | int
&nbsp; | ◢ pinfo | 0x000001a2abb52750 {Ptr=0x000001a2a8e8c3b8 {crefs=0x00000000 pinfo=0x000001a2abb52750 {Ptr=0x000001a2a8e8c3b8 {...} ...} } ...} | NLMISC::CRefCount::CPtrInfoBase *
&nbsp; | ▶ Ptr | 0x000001a2a8e8c3b8 {crefs=0x00000000 pinfo=0x000001a2abb52750 {Ptr=0x000001a2a8e8c3b8 {crefs=0x00000000 ...} ...} } | const NLMISC::CRefCount *
&nbsp; | RefCount | 0x00000002 | int
&nbsp; | IsNullPtrInfo | false | bool
&nbsp; | ▶ DrvInfos | {pinfo=0x000001a2a92d1e80 {Ptr=0x000001a2b0592e98 {crefs=0x00000000 pinfo=0x000001a2a92d1e80 {Ptr=0x000001a2b0592e98 {...} ...} } ...} ...} | NLMISC::CRefPtr&lt;NL3D::IVBDrvInfos&gt;
&nbsp; | ▶ _Type | 0x000001a2a8e8c3d8 "\a\a\x4\x4\x4\x4\x4\x4\x4\x4\f\f\n\f\x1\x1... | unsigned char[0x00000010]
&nbsp; | _VertexColorFormat | 0x01 '\x1' | unsigned char
&nbsp; | _VertexSize | 0x0034 | unsigned short
&nbsp; | _Flags | 0x3007 | unsigned short
&nbsp; | _InternalFlags | 0x0000 | unsigned short
&nbsp; | _NbVerts | 0x000001d5 | unsigned int
&nbsp; | _Capacity | 0x000001d5 | unsigned int
&nbsp; | ▶ _NonResidentVertices | { size=0x0000000000000000 } | std::vector&lt;unsigned char,std::allocator&lt;unsigned char&gt;&gt;
&nbsp; | ▶ _LockedBuffer | 0x0000000000000000 &lt;NULL&gt; | unsigned char *
&nbsp; | ▶ _Offset | 0x000001a2a8e8c420 {0x0000, 0x000c, 0x0018, 0xcdcd, 0xcdcd, 0xcdcd, 0xcdcd, 0xcdcd, 0xcdcd, 0xcdcd, ...} | unsigned short[0x00000010]
&nbsp; | ▶ _UVRouting | 0x000001a2a8e8c440 "" | unsigned char[0x00000008]
&nbsp; | _LockCounter | 0x00000000 | unsigned int
&nbsp; | _PreferredMemory | RAMPreferred (0x00000000) | NL3D::CVertexBuffer::TPreferredMemory
&nbsp; | _Location | RAMResident (0x00000000) | NL3D::CVertexBuffer::TLocation
&nbsp; | _ResidentSize | 0x00005f44 | unsigned int
&nbsp; | ▶ _Name | "" | std::string
&nbsp; | _KeepLocalMemory | false | bool

<!--EndFragment-->
>   ryzom_client_dev_d.exe!NL3D::CMeshGeom::applySkin(NL3D::CSkeletonModel * skeleton) Line 1824    C++
    ryzom_client_dev_d.exe!NL3D::CMeshGeom::renderSkin(NL3D::CTransformShape * trans, float alphaMRM) Line 776  C++
    ryzom_client_dev_d.exe!NL3D::CMeshInstance::renderSkin(float alphaMRM) Line 148 C++
    ryzom_client_dev_d.exe!NL3D::CSkeletonModel::renderSkinList(NLMISC::CObjectVector<NL3D::CTransform *,0> & skinList, float alphaMRM) Line 1544   C++
    ryzom_client_dev_d.exe!NL3D::CSkeletonModel::renderSkins() Line 1489    C++
    ryzom_client_dev_d.exe!NL3D::CSkeletonModel::traverseRender() Line 1090 C++
    ryzom_client_dev_d.exe!NL3D::CRenderTrav::traverse(NL3D::UScene::TRenderPart renderPart, bool newRender, bool generateShadows) Line 252 C++
    ryzom_client_dev_d.exe!NL3D::CScene::renderPart(NL3D::UScene::TRenderPart rp, bool doHrcPass, bool doTrav, bool keepTrav) Line 661  C++
    ryzom_client_dev_d.exe!NL3D::CSceneUser::renderPart(NL3D::UScene::TRenderPart rp, bool doHrcPass, bool doTrav, bool keepTrav) Line 536  C++
    ryzom_client_dev_d.exe!renderMainScenePart(NL3D::UScene::TRenderPart renderPart, bool wantTraversals, bool keepTraversals) Line 484 C++
    ryzom_client_dev_d.exe!drawRenderScene(bool wantTraversals, bool keepTraversals) Line 762   C++
    ryzom_client_dev_d.exe!doRenderScene(bool wantTraversals, bool keepTraversals) Line 787 C++
    ryzom_client_dev_d.exe!mainLoop() Line 1746 C++
    ryzom_client_dev_d.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * __formal, char * cmdline, int __formal) Line 409  C++
>   nel_drv_direct3d_win_d.dll!NL3D::CDriverD3D::activeVertexBuffer(NL3D::CVertexBuffer & VB) Line 304  C++
    ryzom_client_dev_d.exe!NL3D::CMeshGeom::renderSkin(NL3D::CTransformShape * trans, float alphaMRM) Line 793  C++
    ryzom_client_dev_d.exe!NL3D::CMeshInstance::renderSkin(float alphaMRM) Line 148 C++
    ryzom_client_dev_d.exe!NL3D::CSkeletonModel::renderSkinList(NLMISC::CObjectVector<NL3D::CTransform *,0> & skinList, float alphaMRM) Line 1544   C++
    ryzom_client_dev_d.exe!NL3D::CSkeletonModel::renderSkins() Line 1489    C++
    ryzom_client_dev_d.exe!NL3D::CSkeletonModel::traverseRender() Line 1090 C++
    ryzom_client_dev_d.exe!NL3D::CRenderTrav::traverse(NL3D::UScene::TRenderPart renderPart, bool newRender, bool generateShadows) Line 252 C++
    ryzom_client_dev_d.exe!NL3D::CScene::renderPart(NL3D::UScene::TRenderPart rp, bool doHrcPass, bool doTrav, bool keepTrav) Line 661  C++
    ryzom_client_dev_d.exe!NL3D::CSceneUser::renderPart(NL3D::UScene::TRenderPart rp, bool doHrcPass, bool doTrav, bool keepTrav) Line 536  C++
    ryzom_client_dev_d.exe!renderMainScenePart(NL3D::UScene::TRenderPart renderPart, bool wantTraversals, bool keepTraversals) Line 484 C++
    ryzom_client_dev_d.exe!drawRenderScene(bool wantTraversals, bool keepTraversals) Line 762   C++
    ryzom_client_dev_d.exe!doRenderScene(bool wantTraversals, bool keepTraversals) Line 787 C++
    ryzom_client_dev_d.exe!mainLoop() Line 1746 C++
    ryzom_client_dev_d.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * __formal, char * cmdline, int __formal) Line 409  C++

<title>Document</title>

<!--StartFragment-->

&nbsp; | Name | Value | Type
-- | -- | -- | --
◢ | VB | {DrvInfos={pinfo=0x000001a2a92d1e80 {Ptr=0x000001a2b0592e98 {crefs=0x00000000 pinfo=0x000001a2a92d1e80 {...} } ...} ...} ...} | NL3D::CVertexBuffer &amp;
&nbsp; | ◢ NLMISC::CRefCount | {crefs=0x00000000 pinfo=0x000001a2abb52750 {Ptr=0x000001a2a8e8c3b8 {crefs=0x00000000 pinfo=0x000001a2abb52750 {...} } ...} } | NLMISC::CRefCount
&nbsp; | crefs | 0x00000000 | int
&nbsp; | ◢ pinfo | 0x000001a2abb52750 {Ptr=0x000001a2a8e8c3b8 {crefs=0x00000000 pinfo=0x000001a2abb52750 {Ptr=0x000001a2a8e8c3b8 {...} ...} } ...} | NLMISC::CRefCount::CPtrInfoBase *
&nbsp; | ▶ Ptr | 0x000001a2a8e8c3b8 {crefs=0x00000000 pinfo=0x000001a2abb52750 {Ptr=0x000001a2a8e8c3b8 {crefs=0x00000000 ...} ...} } | const NLMISC::CRefCount *
&nbsp; | RefCount | 0x00000002 | int
&nbsp; | IsNullPtrInfo | false | bool
&nbsp; | ▶ DrvInfos | {pinfo=0x000001a2a92d1e80 {Ptr=0x000001a2b0592e98 {crefs=0x00000000 pinfo=0x000001a2a92d1e80 {Ptr=0x000001a2b0592e98 {...} ...} } ...} ...} | NLMISC::CRefPtr&lt;NL3D::IVBDrvInfos&gt;
&nbsp; | ▶ _Type | 0x000001a2a8e8c3d8 "\a\a\x4\x4\x4\x4\x4\x4\x4\x4\f\f\n\f\x1\x1... | unsigned char[0x00000010]
&nbsp; | _VertexColorFormat | 0x01 '\x1' | unsigned char
&nbsp; | _VertexSize | 0x0034 | unsigned short
&nbsp; | _Flags | 0x3007 | unsigned short
&nbsp; | _InternalFlags | 0x0000 | unsigned short
&nbsp; | _NbVerts | 0x000001d5 | unsigned int
&nbsp; | _Capacity | 0x000001d5 | unsigned int
&nbsp; | ▶ _NonResidentVertices | { size=0x0000000000000000 } | std::vector&lt;unsigned char,std::allocator&lt;unsigned char&gt;&gt;
&nbsp; | ▶ _LockedBuffer | 0x0000000000000000 &lt;NULL&gt; | unsigned char *
&nbsp; | ▶ _Offset | 0x000001a2a8e8c420 {0x0000, 0x000c, 0x0018, 0xcdcd, 0xcdcd, 0xcdcd, 0xcdcd, 0xcdcd, 0xcdcd, 0xcdcd, ...} | unsigned short[0x00000010]
&nbsp; | ▶ _UVRouting | 0x000001a2a8e8c440 "" | unsigned char[0x00000008]
&nbsp; | _LockCounter | 0x00000000 | unsigned int
&nbsp; | _PreferredMemory | RAMPreferred (0x00000000) | NL3D::CVertexBuffer::TPreferredMemory
&nbsp; | _Location | RAMResident (0x00000000) | NL3D::CVertexBuffer::TLocation
&nbsp; | _ResidentSize | 0x00005f44 | unsigned int
&nbsp; | ▶ _Name | "" | std::string
&nbsp; | _KeepLocalMemory | false | bool

<!--EndFragment-->
kaetemi commented 3 years ago

Skinned meshes should never use instancing when doing software vertex animation.

kaetemi commented 3 years ago

Guard VertexBuffer against being locked for writing after it's already been used in the frame.

kaetemi commented 3 years ago

renderSkinList uses CVertexStreamManager &meshSkinManager= *rdrTrav.getMeshSkinManager();

kaetemi commented 3 years ago

vertexstream flags 7, size 32 mesh flags _Flags = 0x3007, size 52

kaetemi commented 3 years ago

PaletteSkin and Weight flags

kaetemi commented 3 years ago

Skinned meshes now use streamed vertex buffers, in the same way as skinned MRM meshes.