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 01-18-22, 07:00 PM   #1
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
I guess I'm gonna need some crayons to explain things.


Quote:
Originally Posted by kapuhy View Post
If its my tramp steamer MisterM was writing about
Quote:
Originally Posted by Jeff-Groves View Post
We ARE talking about dat file import of the files Mister_M sent me.
I have not seen the ORIGINAL FILES! Just what I got today.
Sorry for the misunderstanding guys, I wasn't aware that Mister_M had already sent his own version of kapuhy's steamer to Jeff

Quote:
Originally Posted by kapuhy View Post
this might also be my "fault" for using "lightmap pack" function for smaller faces to avoid problem I had where small and long faces like ropes and railings were omitted in AO baking. Lightmap pack uv-maps faces as separate rectangles in 2d space so there would be many more edge cuts in ao uvmap than in diffuse uv map.
Okay, that explains the huge difference in vt coordinate count between the two files. It also proves that I was wrong in thinking that GR2 editor does not read UV face information from the AO object file. If it didn't, the unbalance/different order of vt lines between the two files would have meant a bad secondary UV map, but this is obviously not the case

Quote:
Originally Posted by Mister_M View Post
I guess I have to copy/paste all the lines into 2 .txt files ?
EDIT : So, order is different, a long block (nearly the first 1/3) has been put at the end...
I am sorry to say that this is a huge problem. One of the prerequisites of my spreadsheet is vertices in the main and in the UV2/AO objects to be in the same order. I could identify and sort vertices according to their coordinates. This method would work for simple objects, but I could not easily discern vertices with the same coordinates, a rather common occurrence with edge-split models. In theory I could discern overlapping vertices by checking which faces they are part of, but that would be an overly complicated method; before I come up with a semi-decent routine, you could redo ten times your changes on kapuhy's model

My suggestion is to switch to Blender for final model editing. This program supports object multi-mapping, i.e. the assignation of multiple UV maps on the same object. You can even import an UV map from one object to another identical object, so whatever changes you do to the model, you are sure that the two exported obj files will be identical in vertex/face structure.
Else, if you want to stick to Wings3D, be more careful. You want to ungroup the main model? Immediately after, ungroup the AO model too. You want to regroup a group of sub models? Make sure that you regroup exactly the same objects for both models. Your actions on each model should be specular and you should perform them exactly in the same order for having a chance of success.


Quote:
Originally Posted by Jeff-Groves View Post
In a DAT file? number of texture coords and faces does NOT matter!
Unlike SH5 where it DOES matter! (Thus the addition of false info to balance a strict import)

In Dat files, like GR2 files, ALL verts in ALL files MUST MATCH!

The files I have show that the COUNT of verts is fine but the placement does not match between the main and AO obj files.
Thus the Faces are off! Hell! For S3D and TDW's Tool? You could zero every Vert in the AO and as long as counts match? It will import!
Because they DO NOT read and save the verts in the AO obj!
It all makes sense
__________________
_____________________
|May the Force be with you!|
...\/

Last edited by gap; 01-18-22 at 07:27 PM.
gap is offline   Reply With Quote
Old 01-19-22, 05:13 AM   #2
Mister_M
Grey Wolf
 
Join Date: Feb 2021
Posts: 925
Downloads: 27
Uploads: 0


Default

I have checked the original Hull1.obj and Hull1_AO.obj of Kapuhy's model.

- in main model = vt = 2102
- in AO model : vt = 13772

- v lines are identical and in the exact same order

No glitch in game.
Mister_M is offline   Reply With Quote
Old 01-19-22, 05:38 AM   #3
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Mister_M View Post
I have checked the original Hull1.obj and Hull1_AO.obj of Kapuhy's model.

- in main model = vt = 2102
- in AO model : vt = 13772

- v lines are identical and in the exact same order

No glitch in game.
Good news! That means that texture coordinates' count/ordering is not critical for UV2 import neither in granny models nor in .dat ones
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-19-22, 05:40 AM   #4
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 874
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by Mister_M View Post
I have checked the original Hull1.obj and Hull1_AO.obj of Kapuhy's model.

- in main model = vt = 2102
- in AO model : vt = 13772
Wow. I might look for another way to make AO texture bake in future

Through in SH5 Goblin editor, it shows Armora having 69k verts and 28 k tris total while (comparable in size) stock N3SA1 is 27k verts and 11 k tris, so i'd say proportion is similar.

