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 12-30-21, 03:37 PM   #46
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

The basic code already will do things with no AO mappings.
The newest code will do all the work to correct the obj files in a blink of an eye!
Just need real world test files from different 3D programs as not all are the same once exported to the obj file format.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 12-30-21, 07:30 PM   #47
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Jeff-Groves View Post
The basic code already will do things with no AO mappings.
The newest code will do all the work to correct the obj files in a blink of an eye!
Just need real world test files from different 3D programs as not all are the same once exported to the obj file format.
All my models are created in Wings3D, but the files I am going to send you will probably be exported from Blender. Reason for that is that Blender has ways to quickly split hard edges. Split edges are needed for correct model smoothing, as neither the GR2 format nor the dat format support hard edges.

Unless you advise otherwise, my workflow will be: export from Wings3D as obj => import in Blender => apply edges split modifier => export from Blender as obj.
I will repeat this process for all the meshes composing my model, both for main mesh and UV2 mesh.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 12-30-21, 07:36 PM   #48
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

I believe kapuhy uses blender and his files are what I would call proper.
I'd still like to see Wings files also.
You and I both know that SOMEONE SOMEWHERE will bitch that my program don't work with what ever they are using to make models!
I want to cut them off at the knees!
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 12-30-21, 08:24 PM   #49
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Unless you make your importer to split hard edges automatically, the Blender step is needed, otherwise the game will try smoothing edges which it should not.

A good AO map can hide smoothing errors to a certain degree. Moreover, I suspect the GR2 import process to split edges which are not contiguous in the UV map. Yet, splitting edges before import is still advisable.

Doing that manually in Wings would take ages. If you want to test your program on Wings3D object files I could import the models exported from Blender back in Wings and export them again. Problem is (don't ask me how/why) Wings' obj importer won't recognize edges split in Blender. It simply welds them back.

Something has changed either in Blender's obj exporter or in Wings's obj importer, because this problem started only a couple of years ago. If you prefer I can try installing some old version of either program, and see if I can bypass the problem.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 12-30-21, 08:55 PM   #50
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

I'd prefer both versions. Wings and Blender.
The way the GR2 saves files don't give a crap about things like that.
What goes in is what comes out so to say.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 12-30-21, 09:03 PM   #51
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Jeff-Groves View Post
I'd prefer both versions. Wings and Blender.
The way the GR2 saves files don't give a crap about things like that.
What goes in is what comes out so to say.
So are you okay if I send you two sets of files? One exported directly from Wings 3D with hard edges still in place, and the other exported from Blender with split edges?

If memory serves, Skwas' dat importer does not handle smoothing groups (it throws an error when it meets them), but TDW's GR2 importer will just ignore them.
__________________
_____________________
|May the Force be with you!|
...\/

Last edited by gap; 12-30-21 at 09:37 PM.
gap is offline   Reply With Quote
Old 01-01-22, 12:18 PM   #52
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

2 sets would be great. Then I can compare imports to see the effects.
I basically just ignore any smoothing group statements.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 01-01-22, 06:01 PM   #53
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Jeff-Groves View Post
2 sets would be great. Then I can compare imports to see the effects.
I basically just ignore any smoothing group statements.
Hey Jeff, please check your inbox

@ ALL

Belated wishes of happy new year buddies! After so many patrols I hope 2022 found you in port and enjoying your leaves
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-02-22, 10:11 AM   #54
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

@ Jeff

I have updated my files (corrected a few Wings3D exports which had some hard edges wrongly set as soft, and added Blender-exported models with split hard edges). The download link of the updated files is the same as the one I sent you yesterday by PM. If you had already downloaded it, please discard the first download and download again
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-02-22, 03:01 PM   #55
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

Just downloaded the file.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 01-02-22, 04:04 PM   #56
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

A quick look at both Wings and Blender versions tells me a few things.

I can grab information from the Wings version that will make those a tiny bit faster to process. Basically? Since the counts of faces, verts, and such are listed? I don't have to run a loop to count all that on Wings files.

Blender files I'll have to do a loop just to count the stuff.
Probably won't be able to notice it but annoying none the less.

3DMax files also don't need that extra 'Blender' loop.

Blender files you sent seem to show a 'Better' way to organize faces so may reduce sort times. Going to be interesting to see the times for both.
Again it will probably be so fast one really won't notice!


Ahh. Wings also does not list a Normals or texture count so a partial count loop is needed.

I'd also check your settings for Wings to see if you can reduce the number of output to 6 digits.
__________________
I don't do Stupid. So don't ask.

Last edited by Jeff-Groves; 01-02-22 at 05:08 PM.
Jeff-Groves is offline   Reply With Quote
Old 01-02-22, 05:15 PM   #57
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Jeff-Groves View Post
A quick look at both Wings and Blender versions tells me a few things.

I can grab information from the Wings version that will make those a tiny bit faster to process. Basically? Since the counts of faces, verts, and such are listed? I don't have to run a loop to count all that on Wings files.

Blender files I'll have to do a loop just to count the stuff.
Probably won't be able to notice it but annoying none the less.

3DMax files also don't need that extra 'Blender' loop.

Blender files you sent seem to show a 'Better' way to organize faces so may reduce sort times. Going to be interesting to see the times for both.
Again it will probably be so fast one really won't notice!


Ahh. Wings also does not list a Normals or texture count so a partial count loop is needed.
Do normals stored in obj files really matter? I think TDW's editor can calculate them if they are not found in the imported files, and Silent3ditor has even an option for ignoring them. When working on dat objects for SHIII I couldn't spot any visual difference. Maybe the game calculates them on the fly if no normal vectors are stored on file (?)
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-02-22, 05:20 PM   #58
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

I'd have to play with TDW's importer again to answer that.
I know it does the Tangent and BiNormal stuff.
I recommend seeing if Wings can export with just a 6 precision after the decimal point though. GR2 files only go to that.
SH3 doesn't do Normals except under special things. No Units actually use them.
SH4 does in SOME areas.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 01-02-22, 06:09 PM   #59
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

OK. Let's talk about hard edges.
What is a hard edge? I'll start with how SH3 and SH4 handles them.
Say you make a Box. You NEED to have each side as a separate object, so to speak, to avoid the Games built in smoothing. That's been a well known for years.
How do you do that? In 3D Max I select the face for a wall and detach.
That produces a separate object as I suspect the Blender option to rid hard edges does.

I'm not sure if GR2 is smart enough to do that on it's own.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 01-02-22, 06:09 PM   #60
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Jeff-Groves View Post
I'd have to play with TDW's importer again to answer that.
I know it does the Tangent and BiNormal stuff.
Since in the 3D space normals, binornals and tangents are orthogonal to each other, only two of them should be needed. Calculating/storing the third vector on file would be pleonastic. Isn't it?

Quote:
Originally Posted by Jeff-Groves View Post
I recommend seeing if Wings can export with just a 6 precision after the decimal point though. GR2 files only go to that.
Unfortunately I don't see any export option for rounding numbers to only six decimal digits. Those are all the options in Wings3D's obj export dialog:



If it is important, I can ask in Wings3D's forum if there is a way to do that.

Quote:
Originally Posted by Jeff-Groves View Post
SH3 doesn't do Normals except under special things. No Units actually use them.
SH4 does in SOME areas.
That might explain why SHIII/IV's shading looks so flat compared to SH5...
__________________
_____________________
|May the Force be with you!|
...\/
gap 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 10:04 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.