View Full Version : [TEC]GR2 File Editing Information
Madox58
09-16-11, 07:10 PM
From older threads We have the basic information.
We know the CRC is not critical for SH5 but alters the file so GrannyViewer can not open it.
We know we can change names and other items as long as we do not alter the file size.
We know that We can change the actual 3D meshes in the files.
Now I'll explain exactly HOW to change those 3D meshes and more!
I'll also explain other details about things as I go along.
You have the option to learn or just ignore.
I really don't care what you decide.
There was a program that made this easier but I moved it to a DVD and can not find it right now.
:nope:
So the hard way should give a clue to anyone that wishes to re-write the same type program because I'll not be doing that myself.
You will need 4 programs to start.
A good Hex Editor,
EditPad Pro or something like it.
a 3D Modeling program.
A working Mesh Exporter that exports the exact mesh as in the GR2 file.
(This is a MUST HAVE! I recommend you use one I will re-release here. It will include the 2nd UV channel export also.)
Now you need alot of determination and time.
:haha:
Madox58
09-16-11, 07:10 PM
The first of many links to needed files I will be uploading as time goes on.
This is a basic template for 010 that breaks down and shows the GR2 information in an easy to understand format.
http://www.mediafire.com/?95deyd53m1c8dur
http://i108.photobucket.com/albums/n12/privateer_2006/GR2%20Stuff/GR2_Info-2.jpg
What this template does for now is it explains the beginning of the GR2 file itself
and allows an easy view of pointers that we will be useing soon enuff.
I will be adding to this template as I find the time and it is written so that older versions of GR2's will not work with it.
This template is the start of re-creating the original version I can not find.
That version allowed exporting/importing 3D meshes.
I have found no other site on the 'Net that even comes close to actually discussing the GR2 files in a reasonable/legal way.
I do not use the granny2.dll file in anyway and once one knows where to look in the GR2 files?
It becomes very obvious that many people wasted alot of time trying to guess how to use it!
Madox58
09-16-11, 07:11 PM
Reserved again
tonschk
09-17-11, 07:26 AM
:yeah: This is very intresting :salute:, Many many thanks :DL Privateer :rock:
mookiemookie
09-17-11, 08:13 AM
While I've got no modding ability to speak of, I do want to say thank you for sharing your knowledge with the folks who do. The biggest glaring fault with this game for me is the merchant ship selection. By gifting your knowledge in fixing that to the community, you're really doing people like me the favor. I'm going to be the one to ultimately benefit from this, and for that, I thank you.
Madox58
09-17-11, 10:54 AM
While there are free hex editors out there?
I highly suggest buying 010 for the many features it has.
One of the most important features that is a must have is it's Inspecter Panel.
Other editors may have something like it but I would not know which ones do or do not.
I will be referring to it alot and it does make working with the files so much easier.
It also allows createing Templates and Scripts.
Something which I'll be recreateing since I lost the original ones.
I was about to chuck all my Ex SH4 models on turbosquid... maybe i should wait?? :O:
Madox58
09-17-11, 02:13 PM
I was about to chuck all my Ex SH4 models on turbosquid... maybe i should wait?? :O:
Do you mean that you are going to sell them or remove them at turbosquid?
:hmmm:
Selling them does not remove your rights to use them unless you give up all rights.
And I still have the versions you sent me as You, BBW, and I were messing about a ways back!
:yep:
One of those is to be the second Ship I work on.
:D
Do you mean that you are going to sell them or remove them at turbosquid?
:hmmm:
Selling them does not remove your rights to use them unless you give up all rights.
And I still have the versions you sent me as You, BBW, and I were messing about a ways back!
:yep:
One of those is to be the second Ship I work on.
:D
:woot:
I put nothing on Squid yet, I forgot you had the models, but if you need them again or anymore let me know, I think I need to make normal maps for most of them though.
Between Myself and Alex we have quite a few NPC unit models desgined for SH4/5 (that never saw the light of day.) Would be nice to finally see them in game.
I agree.
By the way I've just got back to work on the one you wanted me to model during the marble cake days, Francis, currently bringing the final touches to it, should be ready very soon.
http://img11.hostingpics.net/pics/165944avengerrender.png
Beautiful model Alex :yeah:, box model or nurbs loft?
10k+ tris for an air unit is probably fine for SHV (so long as you dont have 50 of them at once)
Thanks a lot, Francis :03:
This one is a box model, didn't need splines nor NURBS on this one.
About its stats *checking* I'm somewhat surprised. I've been checking the triangle count twice and it appears triangles (not polygons, but triangles) on this one will not exceed 8000/8100. Way to be satisfied. :DL
BTW, you'll definitely have to show some screenshots of your last masterpieces that people will see later in this game. :|\\
If your still using Max, check the 'statistics' tab under the 'veiwport configuration', you can set Poly /vert /tri-count to be displayed in your view port perminatley.
Pretty handy for games modlling.
Ah, thanks for letting me know :03:
But these statistics only display the number of polygons (as far as I know)... And the only thing I've got to do to be able to find out the number of triangles, is to export any model from .MAX to .OBJ, and then to import it. This process converts polygons into triangles, don't know why, LOL.
http://i286.photobucket.com/albums/ll118/v11cu96/maxscreen.jpg
:up:
http://i9.photobucket.com/albums/a75/Panzer_Kamerad/smileys/flabbergasted.png !
*quickly edits his Max setup*
Thanks a lot, my friend. http://i9.photobucket.com/albums/a75/Panzer_Kamerad/smileys/gentleman.gif http://i9.photobucket.com/albums/a75/Panzer_Kamerad/smileys/4.gif
Madox58
09-20-11, 07:08 PM
Before I add anything to the 2 reserved areas?
I know that RAD Games is watching as I have gotten an E-Mail from them.
I use ONLY Hex editing and 3D Tools for this thread.
The obj exporter I wrote will be re-released in a format that works for this purpose unless I'm stopped.
If RAD wants the code? I'll sent it to them or they can find it themselves in the form I found it.
I have no intentions of getting myself in trouble with RAD Games.
If they send me a 'Knock it off Dude' message?
I'll have to sit back and check my options.
Maybe it's time to go to the Antimonopoly Committee, complaining about the RAD Games? :haha::shucks:
No one wants you to have had some troubles with RAD Games. I just hinted at the fact that the Antimonopoly Committee should look at the RAD Games - sky-high price for their software, reluctance to import tool in GR2 (although imports from GR2 to other editors they've done, but it works incomplete)
Yes, monopolies often forget about what you need to follow the rules. However, they require compliance with its rules. Although they could earn more if made more widely available tools GR2.
Sorry for my bad english, I hope I'm clearly expressed his thoughts
Good luck in your hard work!:salute:
THE_MASK
09-20-11, 11:42 PM
You would think that for 15000usd you would get a license to use granny 3d to make a new game . I cannot see how making new models to go into an existing game would be the wrong thing to do . Just speculation on my part though .
I dont quite follow either, I'd assume Rad would only have a quarrel with you if you released a tool which emulates Granny 3d in wider sense, in that it could effectively be used to pack GR2's as a free alternative to Granny.
But If the tool was somhow only compatible with SHV, I dont think they would have much of an issue.
I dont know to what degree SHV's GR2 format has been customised (if at all) by Ubi?
Forgive my ignorance if im wrong.
urfisch
09-21-11, 06:12 AM
I see no problem with RAD Games. They might sensitively watching the progress. But i think they are not interested in blaming anyone here, doing "illegal" work with their Granny files.
And if so, first thing they will do is contacting the regarding person and ask to stop the work. And beside this, there are no clear legal statements that we are not allowed to create tools, making gr2 files editable.
Or am i wrong?
Anyway. I am not a fan of beeing that panic.
:smug:
Anyway. I am not a fan of beeing that panic.
:smug:Eh ?
Privateer studied .GR2 format, that wasn't to be expected from anyone.
But yet he did, and managed making sort of familiar with it, to the point he's got to state that he's now able to edit these files and eventually create new ones (correct me if I'm mistaken). Yet he didn't get paid for this, you can admit that was a big task.
And now that the game is afoot :D, the RAD games guys come in and let him know he can't release his work ?
I'd feel the same if I were in Privateer's shoes, personally.
Madox58
09-21-11, 07:26 PM
Brian at RAD Games has been very nice to answer questions I've been asking him since yesterday.
We are free to do whatever to the GR2 files in SH5 as far as what I'm told by him at this time.
HOWEVER!!
DO NOT attempt to use RAD Games Tools you have no license for!
That will lead to trouble no one wants.
And that does include the 'Expotron Exporter' of NeverWinter Nights fame.
That is the Official word to me from RAD Games.
Ubi left us with the mess not RAD Games.
So let's not blame them for protecting what is rightfully thiers.
After a days reflection and exchanges with Brian?
I'm feeling pretty honored that they even pay attention us.
So I plan to post in the reserved sections this weekend barring any other problems.
Brian at RAD Games has been very nice to answer questions I've been asking him since yesterday.
We are free to do whatever to the GR2 files in SH5 as far as what I'm told by him at this time.
HOWEVER!!
DO NOT attempt to use RAD Games Tools you have no license for!
That will lead to trouble no one wants.
And that does include the 'Expotron Exporter' of NeverWinter Nights fame.
That is the Official word to me from RAD Games.
Sound very nice and good! Does this mean you can continue your work at ease now?
BigBANGtheory
09-22-11, 03:22 AM
That sounds pretty reasonable of RAD games tbh, well done for getting a constructive dialog with them. :salute:
It sounds much like you thought originally where line is drawn by simply not using software, applications and libraries you are not licensed for... common sense really.
I suppose you could view the GR2 files themselves as content owned by Ubisoft (unless they have some strange license agreement with RAD) just like a texture or sound file, I personally don't see the difference.
I still think RAD would benefit from having a non-commercial license much like 3DSmax to get people using their software more, it would surely help sell more commercial licenses in the long run.
Brian at RAD Games has been very nice to answer questions I've been asking him since yesterday.
We are free to do whatever to the GR2 files in SH5 as far as what I'm told by him at this time.
HOWEVER!!
DO NOT attempt to use RAD Games Tools you have no license for!
That will lead to trouble no one wants.
And that does include the 'Expotron Exporter' of NeverWinter Nights fame.
That is the Official word to me from RAD Games.
Ubi left us with the mess not RAD Games.
So let's not blame them for protecting what is rightfully thiers.
After a days reflection and exchanges with Brian?
I'm feeling pretty honored that they even pay attention us.
So I plan to post in the reserved sections this weekend barring any other problems.Good news :yeah:
Very glad to know the RAD games team doesn't see any inconvenience in the use of your "tools" ! ;)
0rpheus
09-23-11, 12:43 PM
Brian at RAD Games has been very nice to answer questions I've been asking him since yesterday.
We are free to do whatever to the GR2 files in SH5 as far as what I'm told by him at this time.
HOWEVER!!
DO NOT attempt to use RAD Games Tools you have no license for!
That will lead to trouble no one wants.
And that does include the 'Expotron Exporter' of NeverWinter Nights fame.
That is the Official word to me from RAD Games.
Ubi left us with the mess not RAD Games.
So let's not blame them for protecting what is rightfully thiers.
After a days reflection and exchanges with Brian?
I'm feeling pretty honored that they even pay attention us.
So I plan to post in the reserved sections this weekend barring any other problems.
Great news - please pass on the community's thanks to Rad Games for being so decent about all this! A lot of companies would just tell us to shove it!:yeah:
Madox58
09-25-11, 07:25 PM
1st posting in the reserved area.
Bump...
Where is the continuation of the parsing? :hmmm:
Madox58
09-30-11, 02:12 PM
I'll have a whole big addition to the first section before Monday.
:yep:
It will explain the sections Index and continue from there to explain information found in some sections, what they are, and how to read or write to them.
All without useing the granny2.dll in SH5, which is limited in what you can actually do with it to fit our needs.
Madox58
10-01-11, 02:59 PM
Well, since TDW sent me his version of the GR2 Template,
and it is a much more complete version?
I'll adopt his version after We sort a few issues with it.
It's full of more data then I was going to bother with for now but very nicely done.
:yep:
And saves me a TON of work on the GR2 Template.
I can spend the extra time doing the Template for Dangerous Waters now.
The goal there is to allow others to write a new converter for the J3D format.
:D
Plus for any future imports to the GR2's?
We may/will need to compute tangents, bitangents, and normals ahead of time.
One reason to plant them in the GR2 is to save CPU time.
That is if the SH5 engine is actually reading them and not doing the math.
I'll have to zero out some and see what happens in Game to be sure.
I've got a start on a Python thingy to do the math but it needs work to finish.
TheDarkWraith
10-01-11, 03:57 PM
Plus for any future imports to the GR2's?
We may/will need to compute tangents, bitangents, and normals ahead of time.
One reason to plant them in the GR2 is to save CPU time.
That is if the SH5 engine is actually reading them and not doing the math.
I'll have to zero out some and see what happens in Game to be sure.
If you look at the shaders you'll see that they use the binormals and tangents :yep:
Madox58
10-01-11, 04:00 PM
OK. I hate looking at all those so that's good to know.
:yep:
It means the Python thingy (or something like it) will be needed.
If you want normal mapping on the models you WILL need the tangents for the normal mapping tangent space. The binormals are optional since they can be calculated inside the game, but as you said they better be contained in the gr2 since it will save some loading time.
The game loads tangents and binormals only if the 3D model has a normalmap texture mapped on the second texturing channel.
Madox58
10-05-11, 06:17 AM
Thanks for verfying this.
:up:
For now I get that info by exporting with opencollada.
The python script will be a stand alone .exe that will be easier to work with.
Can u reupload gr2template.bt please?
@nyzze! Welcome to SubSim, :salute:
@nyzze! Welcome to SubSim, :salute:
Thanks :salute:
Do you have this template?
You are welcome, not those who you seek, privateer can help ya out,:salute:
TheDarkWraith
10-14-11, 07:49 PM
You are welcome, not those who you seek, privateer can help ya out,:salute:
privateer is the main POC for the template file. He is compiling everyone's input into one template file.
Madox58
10-15-11, 07:49 AM
http://www.mediafire.com/?1clz7zafehdq7qu
This download includes the CRC script to check and set the CRC.
I have not worked on the GR2's for SH5 lately.
I'm working on an application that finds whatever type file I want to find even if it has no file extension.
Written in C, it's very small, fast, and handles dropping huge folders into it very well.
Plus I'm hooked on this incredibly simple and silly Game!
http://www.mollyrocket.com/621
The Heck with angry Birds.
Stunt Hamsters' Rock the Christ Child!!!
:rock:
Madox58
10-15-11, 08:23 AM
Link and files changed.
Madox58
10-15-11, 09:43 AM
http://www.mediafire.com/?ku82wxzw9s9uo7t
Fixed an error in the header.h file
:oops:
Madox58
10-15-11, 03:06 PM
Not sure what you mean.
:hmmm:
I'm working on something different right now so my mind is not focused on the SH5 GR2 at this moment.
if (hwndListView == NULL)
{
sprintf(sErrorString, "Handle of ListView NULL (fExportListView)");
MessageBox(NULL, (LPSTR) sErrorString, (LPSTR) sYourApplicationsName, MB_OK | MB_ICONEXCLAMATION);
return(0);
}
i = SendMessage((HWND) hwndListView, (UINT) LVM_GETITEMCOUNT, (WPARAM) 0, (LPARAM) 0);
if (lLines != i)
{
sprintf(sErrorString, "%ld lines in ListView != %ld as parameter (fExportListView)", i, lLines);
MessageBox(NULL, (LPSTR) sErrorString, (LPSTR) sYourApplicationsName, MB_OK | MB_ICONEXCLAMATION);
return(0);
}
and so on.
:03:
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.