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 / Cannot load Blender ( .x ) files in Dark GDK

Author
Message
Daniel0108
14
Years of Service
User Offline
Joined: 26th Oct 2009
Location:
Posted: 26th Oct 2009 08:48
Hello! I´m new.

I have a problem in Dark GDK. My friend have made a cube in blender exported to .x ... I tried to open it in Dark GDK but i only see black... nothing... i will post my code here:


Hope someone can help me!
Thanks and Greets from
Daniel0108
entomophobiac
21
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 26th Oct 2009 18:31
I think you're positioning the camera inside the object or at least too close to the object. If you skip the "dbPositionCamera" command and also the "dbAutocamOff" command, I think you'd see the cube.
Daniel0108
14
Years of Service
User Offline
Joined: 26th Oct 2009
Location:
Posted: 26th Oct 2009 19:15
Thanks for your help, but this didnt work. its all black.
If i make an object with DarkGDK it works and the background is blue but if i load an Object from an x file i cant see anything and its all black...
acurrate eye
15
Years of Service
User Offline
Joined: 28th Aug 2009
Location: ur house under your pillow was under bed
Posted: 31st Oct 2009 21:25
scale the cube smaller because i use this software to and it works fine. You just need to make sure its small or big enough

if you can't do it try try again and if you still cant do it ask for help
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 31st Oct 2009 22:09
Try turning getting rid of the dbAutoCamOff command because when it's on it positions the camera in view of the object so then you will know for sure if it loaded or not. (I think)

Your bedtime story is scaring everyone
If found my very own Fail!: http://cheezburger.com/View.aspx?aid=2712171776
BigBug
14
Years of Service
User Offline
Joined: 2nd Nov 2009
Location: Iowa
Posted: 3rd Nov 2009 05:18
Hey Daniel, I think I know what the problem is. I've used blender to create quite a few .x models. That is one of the first things I encountered with it.
So far as I have seen, DarkGDK (& FPS Creator) can only see textures in a .tga (targa) or .dds format. I create all my textures with gimp (.tga is smaller than .dds) and use that to map a UV texture in blender. Once you have all the surfaces mapped in blender correctly, the texture positions get exported along with the .x and you should be ready to go. Make sure your texture is in the same file location (folder) as your .x
Im pretty sure that you have to map a texture before you export even if you just want to use a simple color. Don't know why though.
Hope this helps.
BigBug
14
Years of Service
User Offline
Joined: 2nd Nov 2009
Location: Iowa
Posted: 3rd Nov 2009 05:40
Oops, maybe disregard my last. I tried out your code and ran into the same problem with my model too. I use a way different style of code just to preview my models and it works fine that way.
I exchanged your camera code with this: ~ dbPositionCamera ( 0, 50, -180 ); ~ and it shows up that way.
Paynterboi TicTacToe
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location: That one place
Posted: 3rd Nov 2009 17:51
All I know is that when the screen is black it means the object was not created. Try to use a position object command on your object and see if that works because your code ( I may be wrong ) only loads it to memory and doesn;t place it in the window. If that doesn't work try to load it in .x, and than save it to a dbo and load up that dbo. Try to open it with the directx viewer thingy ( my comp had it but I don't know where it came from ) to see if your object is properly formatted. Just shooting ideas here.

EYE R T3H +ick +ack +oe mester
cleonjones
14
Years of Service
User Offline
Joined: 24th Oct 2009
Location:
Posted: 5th Nov 2009 01:59
I think the problem is that the camera is being put right on the object so it's basically inside it and can't see out, that's why the screen is black.

Try making some variable for the camera X and Z values, position the camera to the cam X and Z values and the player Y position, then point the camera at the player X, Y and Z coords. Right now it's like putting a camera in a shoe box when you want the camera pointing at the shoe box.

This should work


The number 180 in the dbNewXValue and dbNewZValue is the angle, 180 is behind the object 90 beside, etc and the 100 is the distance.

?
cleonjones
14
Years of Service
User Offline
Joined: 24th Oct 2009
Location:
Posted: 5th Nov 2009 02:01
And Paynterboi, I think the DirectX Viewer comes with the DirectX SDK you need to use Dark GDK

?

Login to post a reply

Server time is: 2024-10-06 01:37:28
Your offset time is: 2024-10-06 01:37:28