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 / Importing 3d models from blender

Author
Message
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 25th Sep 2017 10:25
Hi all.

This is probably a stupid question, and possibly as Blender had updated, but .blend models just don't import. In fact, of all the model types AppGameKit says it imports, so far only .x .obj and . 3ds import, and none will use the materials.

Has anyone else managed to get a blender model to import? And should materials auto load and apply as they looked if they are available? So far I am having to apply them myself, which means saving lots of little "bits"....though I accept this is probably just as I'm not using blender correctly.

Paul, the new blender has the ability to pack materials into the .blend mod.....although this would mean texture sharing wouldn't be possible, is this/is this going to be supported?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 25th Sep 2017 10:57
You need to set the texture using SetObjectMeshImage()
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 25th Sep 2017 12:08
So do we still need to manually load all the images?
MikeHart
AGK Bronze Backer
21
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 25th Sep 2017 12:45
Santman wrote: "So do we still need to manually load all the images?"


Sadly yes.
Running Windows 7 Home, 64 bit, 8 GB ram, Athlon II X2 255, ATI Radeon HD 4200. Using AGK2 Tier 1.
Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 25th Sep 2017 15:13
Thanks guys.

I'll play with that command later, but my needs are simple so it sounds like what I have working already is probably all I need, just making sure I wasn't missing something that applied the textures as they appear in blender......cause that would be AWESOME Paul, hint hint.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 25th Sep 2017 22:21
you could use setobjectcolor() as well
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 26th Sep 2017 23:49
I've never had a .blender work. .DAE is, imo, the best export from blender for animated objects, and .x takes a close second, imo. I still use .obj for non-animated objects, and never had a problem.

I've had lots of problems with .fbx animated or not. But that may be blender's problem, as I have read other people have no problem. Maybe they use autodesk. No animated models I have bought on the unity store work in AppGameKit, which is disappointing. I have to totally redo the bones and animation in blender and export as .DAE. Maybe others know a way. I do not.

TGC really needs to get away from its love of .x, imho.

Keep in mind, when using .dae for animations the frames are in FPS. So frame 1 is 1/FPS. You can set the FPS in blender.

Here is a .dae code example w/ 24 fps

Santman
13
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 27th Sep 2017 10:59
Thanks guys, this is all super helpful.

Thankfully my needs are pretty simple and I'm not animating anything beyond rotation and such, which ill do with code. Blender is far from user friendly though, its taking time to follow how UVs are handled in it, but I'm getting there.

What I've opted for, which suits me, is breaking the model down into separate parts and then just loading them in sequence and fixing every subsequent object to object 1. That way I can set all their parameters separately, but it's a pain that the method blender uses for setting specific face ranges a specific texture and such don't seem to translate.

My basic model is now working and looking good though, just need to build a competent AppGameKit editor around it and I'm good. I sense a shared forum project coming......

Login to post a reply

Server time is: 2024-09-30 09:25:01
Your offset time is: 2024-09-30 09:25:01