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-05-21, 02:51 PM   #1
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default Almagest. Strict Import for SH5.

One of the biggest problems when importing with TDW's program is the loose import.
File size grows in an astronomical way!

1st thing you'll ask is "Why that Name?" Look it up!


2nd thing you'll ask is "How do you know it will work?"


There are many posts in the past where I TRIED to explain this all. Those are hard to find and it's time to teach a new crowd.

This is going to be a stand alone program ANYONE can use! No math. No 010 editor. Just run it and your files will be adjusted to a well known standard.
Well know by me any way!

Neal and Jimbuna helped solve my connection issues so this is my way of giving back to ALL my friends here at SubSim.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 03-05-21, 02:59 PM   #2
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

Why THAT name?

In the second century, Claudius Ptolemy, an Alexandrian astronomer and mathematician, wrote Mathematike Syntaxis (in Greek) or The Mathematical Compilation, a treatise on the apparent motions of the stars and planets. This work soon became known as The Greatest Compilation and it established the model of a geocentric universe, a scientific schema that would be followed for the next thousand years. When Ptolemy’s Greek work was adopted in the Islamic world, its title in Arabic was shortened to The Greatest, which when transliterated into Latin became Almagest.


People come up with some of the craziest names so this is my name for the program!
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 03-05-21, 03:06 PM   #3
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

Let us talk about details.
1st thing one needs to have is a complete understanding of the obj format.
It's a text file yes but do you REALLY understand how it works?
Then you need to have a complete understanding of how those files are adjusted and stored in a GR2 file.

Pretty sure very few reading this do know. You see what is exported and probably don't even look at the files in a text editor.
Even if you do it's Greek.
(Another salute to the Name! )
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 03-05-21, 03:15 PM   #4
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

I'm not going to explain the object file format. You can look that up for a basic understanding.

What I AM going to explain is HOW a GR2 file uses the format to store the information and how it does that!
Knowing that information tells me HOW to write a Converter!

Some of the information can also be used to Ghost S3D!
__________________
I don't do Stupid. So don't ask.

Last edited by Jeff-Groves; 03-05-21 at 03:23 PM.
Jeff-Groves is offline   Reply With Quote
Old 03-05-21, 04:09 PM   #5
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Of all the mad scientists and inventors, you are by far the one with the craziest names.

Following this thread.

Long life to the almighty Almagest

P.S: if someone wants to know more on the wavefront (obj) format, I can provide the basics
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-05-21, 04:39 PM   #6
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default Let's reveal the Magic

RAD Games GR2 format for storing the 3D object files is basically an obj file.
The mystical part is how they did it. (To most people)
Why do they export with so many faces and verts and such?

That is where a FULL understanding of the obj file format comes in SO important!

RAD took full advantage of the format in a way that just confuses most!
I'll call it a shuffling of the deck type approach.
We take 2 decks with different faces, discard what we don't need, then shuffle the rest but in an organized way with a template of where each card is.

Each card is recorded in the Faces section of the obj format with a number.
Each number in the Faces section is a line number.
So if we want vert 75? It will be in that catalog as 75.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 03-05-21, 04:44 PM   #7
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

Knowing all this? How did RAD do it in GR2?
Easy! They read the files, drop what they don't need, add what is needed, make sure file placement numbers are equal, then adjust the faces section to call the proper lines!

Being obj files are text files? Pretty easy to shuffle the deck in our favor!
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 03-05-21, 05:14 PM   #8
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default Time for Alchemy

A seemingly magical process of transformation, creation, or combination.

In all my years watching GR2 editors and such? The best I have seen is TDW's version. I rate it the best as it does not use the granny2.dll.

He did miss the one critical thinking about imports.
Now even S3D missed the mark so not the first time!

It is easier to work around S3D's faults but maybe I'll include that during programming.


Now I am concerned about the transformation\combination in this Alchemy.
I'll need to read 2 separate files, program to find the differences, then adjust everything to create 2 new files that meet the requirements.

Being doing that 2 files at a time would be slow?
Gonna need to make it a mass Alchemy type program.
So put all the files in a folder, click a button, and stand back!
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 03-05-21, 05:27 PM   #9
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

I will take files from people to experiment on.
I'll need both the normal file and any AO files.

Better to test what you have then play with something that may not match
what you are working in.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 03-07-21, 07:10 AM   #10
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by Jeff-Groves View Post
I will take files from people to experiment on.
I'll need both the normal file and any AO files.

Better to test what you have then play with something that may not match
what you are working in.
First of all, thanks for making the effort to create Almagest It will be invaluable for anyone planning to create new content for SH5.

Now, if I read you correctly re:files, you'd like examples of files we've been importing using TDW's tool in order to experiment on them? In that case, here's a sample:

Plane model

That's a plane I've been working on recently, upon importing it using TDW's program and following settings:
- Loose import
- Vertex data, uv1 data, normal data, calculate tangent and binormals: yes
- uv2 data, force subset ordering, update materials - no

Resulting GR2 file of that 8K vertices model is 1683 KB, while - for comparison - stock Avro Anson (7,1 K vertices) is 657 KB. I packed into linked file both .obj files before importing and the .gr2 file after import.
kapuhy is offline   Reply With Quote
Old 03-07-21, 09:08 AM   #11
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

@ Jeff

a quick question: if I got you correctly the core of your idea, when using your program we will need to check that the model we want to import in game has a number of of vertices and faces equal or lesser than the stock GR2 template chosen for the import. Is that correct?

If that was true, it would be a big incentive to keep our models as simple as possible...
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-07-21, 10:05 AM   #12
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

Strict import doesn't matter about size of the imported file.
Strict means all verts and such match on their numbers.
So if you have 100 verts you need to have 100 text coords and 100 normals (If included)
Both the diffuse obj and AO obj MUST match those numbers!

AND the faces must match! That is the tricky part.


I'll need to test the different versions of TDW's program as I'm not sure how he's defining Strict at this time.
__________________
I don't do Stupid. So don't ask.

Last edited by Jeff-Groves; 03-07-21 at 11:02 AM.
Jeff-Groves is offline   Reply With Quote
Old 03-07-21, 11:29 AM   #13
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

@gap, I hope you down load both mine and kapuhy's files to examine!




@kapuhy,

Using nothing but 010 editor to change your rudder,
I imported your rudder to the Avro GR2 file.
There is NO file size change to the GR2 file!


Look at the rudder size in your edited GR2 compared to mine!
I also opened my GR2 with Goblin.

Testing TDW's program I did remember a few things I forgot!
So this is going to be easier then I recalled!

I'll upload the test GR2 so you can see it for yourself.



https://www.mediafire.com/file/vypnt...test1.GR2/file
__________________
I don't do Stupid. So don't ask.

Last edited by Jeff-Groves; 03-07-21 at 11:38 AM.
Jeff-Groves is offline   Reply With Quote
Old 03-07-21, 11:41 AM   #14
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
@ Jeff

a quick question: if I got you correctly the core of your idea, when using your program we will need to check that the model we want to import in game has a number of of vertices and faces equal or lesser than the stock GR2 template chosen for the import. Is that correct?

If that was true, it would be a big incentive to keep our models as simple as possible...
So far I'd say stay smaller then the target GR2.
As I stated above? I'd forgotten a few things about Ghosting TDW's program.
It's all coming back now!
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 03-07-21, 12:29 PM   #15
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

So 3D object import as Strict works.
I still need to work on the texture part but it's looking good so far!

What I'll do now is to export the rudder and check the textures UV's in 3DS max.
That should give me the information I need to adjust things.
__________________
I don't do Stupid. So don't ask.
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 05:13 AM.


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.