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.

AppGameKit Classic Chat / [SOLVED] Need Help Converting Animated .FBX to .X 3D Model

Author
Message
Scribble
6
Years of Service
User Offline
Joined: 2nd Apr 2017
Location:
Posted: 5th Nov 2022 06:25 Edited at: 5th Nov 2022 07:57
Hello everybody. I've been having trouble converting a .fbx model to .x.
I have a 3D model in .fbx format, it's animated, and textured. But it's in the older .fbx format (prior 2011), and can't be loaded directly into AGK.
So, what I did was importing the .fbx into Milkshape3D, and export it into .x (JT). This seems to work initially, preserving the geometry, bones, and animations. And it loads into AppGameKit just fine.
However, the texture was messed up when applied on the model. I tried converting the old .fbx into new .fbx versions using AutoDesk FBX converter and Milkshape, but no luck. The resulting texture is garbled.
I tried to alter the UV scaling of the texture inside AppGameKit itself, still no luck.
This is strange, because the old .fbx model loads just fine with its texture in MilkShape3D. The only problem is the garbled texture after export. Everything else is fine.

I'm kind of at the end of my ropes here.
Can anybody help to try to convert the old .fbx model into a usable (bones + animation + texture ) format? I don't mind if it's .fbx or .x, as long as it can be loaded into AGK. And if you succeed, it would be great if you tell me how you do it.
I've included the sample .fbx + texture below. Also, a picture of how the model is supposed to look like.
Thanks in advance.
Actually, scratch that. PLEASE HELP!

P.S: That model is very small. Please scale it up to be properly viewed.

Attachments

Login to view attachments

The author of this post has marked a post as an answer.

Go to answer

Scribble
6
Years of Service
User Offline
Joined: 2nd Apr 2017
Location:
Posted: 5th Nov 2022 07:01 Edited at: 5th Nov 2022 07:03
Also, I'm not sure if this is useful, but after being loaded with LoadObjectWithCildren(), the object only seems to have 1 mesh, even though the object seems to have 4 groups when viewed in Milshape3D.
I'm not sure if 'group' in Milkshape3D refers to 'mesh' in AppGameKit, but if it is, then it might be because the groups are being consolidated into 1 mesh after export.
Changing UV scaling in AppGameKit doesn't work. I've been scaling the UV from 0 to infinity and back, and it's still not textured correctly.
Blender 2.69 export as .fbx doesn't seems to preserve animation.
Still no progress.
Scribble
6
Years of Service
User Offline
Joined: 2nd Apr 2017
Location:
Posted: 5th Nov 2022 07:52 Edited at: 5th Nov 2022 07:56
This is the converted .fbx, which was converted from the 'old' .fbx into new version, which is 2013 .fbx.
This 'new' .fbx file can be loaded directly into AGK. The difference compared to the .x above, is this .fbx shows 4 mesh, which is the correct number of mesh.
However, when textured in AppGameKit, even using SetObjectMeshImage() for individual meshes, the result is the same: the texture is garbled the same way as the .x.
The same .fbx with its texture looks perfectly fine when viewed using various 3D modellling programs.

Is this actually a problem/bug of AppGameKit, and not the 3D model itself?

Attachments

Login to view attachments
Scribble
6
Years of Service
User Offline
Joined: 2nd Apr 2017
Location:
Posted: 5th Nov 2022 18:45
Alright, on further inspection (using Milkshape 3D UV Coordinator), the UV offset for the model seems to be shifted entirely out of the image range, hence the garbled texture.
I seems to be able to fix it within Milkshape, , by superimposing the model onto the image.

But why does 3D modelling softwares (including Milkshape, Ultimate Unwrap3D, etc) show the correct texturing, even without any 'correction'?
The offsetted garbledness is only apparent in AGK. Is there a wrapping 'mode' that we can enable or something to prevent this?
Can anybody shed a light on this subject?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 5th Nov 2022 20:25
Use SetImageWrapU(image, 1) and SetImageWrapV(image, 1) to enable the image to wrap

NOTE: AppGameKit DOES NOT SUPPORT MESH WARPING (SCALE ANIMATIONS)

If your model contains mesh warping then it will not animate correctly and there is NOTHING you can do about it.
Scribble
6
Years of Service
User Offline
Joined: 2nd Apr 2017
Location:
Posted: 6th Nov 2022 02:58 Edited at: 6th Nov 2022 20:15
@blinkOk
I would try SetImageWrapU(), but since the model's texture dimension is not in the of power-of-2 format, the command doesn't look like it would work on this particular model. I haven't tried that command on this partcular model actually.
For now, I'll just have to readjust the UV manually.

