SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   GR2 Editor/Viewer/Extractor/Importer (https://www.subsim.com/radioroom/showthread.php?t=188290)

sunpack1 12-02-18 05:40 PM

TDW GR2 Editor Export/Import Option!
 
Have decided to make some mods and downloaded TDW editor/extractor/importer. Could NOT stop reading the almost 200 pages of this thread which was so enjoyable to learn about TDW tremendous effort in the makind this development possible, as well as Trumpteer's contribution as well as others...thank you for your time and hard work, congratulations to all!



After installing de editor had a lot of fun opening gr2 files. Inspired by this I am hoping to make a few mods for the game. I am a naval architect thus CAD software work have been in my work circle for many years.



Could not find a current tutorial except for some dead links posted by BigRed but all functionality is pretty straight forward except for export/import option is not in the menu.


Would appreciate if someone can help to point out how this is done. I have the latest version 11.459.1


Thank you!


SunPack1

Jeff-Groves 12-02-18 05:46 PM

Hi Mate!
First, that would have been me as privateer. Not Trumpteer!
:haha:

I'm still around so you can always PM me with questions.

sunpack1 12-02-18 06:34 PM

Sorry Privateer, I guess I was lost in space...LOL!


Sent you a PM..




Thanks a Lot!




Armand/SunPack1

Aktungbby 12-02-18 08:08 PM

Welcome aboard!
 
sunpack1!:Kaleun_Salute:

sunpack1 12-02-18 08:11 PM

Thank you, Nice of you....Great to be here!




Armand/SunPack1

kapuhy 12-01-19 02:48 PM

Import from Blender
 
Hello,

Trying to use GR2 Import option, I've run into a problem:

- Import works with .obj files I exported from game's gr2 files using gr2 editor
- However, any file I import into Blender and then export back to .obj, or any file created in Blender in first place and exported to .obj gives me "No verticies found" file error.

It seems that the problem somehow lies in Blender's import/export to/from .obj format. Has anyone succesfully imported objects done in Blender? If so, what were your export settings?

gap 12-04-19 06:37 PM

Quote:

Originally Posted by kapuhy (Post 2638727)
Hello,

Trying to use GR2 Import option, I've run into a problem:

- Import works with .obj files I exported from game's gr2 files using gr2 editor
- However, any file I import into Blender and then export back to .obj, or any file created in Blender in first place and exported to .obj gives me "No verticies found" file error.

It seems that the problem somehow lies in Blender's import/export to/from .obj format. Has anyone succesfully imported objects done in Blender? If so, what were your export settings?

Hi kapuhy, my main modelling tool is Wings3d and I don't think I ever tried feeding Blender-exported models directly into Gr2 Editor (or if I did I forgot). Anyway from your description the problem seems to be a format used by Blender's obj exporter that Gr2Edit dislikes.

Obj files are easily edited using a spreadsheet program or any text editor but before we start digging into them,, can you download Wings3D and check that on your system Gr2Editor can load Wings3D -exported obj files?

kapuhy 12-05-19 04:13 PM

Quote:

Originally Posted by gap (Post 2639132)
Hi kapuhy, my main modelling tool is Wings3d and I don't think I ever tried feeding Blender-exported models directly into Gr2 Editor (or if I did I forgot). Anyway from your description the problem seems to be a format used by Blender's obj exporter that Gr2Edit dislikes.

Obj files are easily edited using a spreadsheet program or any text editor but before we start digging into them,, can you download Wings3D and check that on your system Gr2Editor can load Wings3D -exported obj files?

Hi Gap,

I just tried method you proposed and I'm looking at my ship model in TDW's gr2 editor :) Thanks!

To be more specific, Blender doesn't have export directly to Wings3D so I exported to .3ds in Blender, then imported it in Wings3D and reexported to .obj from there. Resulting .obj file can be imported by TDW's program.

gap 12-05-19 06:10 PM

Quote:

Originally Posted by kapuhy (Post 2639228)
I just tried method you proposed and I'm looking at my ship model in TDW's gr2 editor :) Thanks!

My pleasure kapuhy, I am glad that my workaround worked for you! :up:

This afternoon I have been looking into your issue, and after taking a quick glance at a blender-exported obj file in notepad, I think I might know what is causing Gr2Editor not to import your files directly. The following link describes pretty well the issue:

https://gamedev.stackexchange.com/qu...ve-no-newlines

If my guess is correct, you should apply the opposite* of the following method on your obj files if you wish to import them in Gr2 Editor without the W3D step:

http://sql313.com/index.php/blog/62-...ine-characters

* Just make sure that you are replacing the \n (Line Feed, LF) character with \r\n (Carriage Return and Line Feed, CRLF).

Quote:

Originally Posted by kapuhy (Post 2639228)
To be more specific, Blender doesn't have export directly to Wings3D so I exported to .3ds in Blender, then imported it in Wings3D and reexported to .obj from there. Resulting .obj file can be imported by TDW's program.

Both the obj and the 3ds format are well supported by Blender and Wings3D. You can use either of them to port your projects from one program to the other :)

kapuhy 05-15-20 01:23 PM

Ok, another question :)

I exported Armed Trawler through GR2 Editor to Blender, modified the model and imported it back. Everything went fine, except for one thing: one of hull parts keeps having its subsets switched during import back into .gr2. It goes like this:

1) Before exporting: subset0 is deck and subset1 is hull
2) In Blender: subset0 is deck and subset1 is hull
3) Exported from blender to .obj: subset0 is deck and subset1 is hull
4) After importing back to .gr2 file in GR2 Editor, suddenly:
subset0 is hull and subset1 is deck...

This causes each subset to use wrong material, and even if I switch the materials in GR2 editor, it seems only gr2 editor recognizes it - in Goblin, and in game, ship keeps using wrong materials for both subsets.

All other parts, which I exported/imported exactly the same way, work fine. I tried turning on the "force subset ordering" option, but it just gives me an "invalid input" error.

https://i.imgur.com/uvzAL7B.png

Jeff-Groves 05-16-20 01:46 PM

Send me a link to the exported files from the GR2 and the files your trying to import.

kapuhy 05-16-20 03:09 PM

Quote:

Originally Posted by Jeff-Groves (Post 2671026)
Send me a link to the exported files from the GR2 and the files your trying to import.

I've sent you PM with the link.

Jeff-Groves 05-17-20 10:10 AM

Your Blender obj files have subset1 before subset0

I suspect that is the problem.
:hmmm:

To reverse the way they are packed in the file you need to save only Subset0 to an obj file.
Then import subset1 to that file and save.

That should reverse the way they are in the final obj file.
It worked like that in 3D Max anyway.

kapuhy 05-17-20 04:00 PM

Quote:

Originally Posted by Jeff-Groves (Post 2671208)
Your Blender obj files have subset1 before subset0

I suspect that is the problem.
:hmmm:

To reverse the way they are packed in the file you need to save only Subset0 to an obj file.
Then import subset1 to that file and save.

That should reverse the way they are in the final obj file.
It worked like that in 3D Max anyway.

Thanks Jeff,

I tried your method and I'm happy to report it worked like a charm :up:

This means civilan version of Armed Trawler coming soon :)

Jeff-Groves 05-17-20 04:01 PM

Fantastic Mate!
:salute:


All times are GMT -5. The time now is 04:56 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.