![]() |
Help with animated models - Printable Version +- AB4D Forum (https://forum.ab4d.com) +-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4) +--- Forum: Ab3d.PowerToys (https://forum.ab4d.com/forumdisplay.php?fid=9) +--- Thread: Help with animated models (/showthread.php?tid=4313) |
Help with animated models - GraPhiX - 01-20-2022 Hi, i have converted quite a lot of code to vb.net, all seems to work fine, but i am having an issue with one function, been scratching my head for a while i am sure it is a simple thing but i dont know what here is the function: Code: Private Function GenerateSkeleton(ByVal node As Node, ByVal parentSkeletonNode As SkeletonNode, ByRef boneNodesLeftToGenerate As Integer) As SkeletonNode line that errors: Dim assimpBone = AssimpMesh.Bones(boneIndex) Exception Thrown system.NullReferenceException: 'Object reference not set to an instance of object Ab3d.Assimp.Skeleton.AssimpMesh.get returned Nothing. can anyone help please RE: Help with animated models - GraPhiX - 01-21-2022 Sorted i just changed ByVal node to ByVal MYnode :) Now i have to work out why it cannot find any animations :( Error starting animation: cannot find animation with name Assimp.Animation i assume this is another variable i need to rename just got to find it :( RE: Help with animated models - GraPhiX - 01-21-2022 (01-21-2022, 07:08 PM)GraPhiX Wrote: Sorted i just changed ByVal node to ByVal MYnode :) think i have found the issue this C# code : Code: public global::Assimp.Animation SelectedAnimation { get; private set; } Code: Public Property SelectedAnimation As Animation anyone know where i have gone wrong ? RE: Help with animated models - abenedik - 01-23-2022 This error is thrown from the SelectAnimation method: Code: public void SelectAnimation(string animationName) As seen from the code, this error would be thrown when the SelectAnimation was called with the animationName parameter set to "Assimp.Animation" and when there was no animation in the _assimpScene.Animations with that name. Please put a breakpoint into SelectAnimation and check where the value of animationName came from. RE: Help with animated models - GraPhiX - 01-24-2022 (01-23-2022, 10:28 PM)abenedik Wrote: This error is thrown from the SelectAnimation method: Thank you i found the issue i had 2 SelectAnimation() functions i renamed one to MYSelectAnimation() models now load in but the animation does not display, the text information loops through the frame numbers though. The skeleton does animate but the asset does not, i am not sure what i have missed ? Also i think there is something wrong with FBX skeleton no matter what i do the asset is malformed when skeleton is created any other format seems ok |