Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / Models separating after Export

Author
Message
mac service
4
Years of Service
User Offline
Joined: 13th Jun 2019
Location:
Posted: 13th Jun 2019 10:04
Hello fellow developers,

I have a small issue that i can't seem to fix. I have tried to search for the answer (here and Google) but, i can't seem to find any mention of the specific problem that i am encountering.

To give you an idea of what i am struggling with;

I have created a weapon in Blender (very basic pistol), I have animated in such a way that after you shoot, the barrel spin automatically. In order to achieve this i had to make the barrel a separate mesh.

However, when i export the whole model, the barrel is completely detached from the gun itself and is suspended below. When in game, it animates very strangely.

I know it's hard to judge this issue without having an image to go off, but, i am at work currently. I will attach an image when i get home.

But, in the mean time, if anyone might know what i am talking about, please feel free to comment.

Cristiano
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 13th Jun 2019 23:28 Edited at: 13th Jun 2019 23:28
Maybe have a look here for setup and exporting from blender

The main thing is to use LoadObjectWithChildren() to load the model
There are a couple functions that work with load object with children; GetObjectNumChildren( objID ) and GetObjectChildID( objID, childIndex )
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 14th Jun 2019 05:16
What will happen with AppGameKit is that it will Position any "Child" Limbs at their Zero Axis.
This means, let's say you move the object -100 Units in Y … when you export / import into AGK., it will be +100 Units in Y, because the Mesh Axis won't have been Frozen / XMesh to reset it back to the World 0, 0, 0 where you want it to be.
In fact this will get worse if you're animating without a Skeleton (Armature Rig) … as it will be using said offset axis as the new Pivot Point., so the Animations will get all screwed up.

Personally, I'd strongly recommend using a Basic Skeleton Rig., but if you don't then be sure to Zero the Axis out.
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 30th Jun 2019 10:32 Edited at: 30th Jun 2019 10:39
mac service. The issue u are having i believe is related to origin position in blender. You will end up with exploding objects and weird rotations if objects do not have the correct origin set before exporting them. For instance the upper receiver on a gun needs to have its origin in the center of the receiver while the gun has its origin set to 0,0,0. so it will load into agk in the correct position and the receiver in the correct position relative to the gun each piece will try to move and rotate around its own axis or the parents. i have an attached image u can see orange origin dot is at the center of the gun and each of its parts at their center. if i were to export these as separate objects into a scene they would load into dbrp or agk correctly, because their origin position all except for the gun are offset. If you were to export all objects with a 0,0,0 origin i imagine u would fin them in weird places relative to eachother or all stacked. The best things to do is to keep everything as a single object and animate a part export as 1 object if possible
A child's dream never dies.





Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-03-29 11:01:09
Your offset time is: 2024-03-29 11:01:09