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 / Loading 3d objects with textures

Author
Message
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 6th Mar 2013 00:15
So, I've read a few threads and tried out loading some objects.

I can load OBJ files but cannot get any loaded with their textures.
Does this mean I have to apply textures manually for all 3d objects?

MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 7th Mar 2013 04:48
Yes .. by using the SetObjectImage(ObjectObjID,TextureImageID,TextureStage) command.

Actually (108beta8) AppGameKit doesn't support MTL Files (Multiple materials in one OBJ model file) (but you can implement it by yourself splitting Obj File by materials in a function).

Other way is to remap Textures and UVs to have only one atlas texture over the OBJ (a software like Unwrap3D is doing this very well and there is a tutorial for doing that on http://www.unwrap3d.com ).
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 8th Mar 2013 00:07
I noticed that about the mtl files.
Well, I only need a plane at the moment. I guess I can shift the texture on a plane..(?) will give that a go.

nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 8th Mar 2013 00:30
um, I can't see how to affect the UV offsets of the texture in code. Is it even possible yet?

MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 8th Mar 2013 02:16
A texture uv offset command has been requested on the forum (but not in the requests in the google code AppGameKit website ..) . But it is actually possible using Shaders ... (but a little complicated for a simple offset (but doable)

Login to post a reply

Server time is: 2024-11-24 09:40:54
Your offset time is: 2024-11-24 09:40:54