Important information: this site is currently scheduled to go offline indefinitely by end of the year.

granny engine .gr2 question

Post questions about game models here, or help out others!
User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 584
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Post by Wobble »

[out]
Last edited by Wobble on Sun Mar 19, 2017 8:10 am, edited 1 time in total.
Rheini
Moderator
Posts: 652
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 46 times
Contact:

Post by Rheini »

I tested on a file. I think this function just decompresses the gr2 file and returns the raw data.
Rheini
Moderator
Posts: 652
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 46 times
Contact:

Post by Rheini »

I tested Ykkrosh's approach on a Settlers 2: building. works quiet well.
http://img106.imageshack.us/my.php?image=bildhy8.jpg
mambox
mega-veteran
mega-veteran
Posts: 190
Joined: Wed Mar 24, 2004 2:06 pm
Has thanked: 5 times
Been thanked: 4 times

Post by mambox »

just tried now with gmax and some 'cars' granny..only a wheel out script,the viewer watch correct cars and textures...

nothing good for me in this.

without sdk nothing is documented..whats about:
GrannyConvertFileInfoToRaw@8 _GrannyConvertFileToRaw@8 _GrannyConvertIndices@20 _GrannyConvertPixelFormat@32 _GrannyConvertSingleObject@16 _GrannyConvertTree@12 _GrannyConvertTreeInPlace@16 _GrannyConvertVertexLayouts@20

etc...
Rheini
Moderator
Posts: 652
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 46 times
Contact:

Post by Rheini »

So I assume that you mean only 1 wheel of the car was imported into gmax.
The cause might be that the program only exports the first mesh in the file.
Here's a slightly modified version that outputs all meshes.
You do not have the required permissions to view the files attached to this post.
mambox
mega-veteran
mega-veteran
Posts: 190
Joined: Wed Mar 24, 2004 2:06 pm
Has thanked: 5 times
Been thanked: 4 times

Post by mambox »

slightly modified that make it!

dunno where you found it but work like a charm,at least for the granny models i have.

time to render it ;)

thanks!

what do you suggest to render it?
Rheini
Moderator
Posts: 652
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 46 times
Contact:

Post by Rheini »

Compiled it myself.
mambox
mega-veteran
mega-veteran
Posts: 190
Joined: Wed Mar 24, 2004 2:06 pm
Has thanked: 5 times
Been thanked: 4 times

Post by mambox »

thats the secret...you master it!
Rheini
Moderator
Posts: 652
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 46 times
Contact:

Post by Rheini »

Still wondering how they save the bones and that stuff.
mambox
mega-veteran
mega-veteran
Posts: 190
Joined: Wed Mar 24, 2004 2:06 pm
Has thanked: 5 times
Been thanked: 4 times

Post by mambox »

found this...
You do not have the required permissions to view the files attached to this post.
Rheini
Moderator
Posts: 652
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 46 times
Contact:

Post by Rheini »

This guy also coded some Granny supporting stuff:
http://www.codesuppository.blogspot.com/
mambox
mega-veteran
mega-veteran
Posts: 190
Joined: Wed Mar 24, 2004 2:06 pm
Has thanked: 5 times
Been thanked: 4 times

Post by mambox »

This guy just rock!

i had lost the place but played with some kinetik sdk and it's amazing ;)
federico
beginner
Posts: 28
Joined: Wed Sep 27, 2006 6:00 pm
Been thanked: 4 times

Re: granny engine .gr2 question

Post by federico »

I'm not a real programmer, though I have some knowledge about game development.
I'm interested in this topic because I want to create a plugin to grab the gr2 animations. To me the geometry is not interesting (though is useful to have) but the real divide between a professional product and an indie production is the animation quality. I'm much into the adventure genre: find me a moddable game with good talking animation to grab... :?

I took the Neverwinter Night importer and I started to modify it. Here' some tings I noticed and some thoughts:

- You can be successfull or not depending by the granny2.dll version. Some files are opened with a version and not another one. I'm using the granny crowd demo dll (2.6.0.10 version). This is a serious limitation, because I won't be able to tell if the plugin would work in every condition. I'm currently working with two adventures "murder on the orient express" and "And there were none" : I'm able to iimport the skeleton from the model file as well as the animation file from of the former but only from the model file of the latter.

- The NW2 importer is used to grab the skeleton data. In the source you can clearly see that the gr2 data are converted to raw data and then composed to be read and useful. I'm not able to dump this code in a standalone program so I'm currently using the dlu plugin to grab the data. Right now I'm able to export the skeleton directly to SMD format (not exporting from 3ds MAX, directly from the gr2 file). The SMD is really easy to understand and it's a blessing. Here's a shot of the skeleton in Milkshape:
Image
this file is a gr2 animation file, containing only animation data. The skeleton is there, so the export is successful and the first frame is taken as reference.

- I figured out much of he data needed to get the animation working (SMD format as well). I have only problem with the datas of the keyframe coordinates but I'm quite confident I will be able to fix it.

i hope to figure it out. I'll keep you posted... :wink:
federico
beginner
Posts: 28
Joined: Wed Sep 27, 2006 6:00 pm
Been thanked: 4 times

Re: granny engine .gr2 question

Post by federico »

I got it. Preparing a video...
federico
beginner
Posts: 28
Joined: Wed Sep 27, 2006 6:00 pm
Been thanked: 4 times

Re: granny engine .gr2 question

Post by federico »

ok Sorry for the third post in a row, but in this forum there's not the modify option.

i post here a little video showing the skeleton and animation importer. I had to swith back in 3dsmax format because the SMD format doesn't support this kind of keyframe manipulation (the rotation and position keyframe are distinct and asymmetrical). The NeverwinterNight2 skeleton importer has done the main part of the job. I only deleted some useless parts that could crash the import process and I found different errors in the animation part. Strange errors that I (an unprofessional) was able to find quite easily. So i think that the importer was working and unreleased to avoid a legal battle with the owners. Do you like this "inside-job" theory? Too conspirational for thew game industry? :D
Some gr2 files have a different rotation format for the keyframes (the skeleton is working for all the model I tried). I thinlk I can solve this and release the plugin with the source. Do you think that the old scary Granny would sue me in a court of law for this? no, seriously, in your experence is that illegal?

video:
http://it.youtube.com/watch?v=d84KvoCN40Q
Post Reply