SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 02-03-19, 01:11 PM   #1
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,655
Downloads: 137
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
Okay, I will try you tool, I hope it will help with the secondary UV map importing, because often GR2 editor messed it up. IIRC at some point TDW addressed the problem and partly fixed his importing routine, but the preparation of the AO model and its importing are still a very delicate and problematic step of GR2 Editing. I think that if vertex order and UV faces are not identical in the AO model as in the main model, errors are still very likely...
I'll have to go back through that thread and refresh my mind.
I do know I pointed out better ways to get imports to work and give a smaller GR2 file size. I actually started the code to add to objsort back then that would produce a file ready for import that solved a lot of issues and jumped past the programs problems.
Pretty sure he started hateing me again about that time.

Get me an example with all the needed files and send it to my e-mail.
Without going back through that thread? I'm pretty sure you can hand edit the obj files to fix somethings.
Not the best way to do it but it can be coded.

Last edited by Jeff-Groves; 02-03-19 at 01:26 PM.
Jeff-Groves is offline   Reply With Quote
Old 02-03-19, 01:30 PM   #2
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Jeff-Groves View Post
Get me an example with all the needed files and send it to my e-mail.
Without going back through that thread? I'm pretty sure you can hand edit the obj files to fix somethings.
Not the best way to do it but it can be coded.
You are asking me to look back into files four or five years old. Soon we will need to import in game models of some complexity requiring an AO map, and probably we will get plenty of examples to study
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-03-19, 01:34 PM   #3
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,655
Downloads: 137
Uploads: 0


Default

I seem to be fairly good at working around issues.


I also know the secret (really not that secret) as to how the GR2 stores models and how TDW's program can be tricked.
May be time to start a new thread about things like this.
Jeff-Groves is offline   Reply With Quote
Old 02-03-19, 04:45 PM   #4
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,655
Downloads: 137
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
You are asking me to look back into files four or five years old. Soon we will need to import in game models of some complexity requiring an AO map, and probably we will get plenty of examples to study
Start reading from page 137 or so in the TDW extractor thread.
I explain a lot there. (Try to ignore the bad stuff. )
I'm sure there's another thread somewhere that gives even better information.
Maybe around page 105 of same thread.

Last edited by Jeff-Groves; 02-03-19 at 05:12 PM.
Jeff-Groves is offline   Reply With Quote
Old 02-04-19, 10:34 AM   #5
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Jeff-Groves View Post
Pretty sure he started hateing me again about that time.
Quote:
Originally Posted by Jeff-Groves View Post
(Try to ignore the bad stuff. )
LOL

Quote:
Originally Posted by Jeff-Groves View Post
I seem to be fairly good at working around issues.


I also know the secret (really not that secret) as to how the GR2 stores models and how TDW's program can be tricked.
May be time to start a new thread about things like this.
Yes, that's a good idea. Maybe after we start facing all the possible problems and we have have them figured out. I am actually surprised that no one except me and you has ever pointed them out, and I start wondering if they are not coming from Wing3D's obj exporter more than from a weakness of the GR2E obj-importing code

What we should actually do, is encouraging people to use TDW's program (its most basic and important features are not so difficult to use after all) and to report any problem connected to its usage. In this sense, starting a new thread as a collector of reports and technical questions with their answers, would be a excellent service for the community and a good guide for you to know where to address your inspections and what needs to be fixed more urgently.

Quote:
Originally Posted by Jeff-Groves View Post
Start reading from page 137 or so in the TDW extractor thread.
I explain a lot there.
I'm sure there's another thread somewhere that gives even better information.
Maybe around page 105 of same thread.
I did, but I think you meant post #137. Anyway, as you said, I'll have to refresh my memory by re-reading that thread from the beginning...
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-04-19, 12:40 PM   #6
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,655
Downloads: 137
Uploads: 0


Default

Post #2060 is one place I talk about the GR2 files when We export them to obj.
Jeff-Groves is offline   Reply With Quote
Old 02-04-19, 12:58 PM   #7
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Jeff-Groves View Post
Post #2060 is one place I talk about the GR2 files when We export them to obj.
This one:

Quote:
Originally Posted by Madox58 View Post
I talked with gap about the file size on export and how RAD has the files stored in the GR2 files.
Don't recall if it was by PM, E-mail, or in a thread here somewhere.

I refer to it as 'shuffeling' or adding redundant verts to balance file sizes.

Importing the files into most 3D programs gets those thrown out as most programs optimize by default.
I remember you discussing about the importance of these "redundant vertices", though to be totally honest I never fully understood what's the point about them
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-04-19, 01:12 PM   #8
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,655
Downloads: 137
Uploads: 0


Default

Say we have 50 verts with their 50 normals.
But it has only 30 vts. (texture coords)
Faces don't matter as those are stored in a separate area.

GR2 stores with vt, vn, and vt in a structure.
So we run out of vt's!
TDW did some crazy stuff which does account for that but increases file size in a wild way.

So all you need to do is add to the vt count to have a balanced file.
They can be zero coords or re-use already used coords. It don't matter!
Now Exported meshes from a GR2 HAVE this extra info!
Once imported into say 3D Max? Max DUMPS the redundant stuff!
So an export with NO modifications to the file WILL NOT have the extra info.

That forces you to use TDW's strange import function and the result is a file MUCH larger then it needs to be.
I believe there's a 'clean' import or something? That sees the file as proper for import and no extra processing is needed.
Thus smaller file sizes.

Somewhere in the Exporter thread or else where I PROVED this and gave the answer!
I'll see if I still have objsort code and add to it to adjust for this.

Last edited by Jeff-Groves; 02-04-19 at 01:38 PM.
Jeff-Groves is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:54 AM.


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