EDIT: btw, Mister_M, if you'd like to make some changes to model in Blender I can send you .blend files so there's less importing/exporting.
kapuhy is offline   Reply With Quote
Old 01-19-22, 06:29 AM   #5
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by kapuhy View Post
Wow. I might look for another way to make AO texture bake in future
Why don't you bake your AO textures in Mod Tools (i.e. the free version of Autodesk Softimage)?
I started using that program after Jeff's advise. Its texture baking utility features a lot of useful options for customizing the output. They can be a bit confusing at the beginning, but imo they are worth the effort of learning them.
On medium settings, my bakes never missed a single texel even on very minute parts, but I must add that I always unwrap my models manually.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-19-22, 06:33 AM   #6
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 874
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by gap View Post
Why don't you bake your AO textures in Mod Tools (i.e. the free version of Autodesk Softimage)?
Never knew such a thing existed Thanks for heads up, will check it out.
kapuhy is offline   Reply With Quote
Old 01-19-22, 06:45 AM   #7
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by kapuhy View Post
Never knew such a thing existed Thanks for heads up, will check it out.
My pleasure. Let me know if you need any help with it. If you want I can also tell you my favourite settings. Depending on model complexity and final pixel resolution a good bake might take 20 to 40 minutes, but if you have a more modern computer it might take even lesser
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-19-22, 01:13 PM   #8
Mister_M
Grey Wolf
 
Join Date: Feb 2021
Posts: 925
Downloads: 27
Uploads: 0


Default

So, finally, where does the glitch I'm experiencing come from ? Only a difference in the order of vertices between main and AO objects ?

Quote:
Originally Posted by kapuhy View Post
Mister_M, if you'd like to make some changes to model in Blender I can send you .blend files so there's less importing/exporting.
Quote:
Originally Posted by gap View Post
My suggestion is to switch to Blender for final model editing. This program supports object multi-mapping, i.e. the assignation of multiple UV maps on the same object. You can even import an UV map from one object to another identical object, so whatever changes you do to the model, you are sure that the two exported obj files will be identical in vertex/face structure.
I don't have Blender installed, and don't know how to use it.

Quote:
Originally Posted by gap View Post
Else, if you want to stick to Wings3D, be more careful. You want to ungroup the main model? Immediately after, ungroup the AO model too. You want to regroup a group of sub models? Make sure that you regroup exactly the same objects for both models. Your actions on each model should be specular and you should perform them exactly in the same order for having a chance of success.

Last edited by Mister_M; 01-19-22 at 01:36 PM.
Mister_M is offline   Reply With Quote
Old 01-19-22, 02:40 PM   #9
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Mister_M View Post
So, finally, where does the glitch I'm experiencing come from ? Only a difference in the order of vertices between main and AO objects ?
Yes, at this point we can conclude that this is the main, and probably the one problem

Quote:
Originally Posted by Mister_M View Post
I don't have Blender installed, and don't know how to use it.
I think no one knew how to use Blender before installing it and starting to mess with it

At the beginning the learning curve can be step, but on the internet there are a lot of guides and video-tutorials covering even the most advanced of its functionalities. I myself am still learning them. I think I will stick to Wings3D as my main modelling tool because I feel more proficient with it, but there are a lot of cool things you simply can't do in Wings and you can do in Blender. Why giving them up?
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-19-22, 02:58 PM   #10
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 Mister_M View Post
So, finally, where does the glitch I'm experiencing come from ? Only a difference in the order of vertices between main and AO objects ?
Yes. And there is a VERY easy way to see this in Wings3D, Blender, 3DS Max, or any other 3D program.

Copy the Faces section in the AO obj file.
(Obj files are just text files!)

Paste that over the faces section of the main obj file then open it!

If it looks like garbage? It is Garbage!

For GR2 strict import? We need to sort the faces and texture coords.
For SH3/4? The faces and textures are stored in a different TMAP section!
Jeff-Groves is offline   Reply With Quote
Old 01-19-22, 03:56 PM   #11
Mister_M
Grey Wolf
 
Join Date: Feb 2021
Posts: 925
Downloads: 27
Uploads: 0


Default

So, in short, it's impossible to realise (unless checking everything with your trick) that AO objects are incorrect before seeing it in game... because S3D only checks if there are the same number of vertices between main and AO obj...

Quote:
Originally Posted by gap View Post
I think no one knew how to use Blender before installing it and starting to mess with it
I was sure you were about to say something like that...
Mister_M is offline   Reply With Quote
Old 01-19-22, 04:01 PM   #12
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 Mister_M View Post
So, in short, it's impossible to realise (unless checking everything with your trick) that AO objects are incorrect before seeing it in game... because S3D only checks if there are the same number of vertices between main and AO obj...
Correct!
But you can just look at the first few lines of verts in each file and see that you have a problem.
Jeff-Groves is offline   Reply With Quote
Old 01-21-22, 09:12 AM   #13
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Mister_M View Post
I was sure you were about to say something like that...
Hahahah, I am predictable and you know me well. My point still stands though
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Reply


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 11:38 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.