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-07-21, 12:49 PM   #16
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

I think I need to flip tex coords on import.


PERFECT! It's on like Donkey Kong now!
(According to the Urban Dictionary (www.urbandictionary.com) “Its on like Donkey Kong” is: a phrase to denote that it's time to throw down or compete at a high level; something is about to go down.)
__________________
I don't do Stupid. So don't ask.

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


Default

I have the basic stuff done.
I need something that uses a Diffuse obj and an AO obj file now.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 03-07-21, 01:15 PM   #18
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by Jeff-Groves View Post
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.
Great

Just checked - 656 KB both files, and for comparison - if I import rudder into Anson using loose import file grows to 660. Might not seem much for just this one part, but it adds up - when all parts are imported with loose import files grow to about twice original size.
kapuhy is offline   Reply With Quote
Old 03-07-21, 01:23 PM   #19
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

Quote:
Originally Posted by kapuhy View Post
Great

Just checked - 656 KB both files, and for comparison - if I import rudder into Anson using loose import file grows to 660. Might not seem much for just this one part, but it adds up - when all parts are imported with loose import files grow to about twice original size.
Yes. File sizes are crazy under the Loose Import option!
It's very easy to Ghost and import with TDW's program.
But I don't expect people to do it by hand as I can thus I'll write a program to do it for you!
As I am testing I see I'll need a way to tell you if a targeted GR2 will work.
I'll get the conversion function working then look into that problem.

Here's the rudder obj file I adjusted.
Compare it to your original rudder obj.
You'll see what I did if you look at them in Notepad or 010.
Plus you can import it yourself and actually see the results!

https://www.mediafire.com/file/0p1nj...Ruder.obj/file
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 03-07-21, 01:50 PM   #20
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

So a Strict import MUST match existing information in a GR2 file as I can see.
Not a problem as long as you select a file with 3D models below or the same as your intended imports.

Lots of ways around that. It's going to be up to you to figure out somethings.
Say you have a model with larger sizes for a 3D object.
Cut it into pieces and use a GR2 that will accommodate more parts if need be.

Say the selected GR2 has to many parts? Throw in a totally zeroed part!
Or just add something special.

Important part is to reduce the ridiculous Loose import option and create files of a nominal size!

I don't need any Tool but 010 editor to do anything I want with a GR2 file.
But that's just me.
You need and use other programs so I'm just giving you what I talked about years ago.
You have now seen the proof of concept by example files.
It's not a theory. It's a proven way to reduce file sizes using an existing Program by TDW.
I'm not criticizing his work! It's a fantastic program!
I'm just addressing flaws as I have done with S3D in the past.

Should TDW make a magic appearance here? I'd gladly tell him how to adjust his Program.
__________________
I don't do Stupid. So don't ask.

Last edited by Jeff-Groves; 03-07-21 at 02:08 PM.
Jeff-Groves is offline   Reply With Quote
Old 03-08-21, 08:01 AM   #21
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 have the basic stuff done.
I need something that uses a Diffuse obj and an AO obj file now.
Here's another test subject - this is one of relased ships from my coaster mod, has diffuse, ao as well as damage and lod models. I imported it using loose import setting into NF_boat_1 (Coastal Boat) gr2 file (both obj before import and imported files attached).

Test subject - motor coaster
kapuhy is offline   Reply With Quote
Old 03-09-21, 01:03 PM   #22
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

@kapuhy

Those files are exactly what I wanted to look at.
They show the problem I'm working to fix to allow them to be adjusted and imported as Strict.


If you look at the 2 files for the rudder you can see the problem when you look close at the faces section of the obj files.
Same number of faces but they do not match! That is the shuffling part that I spoke about.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 03-12-21, 11:04 AM   #23
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

One of the things I'm working on is to test different sized obj imports under the Loose option.

I'm trying to see if that option can be used to create custom sized perimeters
that We could then use for a strict import to keep file size as low as possible.

The adjustments to the files one creates are figured out and tested.
Just need to work on the code for that.

It's actually really simple based on how the GR2 file is constructed and how the obj format works.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 03-13-21, 12:17 PM   #24
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

Yes. We can shrink the meshes in a GR2 file with a loose import.
Not a perfect way to do so since the Loose import is based on false assumptions and a total misunderstanding of how the GR2 meshes work with the obj format.
But a good work flow option to take advantage of.
__________________
I don't do Stupid. So don't ask.

Last edited by Jeff-Groves; 03-13-21 at 12:33 PM.
Jeff-Groves is offline   Reply With Quote
Old 03-13-21, 02:32 PM   #25
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
Yes. We can shrink the meshes in a GR2 file with a loose import.
Not a perfect way to do so since the Loose import is based on false assumptions and a total misunderstanding of how the GR2 meshes work with the obj format.
But a good work flow option to take advantage of.
Thank you Jeff

Currently working on my model's diffuse mapping (AO mapping already done). I am eager to see the result of my efforts in game, and I hope your program will help me to optimize the import.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 03-18-21, 02:02 PM   #26
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

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.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 03-18-21, 02:30 PM   #27
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
Uploads: 0


Default

How will this program work?

It will look at both a base obj file and if selected the AO version.
Then it will adjust the files to have the same counts.

Once saved? You find a candidate GR2 file.
Say you need 500 verts and 95 faces to do a Strict import.
Your files have 400 verts and 35 faces.
We run the program and tell it the verts and faces needed.
It will adjust them for a strict import from there.

This is just Ghosting both TDW's program AND the GR2 files based on knowledge of how both work!

A similar approach will Ghost S3D also!

I prefer to call it Ghosting instead of Faking it till you make it.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 03-20-21, 05:49 AM   #28
kapuhy
Grey Wolf
 
Join Date: Oct 2010
Location: Poland
Posts: 873
Downloads: 72
Uploads: 3
Default

Quote:
Originally Posted by Jeff-Groves View Post
Once saved? You find a candidate GR2 file.
Say you need 500 verts and 95 faces to do a Strict import.
Your files have 400 verts and 35 faces.
We run the program and tell it the verts and faces needed.
It will adjust them for a strict import from there.
Forgive layman question If my files have 600 verts and 115 faces, I'll need to find a template gr2 with higher count than mine, right? So instead of having to find template with identical count like is now the case (which is pretty much impossible unless we're just making minor edits to stock model), we'll use templates with <equal or lower> count?
kapuhy is offline   Reply With Quote
Old 03-20-21, 05:54 PM   #29
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,300
Downloads: 130
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!
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 03-20-21, 07:24 PM   #30
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
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
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:02 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.