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 / Textured objects

Author
Message
ruckertheron
8
Years of Service
User Offline
Joined: 12th Nov 2016
Location:
Posted: 4th Nov 2018 22:11
Is there any way I can get the textures of my .x model to show in AppGameKit? I made them in MapScape 2. I heard about UV Mapping and combining them into one texture file but how would you convert this to one? Is there any info in the .x file to do this? Maybe a program?
puzzler2018
User Banned
Posted: 4th Nov 2018 22:24 Edited at: 4th Nov 2018 22:25
Hi there, I dont want to dismiss your query

But im not really sure on the .X format - there the the LoadObject command in AppGameKit, you could try that and see if AppGameKit implements the .X format

Im only used to the OBJ format

Let us know how you get on as im new the .X format world - others indeed may have some other inspirations for you so please hang around for their ideas too
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 4th Nov 2018 22:34 Edited at: 4th Nov 2018 22:34
Try the SetObjectImage() function
I usually set the texStage option to 1
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 5th Nov 2018 00:02
Quote: "I heard about UV Mapping and combining them into one texture file but how would you convert this to one?"


Texture mapping needs to be done in a program like blender or an easier Alternative is MeshLab I found that very easy if I just wanted
to color individual faces a particular color. Buts its much more powerful than that and im still learning how to use it

Once you have texture mapped the model you can then export the model .x with its texture mapping and the use the image you made
when texture mapping. Good texture mapping is a skill in itself

But the answer to you question yes .x files can have the texture map info stored in them. The models created in any of the TGC model
packs have the option of .x format obj and 3ds depending on the model but they all can be exported as a .x file and still work with the
mapped texture. There are also several layers of textures you can use with AppGameKit as well which may include light maps etc


fubar
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 5th Nov 2018 18:07 Edited at: 5th Nov 2018 18:12
Hi I made my example level for my shaderpack in Map Scape.
Each vertex is grouped together with other vertices with equal texture forming a mesh, so you get some meshes with different textures each.
Hope that makes sense to you
Here is the Level loading bit I made for my shader pack:

This is to add materials with a few textures for each mesh.
In the SP_XXX functions is basicaly SetObjectMeshImage at the end.
Beware the order of AddMaterial is important here and if you want to use normal maps: SetObjectMeshNormalMap is using stage 2 by default.
AGK is using Assimp and normally you also parse/read the materials from the model file but you can't in AppGameKit (not yet but soon I guess)
So you have to either be careful with the order or parse the file yourself which I did for the .x format at some point but I think I wasn't satisfied and ditched everything

Login to post a reply

Server time is: 2024-11-23 12:37:26
Your offset time is: 2024-11-23 12:37:26