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 / Multiple - separated - texture files in a single object?

Author
Message
Zapa
6
Years of Service
User Offline
Joined: 20th Apr 2018
Location:
Posted: 27th Apr 2018 19:09
Hi guys,

I'm setting up for my next game and I decided to use AppGameKit for this one. It's a first person dungeon crawler. I recently acquired a large number of 3D models from turbosquid (like this one for instance) but I'm faced with the problem of not being able to load it with the textures. I tried everything from the .fbx, .dae, .x and .obj file format and I see no way to use SetObjectImage and get a texture applied to it properly. Is there a shader I can use or a way to texture my models?

I see no solution from my own tests outside of actually doing my own UV mappings and such for the model using a texture atlas! Please advice.
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 27th Apr 2018 21:44
Have you tried using LoadObjectWithChildren & SetObjectMeshImage?
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 27th Apr 2018 21:49
Hi Zapa. Can you give a link to one of the objects for us to test with? It is possible to individually texture objects, child objects (when loaded with "loadobjectwithchildren", and using the getobjectchildID command to get the ID of the child object) and meshes (using the SetObjectMeshImage command), so as long as the UVs are set in the model, you should be able to texture it. Take a look at the BoneAnimation example that comes with AppGameKit to see how child objects can be textured (the gun is a child object and has a separate diffuse map to the solider).
Zapa
6
Years of Service
User Offline
Joined: 20th Apr 2018
Location:
Posted: 27th Apr 2018 23:02
Hey guys, I've uploaded a .obj version of the model here.

MikeHart
AGK Bronze Backer
21
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 28th Apr 2018 07:02
I think with one object that has several materials/textures assigned to it, you can't use it in AGK.
Running Windows 7 Home, 64 bit, 8 GB ram, Athlon II X2 255, ATI Radeon HD 4200. Using AGK2 Tier 1.
Zapa
6
Years of Service
User Offline
Joined: 20th Apr 2018
Location:
Posted: 28th Apr 2018 19:39
@Cjb have you tried it? My post was hidden and under moderation before Mike posted. Not sure you received the notification about the link
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 28th Apr 2018 19:56
Hi

To load a model with multi textures, the format dae or x works. Im not sur about the obj format.
You should use :
Loadobjectwithchildren () and setobjectmeshimage() to set the image to the mesh you want.
AGK2 tier1 - http://www.dracaena-studio.com
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 29th Apr 2018 18:33
I had a look at that model. It only has one object (no child-objects) and only one mesh, so I don't think AppGameKit can properly texture it using those diffuse and normal maps. Not sure if this is a limitation of the .obj model format, or whether it just hasn't been exported properly. Did you get any other formats? Try the .x or .dae as Blendman suggested.
I also tried importing the house into Blender and it doesn't appear to be textured in there either.

Login to post a reply

Server time is: 2024-11-23 21:28:56
Your offset time is: 2024-11-23 21:28:56