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.

Dark GDK / I can't seem to texture a .x model in GDK

Author
Message
JoeOh
15
Years of Service
User Offline
Joined: 25th Feb 2009
Location:
Posted: 20th May 2011 12:25
I created a simple model in Blender and exported it as a .x file successfully imported it into my GDK program. I have a PNG image
that I also created to use as a texture on that model.

For some reason I can't seem to get the texture to load onto the loaded model. I can apply that texture to a sphere or any other shape with the GDK but not the model itself. I'm sure I'm missing some small programming detail but I can't figure it out.

Here's the code. The model and the PNG file are in the same media folder.



Home is where my souped-up computer is...
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 20th May 2011 12:56
I don't know much about blender but I know people have had trouble importing models into DBPro/GDK. Someone has created an exporter which may work better for you.

Try the 3D chat forum or do a search for that exporter.

JoeOh
15
Years of Service
User Offline
Joined: 25th Feb 2009
Location:
Posted: 20th May 2011 13:14
The problem is not exporting the .x file to GDK. The model converts to the .x format and I can load the model just fine. I seen the model in wireframe mode just to check if it loaded ok. It loaded just fine.

The issue is being able to texture the successfully imported .x file with the PNG I created.

Home is where my souped-up computer is...
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 20th May 2011 13:42 Edited at: 20th May 2011 13:43
Quote: "It loaded just fine."


Are you sure, are the uv coordinates correct etc?

Maybe it is something simple, but I have seen alot of issues on these forums regarding blender exporting x files, although they could just be animation problems etc, I'm not sure.

EDIT: Perhaps posting the media, if its not too large, could help?

JoeOh
15
Years of Service
User Offline
Joined: 25th Feb 2009
Location:
Posted: 20th May 2011 16:14
I got the loaded object to sort of look like the image. The main color of the test texture is a light tan with a bunch of randomly drawn darker lines with red spots all over.

With this texture, the object shows itself as a single tan color with no other color shown.

I tried to scale the image smaller and larger. I tried the UV co-ordinates command as well to no avail. It's like it's trying to apply the texture, but it's just not showing it correctly.

any ideas?

Home is where my souped-up computer is...
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 29th Jun 2011 05:39
Your .x mesh needs to have UV coordinates assigned to each vertex. Make sure your exporter is exporting with UV coordinates. If that still doesn't show up right, post the .x file and someone can look at it to tell you if it's generated properly. (I may not be on for a while)

The fastest code is the code never written.

Login to post a reply

Server time is: 2024-11-19 09:43:34
Your offset time is: 2024-11-19 09:43:34