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 03-20-21, 05:54 PM   #1
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,660
Downloads: 137
Uploads: 0


Default

You will need to find a GR2 with as close a count as possible but ALWAYS higher then your adjusted files.

You will still get a smaller ending GR2 then loose import will ever give you!

Remember this point!
Say you find a nice GR2 but it just has to many parts.
We can use the loose import to shrink them to nothing thus reducing the size even more!
Jeff-Groves is offline   Reply With Quote
Old 03-20-21, 07:24 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
Let's look at the 3D objects stored in a gr2 file.
Verts, normals, textures, etc ALWAYS have the same count.
Faces are totally separate from that.

So here's the magic and simplicity.
We can match the verts and such by just copying existing verts or whatever and pasting so each has the same count.

500 texture points? Make sure verts is 500 etc.

The Faces will ONLY USE what they call!
Thus no loading of the extra duplicate information!
So I can have 500 verts and textures, etc BUT the faces say only render 100!

Don't believe me?
Export a mesh from a GR2, open it in any 3D program then save it.
If your program optimizes an obj file? Compare them in notepad or any other text reader.
One of the biggest problems I had in the past, was matching vertex order in the main and uv2 meshes. There is a bunch of reasons why various obj exporters might change that order, but the final result is the same: after importing in GR2 Editor, the AO mapping is messed up even though the two imported objects are apparently identical in their vertex/face structure.

In theory, if all the vertices in an object had different coordinates, we could easily create a tool which will automatically sort uv-2's vertices according to main object's template. The problem is that, after edge-splitting hard edges (for correct smoothing in game), most import candidates will have a lot of duplicated vertices with identical xyz and uv coordinates, but placed on different meshes. Making our tool to automatically discern them wouldn't be that easy.

Quote:
Originally Posted by Jeff-Groves View Post
You will need to find a GR2 with as close a count as possible but ALWAYS higher then your adjusted files.

You will still get a smaller ending GR2 then loose import will ever give you!

Remember this point!
Say you find a nice GR2 but it just has to many parts.
We can use the loose import to shrink them to nothing thus reducing the size even more!
If I got you correctly, the above criterion should be applied not only to the main object, but also to all the subparts. Finding a GR2 file which will match the requirements for all the model parts, or shrinking all the parts in our models so that they won't exceed the vert count of the GR2 template they will be imported in, might be a little PITA, but I definitely see the advantages of your program and of the working method you are suggesting
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-20-21, 07:47 PM   #3
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,660
Downloads: 137
Uploads: 0


Default

Don't worry about Vert count nor texture count. That is easily sorted!
On face count? Those should be the same as far as count but can be adjusted.
They may be different but the GR2 file accounts for that!
Jeff-Groves is offline   Reply With Quote
Old 04-16-21, 11:40 AM   #4
AMZ
Watch
 
Join Date: Jul 2018
Location: FRANCE at Montpellier
Posts: 21
Downloads: 58
Uploads: 0
Default

Hello Jeff-Groves,

Following your feedback

Quote:
Originally Posted by Jeff-Groves View Post
With just a little text editing of the obj files you can do a strict import
and get a much smaller file size.


Personally?
I use a script I wrote for 010 that looks at the new obj files and adjusts them for a strict import.
Hello Jeff-Groves,

Sorry to answer you so late, I admit I did not understand the meaning of your advice.
Today I am less stupid, thanks to your writings elsewhere.

In this regard, you say that you have made an application: "Almagest".
Is she available? Where can we find it?

Thank you




On the other hand, maybe you have an idea of what concerns me?

Click Here ;
 
Quote:
Originally Posted by AMZ View Post
Hi to all


After the first advice, and thank you for that, I thought I'd manage on my own, but I have some problems with the realization

I am coming back to you in the hope of having a solution.
My problem: Creating an earthly object as a characteristic Seamark
Example: a church, a bell tower, a lighthouse, etc.


Here are my questions:

1 - TDW editor for GR2 Files seems a great tool, but for lacking of information I am not an expert in its use.

Can we create from nothing, from zero

*. the skeleton bones and a hierarchy of these bones?
*. Initial parent with his own name then parentage for the Meshs (Diffus - AO) then Meshs Collision?

2 - I got around the No. 1 problem for my first realization by copying an existing object

Either in C:... / ... 'Silent Hunter 5 with TWOS'data-Terrain-Locations'CustomAreas-germany
The Church object: church. GR2 and associated .sim

Note: This one as is in the game, is not visible if placed with the mission editor ...
The 3D model is very far from the reference point, about 1 km after Gmax or Blender.

So with Blender I remade the church at the reference point, so that an placement in the mission editor corresponds to the place pointed and seen in the game, map or TAI .
Of course, I transcribed the exported files in .obj format using the Note Block.
I checked the correct transcription by importing and exporting again in the Wings3D editor.

Using TDW-editor, I imported the renamed files
Church_AMZ.obj
Church_AMZ_AO.obj
And Collision_ Church_AMZ.obj
They appear well at Zero Point ... It's ok.

But since this is a clone of the GR2 file with 3D replacement,
I decided to replace the names of the skeleton and bones, then the parents Meshs, in order to have the identifiers remapped. Not expert with the TDW, I did it using a Hexa editor.

Here's my second question:

*. Can we in TDW change the names of skeleton, bones etc?
*. In the same way for the Meshs, can we edit the names of the Parents masters?
Sometimes this is possible for certain filiations. ???

Not being a programmer, I just replaced Letters by Letters the name without changing the length of the GR2 file (Hexa).
Of course, I remapped the Church_AMZ.sim file accordingly.
The Church_AMZ.GR2 file thus modified opens correctly in the TDW, after having automatically corrected the byte counter ...
Control by opening everything in GobinEditor (_.GR2 and _.sim merge)
...
Everything seems correct!
I did a mission (MissionEditor) in order to have the visual in the game ... There's nothing???



Please, can you give me a Thread where I could refer ?
Can you help me in my process ?

With all my gratitude.
__________________
On peut braver les lois humaines mais non résister aux lois de la nature.
Vingt mille lieues sous les mers (1869) - Jules Verne
AMZ is offline   Reply With Quote
Old 11-24-21, 03:29 PM   #5
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,660
Downloads: 137
Uploads: 0


Default

A few months down the road and several Alpha versions to sort problems and all is GOOD!
Mostly real life obligations have kept me away from the final Coding parts.
Final parts are to actually write the Faces and texture sorting.
That I wrote in my head while driving all over the USA.
Then debugged much of it in my head!
Jeff-Groves is offline   Reply With Quote
Old 11-25-21, 12:17 PM   #6
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 874
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by Jeff-Groves View Post
A few months down the road and several Alpha versions to sort problems and all is GOOD!
Mostly real life obligations have kept me away from the final Coding parts.
Final parts are to actually write the Faces and texture sorting.
That I wrote in my head while driving all over the USA.
Then debugged much of it in my head!
Good to hear it! I have a queue of ship models on the slipways waiting for import to SH5 and I'm looking forward to use Almagest on them. Keep up the good work as BdU uses to say
kapuhy is offline   Reply With Quote
Old 11-25-21, 01:04 PM   #7
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,660
Downloads: 137
Uploads: 0


Default

I did figure out a lot that allows me to 'kind of' brand any files.


It does NOT have any effect on SH5 files using Almagest.
And you'd need the Key files I also created to decode the hidden information!

Call it an Easter Egg! I'm well known for those!
Jeff-Groves 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 09:42 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.