SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
09-29-11, 05:10 PM | #1 |
Black Magic
|
GR2 Editor/Viewer/Extractor/Importer
For approximately the last 8 months I've been gathering information on the GR2 format. I've found info from the net and from this one magical place on the net dealing with QuArK. This one magical place has been a major source of the information I've attained about the GR2 format. Another huge source of information was the GrannyViewer app from RAD games (the 'maker' of the granny format - a free app from them). That app tells you everything that is contained in the GR2 file - the trick is figuring where the info displayed resides in the GR2 file. I used that app extensively in the making of this app. Last, but not least, Privateer provided the last missing piece to the puzzle when he released his GR2 template for the 010 editor. I couldn't figure out how to read the very beginning of the file and that template provided information that allowed me to figure it out.
The pointers contained in section 0 of the GR2 file will tell you everything you need to know to do what I've done. The screenshot above shows NSS_Uboat7a (with hull mesh turned off to show rooms). All waypoints are shown also. Since I have all this data and I know how to interpret it correctly I can do basically anything with it. An extractor will be coded in to allow you to extract meshes from the GR2 file into OBJ format (might even code it for Microsoft's X format also). I hope to also figure out how to import new items into the GR2 file via the app. Now I know someone is going to say "We have the goblin editor and Granny viewer to see GR2 files graphically. Why reinvent the wheel?" And that would be a good and valid question. Here's why: - If I can display the information I read from the file graphically and it renders correctly then I'm reading the file correctly. Most important. - To do things that either of them can't do (picking, moving bones, rotating meshes, etc.) For anyone that's curious: - developed using Visual Studio 2008 C# - currently uses DirectX fixed-function pipeline (I plan on converting it to the programmable pipeline [aka shaders] once everything is working). I use the fixed-function pipeline because it's easier to code initially. Goal is to get everything working then go back and polish. - uses DirectX 9.0c for rendering (no OpenGL or anything like that) current version v1.1.459.1: https://www.mediafire.com/?0c360d3g4jx3qah NOTE: CURRENT VERSION IS IN ALPHA STATE. ENSURE TO BACKUP YOUR WORK BEFORE SAVING WITH APP! In hopes of getting some open-source type thing going on here is the C# AntiGranny code file (old and outdated but still full of useful info). Since there was no participation in my open-source adventure I will not be updating the source code below anymore: http://www.gamefront.com/files/20890...10_15_2011_zip Last edited by TheDarkWraith; 08-23-14 at 04:33 PM. |
09-29-11, 05:16 PM | #2 |
Ace of the deep .
|
Speechless
|
09-29-11, 05:47 PM | #3 |
Seasoned Skipper
Join Date: Mar 2010
Location: Berlin, Germany
Posts: 718
Downloads: 567
Uploads: 0
|
TheDarkWraith
Privateer Subsim community Great. |
09-29-11, 07:31 PM | #4 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
Very Nice Mate!
I'm sure some of the information I have will help alot. |
09-29-11, 08:34 PM | #5 |
Eternal Patrol
|
Supercalifragilisticexpialidocious!
Not that I understand any of it, but I can see that it's awesome!
__________________
“Never do anything you can't take back.” —Rocky Russo |
09-29-11, 09:39 PM | #6 |
Black Magic
|
First texture render (lighting disabled):
As you can see I have more work to do on it. Not bad for first render with textures though! The textures and how they are defined in the GR2 file are somewhat confusing. You have a pointer that can point to the actual material or it could point to another pointer that can point to another pointer......so on and so forth I obviously don't have my pointers straight By looking at this graphically I can see that I'm not reading this part of the file correctly. |
10-11-11, 06:59 AM | #7 |
Admiral
Join Date: Mar 2007
Posts: 2,200
Downloads: 172
Uploads: 0
|
__________________
What we do in life echoes in Eternity |
10-16-12, 06:40 PM | #8 | |
Mate
Join Date: Nov 2011
Posts: 53
Downloads: 4
Uploads: 0
|
Quote:
Darkwraith, This link is dead do you still have the source code? |
|
11-13-12, 10:19 AM | #9 |
Bosun
Join Date: Jul 2004
Location: Ubi bene ibi patria
Posts: 65
Downloads: 257
Uploads: 0
|
please help me
Hi TDW and the others,
I am an old subsim fan since SHI (Silent Service) meanwhile I design vessels in low poly-design with MAX5.1/8. It was for sh3 a 3d-model of a small tractor steam tug and converted into sh3 by Rovi58 named NHDS2302. If the link is present no more Ican sent a vesion to you. Reading all these posts about your editor I think I will try to do that with shV, now. The last version of your editor I got is: 1.167.1. Because I was very ill the last months. Please maybe you can send the actual version to me: carolussteiner@web.de Best regards and many thanks to all the other modders! Karl |
11-13-12, 10:37 AM | #10 | |
Ace of the Deep
|
Quote:
Look at http://www.subsim.com/radioroom/show...70#post1942270 this thread; I think it will be what you are looking for. |
|
01-04-13, 07:39 PM | #11 |
Bosun
Join Date: Jul 2004
Location: Ubi bene ibi patria
Posts: 65
Downloads: 257
Uploads: 0
|
Hi Targor Avelany
many thank for your kindly tipp. Best regards Karl |
01-14-13, 01:54 PM | #12 |
Black Magic
|
Link at post #1 changed to reflect newest version - v 1.1.277.1
|
01-14-13, 02:37 PM | #13 |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
|
|
01-14-13, 04:44 PM | #14 | |
Frogman
Join Date: Aug 2011
Location: Poland, my homeland.
Posts: 304
Downloads: 241
Uploads: 0
|
Quote:
TheDarkWraith, GREAT!!! I'll test new version - of course I'm still waiting for PIFT by Privateer . Maybe you'll repair bug with AO-texture coordonates? But, THANK YOU EDIT Unfortunatelly, I also have this bug - I loaded file, and... gray background . TDW, If you have any time, please repair it . EDIT 2 When I selected "Fixed mode" in rendering tab - it's OK, but without textures - If I do sth bad, please give me tips. EDIT 3 Sorry for my fail , about gray background - everything is OK - I had to change SH5 install folder .
__________________
Dining place in Silent Hunter 5? NOW it's possible ! My graphics mod available here: http://www.subsim.com/radioroom/showthread.php?t=200862 Last edited by silentmichal; 01-15-13 at 09:58 AM. |
|
01-21-14, 03:09 AM | #15 | |
Admiral
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
|
Quote:
Obviously, the theme became lifeless... suddenly.
__________________
Alex ® Moses said: "Don't create yourself an idol"... |
|
|
|