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 / Blender .X Files in DarkGDK

Author
Message
Bluethunder
15
Years of Service
User Offline
Joined: 12th Aug 2009
Location:
Posted: 12th Aug 2009 23:52
Hi everyone, I'm new to DarkGDK and these forums. I was wondering if you all could help me address an issue i'm having right now.

I knew how to model, texture, animate, and stuff in Autodesk Maya. However, since I didn't own the full version, only the PLE, I couldn't export any of my files. Therefore, I downloaded Blender, and am in the process of learning how it works (Going through a nice tutorial on wikibooks called Blender 3D Noob to Pro)

I created a VERY simple person by following the tutorials. Obviously to make a game, you need models, so I wanted to see if I could get that working.

In blender, I clicked File>Export>DirectX (.x)

Now, I'm not sure what options I used, But I'm pretty sure I changed it to left handed system, and left everything else at the default.

So, I proceeded to make a program pretty similar to the one in the DarkGDK 3D Objects tutorial. The code is as follows:




I hope it looks alright to everyone. If it isn't then it might be a code problem

So I have the PersonWithHat.x file, and it seems to get it alright.

However, when I run the program, the person is lying on his back (no big deal) and grayed out, and there's some of his lower torso vertices that seem to be pulled out quite a ways in random directions.. I'll attach a picture once I get the screenshot for you guys. Hopefully you understand what I'm saying

Thanks,
Bluethunder
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 13th Aug 2009 01:28 Edited at: 13th Aug 2009 01:29
Well I'm not sure if this will fix it or not but try removing the dbPositionObject(2,10.0f,10.0f,10.0f); line for you don't have an object 2. And this probably won't fix your problem either but you don't need the 2 dbSync ( ) commands outside of your main loop. Unless you plan on adding text to show the status of the loading process, but as your code is now you don't need them.

Use Google first... it's not rocket surgery!
puppyofkosh
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location:
Posted: 13th Aug 2009 02:05
If he's greyed out, you might want to try using dbTextureObject.

As for the weird vertices, could it be the model? If you import it in blender does it look that way?
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 13th Aug 2009 03:41
You also have to put the texture in the same directory as the model.

Use Google first... it's not rocket surgery!
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 13th Aug 2009 04:10
If you have played with all the xport options in blender to see what difference that makes to your model when you load it, and none of them seem to make it look right, yet it looks right inside blender then I think the next thing to try would be to export it as a different format, perhaps blender's native format, and use a model converter to convert it to directX .X format. There are a few different converters around, I think the first place to search would be here in the forums, to see if someone has already done it, and then google, I know there are products like DeepExplorer3D that convert many different file formats of 3D models.

I seem to remember a couple of threads on here about problems with people using blender to xport their models, I think textures and rigging were the big problems though.

If it ain't broke.... DONT FIX IT !!!
Bluethunder
15
Years of Service
User Offline
Joined: 12th Aug 2009
Location:
Posted: 13th Aug 2009 08:27
Thank you so much for the replies.

Thanks for pointing out that ID 2 thing. I created a cube before, and forgot to remove that code, but it shouldn't have impacted anything. Thanks for telling me about the dbSync() thing though. That is useful to know.

I believe I tried using dbTextureObject before.. I will try it again soon. However, when I modeled it in blender, I applied a simple brown-ish color to him through the materials panel. I will show this in the screenshot attached.

Should this color not show in the .x format?

Also, I tried exporting it from blender, and it wouldn't import back in. I think it was because I clicked "Export All" instead of export selected. It occurs to me that there is no vertex movement when I click Export selected, but there is when I click Export All.

Actually, NOW it occurs to me that that only happens on the other file I was using... (The human with the hat).

I will get back to you guys later, when I try some more of this..

Attachments

Login to view attachments
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 13th Aug 2009 17:48
Materials won't be exported to the X format. You'll have to UV-map the model and draw an image of the texture. There are some tutorials about this on the 3D chat board, like this one :
http://forum.thegamecreators.com/?m=forum_view&t=138516&b=3

Also, Blender's X support is a little sketchy. If you did anything with animation, that could have caused the wierd verts.



Login to post a reply

Server time is: 2024-11-20 17:29:36
Your offset time is: 2024-11-20 17:29:36