I'm not sure if it's mesh warping or not, but the red 'mouth' of the cactus monster model, which is a mesh of its own, doesn't seem to animate correctly in AGK. It animates just fine in other 3D modelling programs. Probably it's one of those animation scaling thingy?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 6th Nov 2022 19:39 Edited at: 6th Nov 2022 19:48
Well how about that!

Attachments

Login to view attachments
Scribble
6
Years of Service
User Offline
Joined: 2nd Apr 2017
Location:
Posted: 6th Nov 2022 20:14 Edited at: 6th Nov 2022 20:19
@blinkok
lol yeah that thing is pretty quirky.
Is that a video of the model loaded in AppGameKit? Or other 3D modelling program?
Because the mouth wasn't animating correctly for me in AGK
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 6th Nov 2022 20:25
This post has been marked by the post author as the answer.
Quote: "Is that a video of the model loaded in AppGameKit? "


Yes, AppGameKit
SetImageWrapU/V()

I converted it to text based using Ultimate Unwrap (attached)

Attachments

Login to view attachments
Scribble
6
Years of Service
User Offline
Joined: 2nd Apr 2017
Location:
Posted: 6th Nov 2022 20:42 Edited at: 6th Nov 2022 20:43
@blinkok
Thank you very much for confirming SetImageWrapU() works, despite the documentation saying otherwise. This will save me from bothersome fiddling with aligning textures in 3D modelling program.
I only have demo version of Ultimate Unwrap, so I can't export it the same way. But Milkshape3d has the option of exporting to either binary or non-binary format, so I guess the non-binary is the 'text-based'? Not sure. Will try it later. If that fails, I'll convert the 'old' FBX to 'new' FBX using Autodesk FBX converter.
What happened to the model if it's not converted to text-based format, from your observation?
Scribble
6
Years of Service
User Offline
Joined: 2nd Apr 2017
Location:
Posted: 6th Nov 2022 21:03
Nice, Autodesk FBX Converter actually has ASCII format export. Now the model doesn't need editing in 3D modelling programs whatsoever.
The model works perfectly when used with SetImageWrapU/V(). I wonder why the documentation says it can only be used with power-of-2 texture? Kind of misleading.
Thanks again blinkok. You're a lifesaver.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 6th Nov 2022 21:31
Quote: "What happened to the model if it's not converted to text-based format, from your observation?"


I have no idea. In most cases, with any product, you need to do a bit of fiddeling.
Ultimate Unwarp is a good investment if you are going to work with 3D models regularly
Virtual Nomad
Moderator
18
Years of Service
Recently Online
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 6th Nov 2022 21:46 Edited at: 6th Nov 2022 21:47
from my minimal experience, some binary .fbx files work fine out of the box and some not, even if from the same "media pack".

example: some of these free models texture fine, some not. perhaps the pack was made by multiple authors in slightly different ways but something's "different" amongst them.

all of THESE were good but needed ASCII conversion for HTML (i can't remember why i didn't get an HTML version out for THIS which uses them).

Quote: "Ultimate Unwarp is a good investment"

how did you get the texture onto Scribble's model?!
you know i'm a new owner of UU but some of the obvious stuff isn't (to me)
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 6th Nov 2022 21:53
Quote: "how did you get the texture onto Scribble's model?!"


After you load the image
SetImageWrapU(image, 1)
SetImageWrapV(image, 1)

You can see in UU that the texture co-ordinates are +1
Virtual Nomad
Moderator
18
Years of Service
Recently Online
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 6th Nov 2022 22:14
Quote: "You can see in UU that the texture co-ordinates are +1"

sorry, i meant i couldnt see where to texture the model within UU itself
Scribble
6
Years of Service
User Offline
Joined: 2nd Apr 2017
Location:
Posted: 6th Nov 2022 22:46 Edited at: 6th Nov 2022 22:47
On further testing, it seems that for this particular model, both binary and ASCII-based model works in AppGameKit, as long as SetImageWrapU/V() is enabled.
The difference is the size. ASCII/text based seems to have double the size (1mb) compared to binary (~400kb). This will probably be relevant later if a project needs to load a truckload of models.

@virtual nomad
I think it's hidden in the 'material' menu to the right. It's kind of deeper inside. Can't confirm because I've uninstalled the demo lol
Virtual Nomad
Moderator
18
Years of Service
Recently Online
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 6th Nov 2022 22:54 Edited at: 7th Nov 2022 00:17
ok, looked deeper under materials again and found it. thanks, Scribble. btw, fixed title typo to help searches (Hnimated vs Animated)

and, yah. binary is always much smaller on disk.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 7th Nov 2022 00:05 Edited at: 7th Nov 2022 00:08
Right click on m1270_00 under Materials
Select the Maps tab
Set Diffuse to Bitmap and click the Properties button
Click Change and select your image


The modelling, texturing and animation is impressive

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-03-29 05:56:21
Your offset time is: 2024-03-29 05:56:21