1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00
luanti/irr/src
Lars Müller 7ac5502fdf
Fix handling of skinned meshes for nodes
Second try after the revert in 8a28339 due to an unexpected regression.

- Rigidly animated models (e.g. the glTF frog node) were not working correctly,
  since cloning the mesh ignored the transformation matrices.
  Note that scaling the mesh needs to occur *after* transforming the vertices.
- Visual scale did not apply to skinned models,
  as resetting the animation overwrote scaled vertex data with static positions & normals.
  For backwards compatibility, we now apply a 10x scale to static, non-glTF models.

We now do scale static meshes, as the bug that caused meshes not to be scaled was limited to skeletally animated meshes,
hence we ought not to reproduce it for skinned meshes that do not take advantage of skeletal animations (e.g. current MTG doors).

However, glTF models (e.g. Wuzzy's eyeballs) up until recently were always affected due to technical reasons
(using skeletal animation for rigid animation).

Thus, to preserve behavior, we:

1. Do not apply 10x scale to glTF models.
2. Apply 10x scale to obj models.
3. Apply 10x scale to static x or b3d models, but not to animated ones.

See also: #16141
2025-05-20 18:37:33 +02:00
..
OpenGL Purge some dead code (mostly Irrlicht) (#16111) 2025-05-04 16:31:44 +02:00
OpenGL3 Make SDL2 default on macOS (#16039) 2025-05-02 21:28:13 +02:00
OpenGLES2 Make SDL2 default on macOS (#16039) 2025-05-02 21:28:13 +02:00
vendor Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
BuiltInFont.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
builtInFont.png Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CAnimatedMeshSceneNode.cpp Use matrix4::getRotationRadians 2025-02-27 12:31:04 +01:00
CAnimatedMeshSceneNode.h Fix situation around aabbox3d default constructor (#15586) 2024-12-29 14:36:30 +01:00
CB3DMeshFileLoader.cpp Fix handling of skinned meshes for nodes 2025-05-20 18:37:33 +02:00
CB3DMeshFileLoader.h Refactor SkinnedMesh (#15522) 2024-12-12 15:33:08 +01:00
CBillboardSceneNode.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CBillboardSceneNode.h Fix situation around aabbox3d default constructor (#15586) 2024-12-29 14:36:30 +01:00
CBlit.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CBoneSceneNode.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CBoneSceneNode.h Fix situation around aabbox3d default constructor (#15586) 2024-12-29 14:36:30 +01:00
CCameraSceneNode.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CCameraSceneNode.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CColorConverter.cpp Fix rendering regression with TGA type 1 files with BGRA8 color (#15402) 2024-11-19 13:37:05 +01:00
CColorConverter.h Fix rendering regression with TGA type 1 files with BGRA8 color (#15402) 2024-11-19 13:37:05 +01:00
CDummyTransformationSceneNode.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CDummyTransformationSceneNode.h Fix situation around aabbox3d default constructor (#15586) 2024-12-29 14:36:30 +01:00
CEGLManager.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CEGLManager.h Revert "Use EGL over GLX" (#15315) 2024-10-24 17:52:06 +02:00
CEmptySceneNode.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CEmptySceneNode.h Fix situation around aabbox3d default constructor (#15586) 2024-12-29 14:36:30 +01:00
CFileList.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CFileList.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CFileSystem.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CFileSystem.h Fix CFileSystem::FileSystemType related UB (#15669) 2025-01-11 16:42:36 +01:00
CFPSCounter.cpp Keep stats on hw buffer uploads 2024-08-28 15:38:02 +02:00
CFPSCounter.h Keep stats on hw buffer uploads 2024-08-28 15:38:02 +02:00
CGLTFMeshFileLoader.cpp Fix handling of skinned meshes for nodes 2025-05-20 18:37:33 +02:00
CGLTFMeshFileLoader.h Refactor SkinnedMesh (#15522) 2024-12-12 15:33:08 +01:00
CGLXManager.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CGLXManager.h Revert "Use EGL over GLX" (#15315) 2024-10-24 17:52:06 +02:00
CGUIButton.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CGUIButton.h Make button sprites (scrollbar arrows) DPI-aware (#14772) 2024-06-26 15:25:27 +02:00
CGUICheckBox.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CGUICheckBox.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CGUIComboBox.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CGUIComboBox.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CGUIEditBox.cpp IGUIFont / CGUITTFont code cleanups (#15581) 2024-12-23 12:49:47 +01:00
CGUIEditBox.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CGUIEnvironment.cpp Remove Irrlicht GUI gradients (#16015) 2025-05-07 08:56:00 +02:00
CGUIEnvironment.h Remove Irrlicht GUI gradients (#16015) 2025-05-07 08:56:00 +02:00
CGUIFileOpenDialog.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CGUIFileOpenDialog.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CGUIFont.cpp Some minor code cleanups 2025-04-08 22:24:37 +02:00
CGUIFont.h IGUIFont / CGUITTFont code cleanups (#15581) 2024-12-23 12:49:47 +01:00
CGUIImage.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CGUIImage.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CGUIImageList.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CGUIImageList.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CGUIListBox.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CGUIListBox.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CGUIScrollBar.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CGUIScrollBar.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CGUISkin.cpp Remove Irrlicht GUI gradients (#16015) 2025-05-07 08:56:00 +02:00
CGUISkin.h Remove Irrlicht GUI gradients (#16015) 2025-05-07 08:56:00 +02:00
CGUISpriteBank.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CGUISpriteBank.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CGUIStaticText.cpp IGUIFont / CGUITTFont code cleanups (#15581) 2024-12-23 12:49:47 +01:00
CGUIStaticText.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CGUITabControl.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CGUITabControl.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CImage.cpp Replace _IRR_DEBUG_BREAK_IF with assertions 2025-04-20 20:49:10 +02:00
CImage.h Mark a bunch of classes as final 2024-09-02 21:50:13 +02:00
CImageLoaderJPG.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CImageLoaderJPG.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
CImageLoaderPNG.cpp Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
CImageLoaderPNG.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CImageLoaderTGA.cpp Fix rendering regression with TGA type 1 files with BGRA8 color (#15402) 2024-11-19 13:37:05 +01:00
CImageLoaderTGA.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CImageWriterJPG.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CImageWriterJPG.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CImageWriterPNG.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CImageWriterPNG.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CIrrDeviceLinux.cpp Replace _IRR_DEBUG_BREAK_IF with assertions 2025-04-20 20:49:10 +02:00
CIrrDeviceLinux.h Better UX when touch events aren't supported by Irrlicht device (#15288) 2024-10-16 21:37:00 +02:00
CIrrDeviceOSX.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CIrrDeviceOSX.mm Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CIrrDeviceSDL.cpp Replace _IRR_DEBUG_BREAK_IF with assertions 2025-04-20 20:49:10 +02:00
CIrrDeviceSDL.h Get rid of _IRR_OVERRIDE_ macro 2025-04-20 20:49:10 +02:00
CIrrDeviceStub.cpp Purge some dead code (mostly Irrlicht) (#16111) 2025-05-04 16:31:44 +02:00
CIrrDeviceStub.h Non-SDL: Add opengl3 support 2024-11-15 12:18:48 +01:00
CIrrDeviceWin32.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CIrrDeviceWin32.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CLimitReadFile.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CLimitReadFile.h Mark a bunch of classes as final 2024-09-02 21:50:13 +02:00
CLogger.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CLogger.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CMakeLists.txt Purge some dead code (mostly Irrlicht) (#16111) 2025-05-04 16:31:44 +02:00
CMemoryFile.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CMemoryFile.h Mark a bunch of classes as final 2024-09-02 21:50:13 +02:00
CMeshCache.cpp Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CMeshCache.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CMeshManipulator.cpp Replace _IRR_DEBUG_BREAK_IF with assertions 2025-04-20 20:49:10 +02:00
CMeshManipulator.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CMeshSceneNode.cpp Change material sharing for CMeshSceneNode 2025-02-22 16:19:04 +01:00
CMeshSceneNode.h Change material sharing for CMeshSceneNode 2025-02-22 16:19:04 +01:00
CNSOGLManager.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CNSOGLManager.mm Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CNullDriver.cpp Purge some dead code (mostly Irrlicht) (#16111) 2025-05-04 16:31:44 +02:00
CNullDriver.h Purge some dead code (mostly Irrlicht) (#16111) 2025-05-04 16:31:44 +02:00
COBJMeshFileLoader.cpp Purge some dead code (mostly Irrlicht) (#16111) 2025-05-04 16:31:44 +02:00
COBJMeshFileLoader.h Drop fixed pipeline lighting stuff (#15165) 2024-09-18 12:18:28 +02:00
COGLESCoreExtensionHandler.h Implement support for array textures in GL driver 2025-04-08 22:24:37 +02:00
COpenGLCacheHandler.cpp Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
COpenGLCacheHandler.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
COpenGLCommon.h Try to fix macro definition order problem with OpenGL code 2024-04-15 19:27:05 +02:00
COpenGLCoreCacheHandler.h Replace _IRR_DEBUG_BREAK_IF with assertions 2025-04-20 20:49:10 +02:00
COpenGLCoreFeature.h Prefer immutable texture storage when available 2025-04-08 22:24:37 +02:00
COpenGLCoreRenderTarget.h Improve robustness of GL object handling 2025-03-14 11:52:52 +01:00
COpenGLCoreTexture.h Replace _IRR_DEBUG_BREAK_IF with assertions 2025-04-20 20:49:10 +02:00
COpenGLDriver.cpp Purge some dead code (mostly Irrlicht) (#16111) 2025-05-04 16:31:44 +02:00
COpenGLDriver.h Implement support for array textures in GL driver 2025-04-08 22:24:37 +02:00
COpenGLExtensionHandler.cpp GL: fix and clean up some code 2024-12-04 18:20:34 +01:00
COpenGLExtensionHandler.h Add support for glObjectLabel to aid debugging 2025-01-04 12:40:14 +01:00
COpenGLMaterialRenderer.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
COpenGLSLMaterialRenderer.cpp Clean up Irrlicht shader API 2024-12-31 14:47:46 +01:00
COpenGLSLMaterialRenderer.h Clean up Irrlicht shader API 2024-12-31 14:47:46 +01:00
COSOperator.cpp COSOperator: Use NSPasteboardTypeString instead of NSStringPboardType 2025-02-01 13:41:17 +01:00
COSOperator.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CReadFile.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CReadFile.h Mark a bunch of classes as final 2024-09-02 21:50:13 +02:00
CSceneCollisionManager.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CSceneCollisionManager.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CSceneManager.cpp Fix handling of skinned meshes for nodes 2025-05-20 18:37:33 +02:00
CSceneManager.h Purge some dead code (mostly Irrlicht) (#16111) 2025-05-04 16:31:44 +02:00
CSDLManager.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CSDLManager.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CTimer.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CWGLManager.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CWGLManager.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CWriteFile.cpp Irrlicht: Get rid of obsolete setDebugName (#15541) 2024-12-14 17:03:08 +01:00
CWriteFile.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CXMeshFileLoader.cpp Fix handling of skinned meshes for nodes 2025-05-20 18:37:33 +02:00
CXMeshFileLoader.h Refactor SkinnedMesh (#15522) 2024-12-12 15:33:08 +01:00
CZipReader.cpp Drop gzip support from CZipReader 2025-03-30 18:17:19 +02:00
CZipReader.h Drop gzip support from CZipReader 2025-03-30 18:17:19 +02:00
Irrlicht.cpp Purge some dead code (mostly Irrlicht) (#16111) 2025-05-04 16:31:44 +02:00
mt_opengl_loader.cpp Fix some issues with mt_opengl 2024-12-04 18:20:34 +01:00
os.cpp Fix some compiler warnings (#15596) 2024-12-26 11:29:00 +01:00
os.h Fix operator[] for vector2d and vector3d being potentially UB (#15977) 2025-04-08 22:25:45 +02:00
SB3DStructs.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
SkinnedMesh.cpp Replace _IRR_DEBUG_BREAK_IF with assertions 2025-04-20 20:49:10 +02:00
SoftwareDriver2_helper.h Prefer immutable texture storage when available 2025-04-08 22:24:37 +02:00