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 / Problem with PIVOT

Author
Message
psx
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location:
Posted: 21st Jun 2007 11:31
I'm using DarkGameSDK.
And here is a problem:
After loading a .x or .3ds model with preseted coords in 3dsMax,
it appears in right position, but its pivot moves to 0,0,0.

How can I move its pivot to its real coords, after loading.
Or I'm doing something wrong.

Just loading model .3ds, with coords set to 80,50,100 in Max,
then using dbObjectPositionX() , ..Y(), or ..Z() and get 0,0,0.

Please help me to solve this prob.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 21st Jun 2007 15:43
is the rotational data an option in the export? maybe its not set on?

"In the event that I am reincarnated, I would like to return as a deadly virus, in order to contribute something to solve overpopulation" Prince Philip 1988
psx
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location:
Posted: 22nd Jun 2007 08:35
Thanks for your answer? but...
I'm exporting from 3dsMax.
When choosing 3ds format, there is only one
option about TextureCoords.

To be sure, that export has gone right, I'm
opening( not modifying ) this model in 3DExploration.
Here pivot is in right place( in the center of the model ),
while model is in its position (f.e. 80,100,25).

And again in my prog, pivot is in the 0,0,0,
while the model is in right place.
Can I move the pivot without affecting a model?
Seems that NO.

OK then what utility can export to .x from .3ds(created in MAX)
correctly, so that pivot works right.

Maybe I should use DarkGDK ( currently using DarkGameSDK )

Thank you again, and please I really need to solve this.
psx
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location:
Posted: 22nd Jun 2007 09:41
Seems that I found the problem root,
but no solution yet.

When saving to .3ds in MAX, the pivot is right,
but after converting to .x in 3DExploration,
the pivot moves to 0,0,0.

As I know the DarkGameSDK converts .3ds models
inside itself.
So I have to convert to .x format by myself,
outside the SDK, and then use a model.

But 3DExploration moves pivot, so what utility you are using
to convert models from MAX to .x

Thanks, and I'm waiting all your comments, about this prob.
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 22nd Jun 2007 11:13
Of course when you load an object it appears at 0,0,0
In my experience, to position it 80,50,100 at 3d studio will make the 3ds exported file to have an 'offset' within its own center.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Jun 2007 22:48
Try moving limb ZERO of the object. This is the center of the pivot.

While making my game - before I figured out how to center my model in the model software, I always had the "wrong pivot" point.

I made functionality to switch "move" mode - so I could move the camera, move the model, or be in "play" mode. I also added 6 keys to control limb offset for x,y,z (each direction).

I would center my model on 0x,0y,0z and then keep adjusting the limb offsets (limbx#, limby#, limbz#) with the limb offset command
and then basically play with it I could go in the "ship control mode" and pivot it around and the "center of axis" seemed correct.

I would always display the limb offsets on screen so I could write them down and then use them in my load object routine:
load object, scale it, set limb offset, whella - ready to go

Hope this helps.

Know way to many languages - Master of none
psx
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location:
Posted: 23rd Jun 2007 07:54
Thanks for all your answers.
Seems that each developer has to pass these basic problems.
And as I understood, there is no bugs inside SDK about the pivot.
So I'll try to find my way to convert models.
Move The Limb seems to be good idea. I'll try.
Thanks again.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 23rd Jun 2007 16:51
ah, pivot, I read wrong, I thought you meant the model's rotation, sorry. I dont recall having this issue but I was using an old version of 3dsmax (r3.1 - yikes). For the record, the db engine (dbp, dgdk) is flakey when it comes to 3ds, it doesnt seem to be fully supported and weird things can happen to your models, not to mention long load times. I havent found any reliable converters for 3ds to x altho some exist, they dont seem to work, or work all the time. If you have a newer version of max you might be able to find a decent plugin to export x directly, not sure tho. Good luck.

"In the event that I am reincarnated, I would like to return as a deadly virus, in order to contribute something to solve overpopulation" Prince Philip 1988

Login to post a reply

Server time is: 2024-11-19 13:38:03
Your offset time is: 2024-11-19 13:38:03