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-21-12, 03:46 PM   #1
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default [WIP] PIFT

Privateer's Intellegent File Transformer.
Or the sound a cigarette makes when you drop it in a can of Beer.


What it is is a program that adjusts obj files so one can import them with TWD's GR2 program in the strict manner.

You can see this post for the problem I'm addressing.
http://www.subsim.com/radioroom/show...39#post1907739

You may need to back up several posts to fully understand what I'm talking about.
Or you can ask here and I'll explain the issue.

I got very tired of doing things by hand so I'm codeing everything to do it automagically.

What you will be able to do is import anything from SH4 with the proper AO mappings intact!
Or create all new AO's (following certian rules) and import with no problems and no unneeded overhead.


Once TDW has time to work on his code I'll explain everything to him so he can code this into his Program.
Then mine will be depricated.
  Reply With Quote
Old 12-21-12, 04:23 PM   #2
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

woot! I'll test this as soon as I come back!
Targor Avelany is offline   Reply With Quote
Old 12-21-12, 04:42 PM   #3
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

If one wants to see the problems as they stand now?
Try to import stuff from SH4 as exported by S3D.


That's why, I believe, we don't see a mass conversion project in the works at this point in time.

Until the imports are correct? It won't happen and your stuck with the limited dat format.

A secondary issue is that each object needs to be exported one at a time with S3D.
I'll address that later.
  Reply With Quote
Old 12-22-12, 07:15 AM   #4
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Great tool privateer, can't wait to put your PIFT into action
gap is offline   Reply With Quote
Old 12-23-12, 04:29 PM   #5
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

The first part of PIFT is nearly finished and I hope to have it ready for anyone to test soon.


The first part will take files exported from SH4 and correct them so TDW's GR2 program will import them without all the overhead I'm seeing.
It should also work with self created obj files.

This first part does not address the problem of importing AO mappings yet.
The second part will handle that. (I hope! )

You'll need to download and install MeshLab as I do use the MeshLab Server to do the basic transformation.
  Reply With Quote
Old 12-24-12, 09:27 AM   #6
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by privateer View Post
The first part will take files exported from SH4 and correct them so TDW's GR2 program will import them without all the overhead I'm seeing.
It should also work with self created obj files.
Is it going to work the same way with SH3 exported meshes?
gap is offline   Reply With Quote
Old 12-24-12, 04:01 PM   #7
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Yes. It will handle SH3 files as well.
I'm useing the SH4 files because they have the AO mapping already.

Going through some old Notes and code snippets I also found a few lines that will make the final code work go alot quicker.

Last edited by Madox58; 12-24-12 at 06:17 PM.
  Reply With Quote
Old 12-25-12, 07:05 PM   #8
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by privateer View Post
Yes. It will handle SH3 files as well.
I'm useing the SH4 files because they have the AO mapping already.

Going through some old Notes and code snippets I also found a few lines that will make the final code work go alot quicker.
Cool. Keep us informed on any progress, please
gap is offline   Reply With Quote
Old 01-01-13, 03:57 PM   #9
silentmichal
Frogman
 
Join Date: Aug 2011
Location: Poland, my homeland.
Posts: 304
Downloads: 241
Uploads: 0
Default

Hmm, great name: PIFT


Like "pif-paf" :

__________________
Dining place in Silent Hunter 5? NOW it's possible ! My graphics mod available here:
http://www.subsim.com/radioroom/showthread.php?t=200862
silentmichal is offline   Reply With Quote
Old 01-01-13, 04:12 PM   #10
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by silentmichal View Post
Hmm, great name: PIFT


Like "pif-paf" :
yes agreed, cool name. I can imagine the following conversation taking place in a near future:

Q: "did it take very long importing the type II U-boat into SH5?"

R: "Oh, it was easy: I made it in a PIFT"
gap is offline   Reply With Quote
Old 01-01-13, 05:08 PM   #11
silentmichal
Frogman
 
Join Date: Aug 2011
Location: Poland, my homeland.
Posts: 304
Downloads: 241
Uploads: 0
Default

Quote:
Originally Posted by gap View Post
yes agreed, cool name. I can imagine the following conversation taking place in a near future:

Q: "did it take very long importing the type II U-boat into SH5?"

R: "Oh, it was easy: I made it in a PIFT"

Yes!!! Of course I'll use this program in future .
__________________
Dining place in Silent Hunter 5? NOW it's possible ! My graphics mod available here:
http://www.subsim.com/radioroom/showthread.php?t=200862
silentmichal is offline   Reply With Quote
Old 01-01-13, 06:01 PM   #12
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

I wondered alot about why the GR2 editor from TDW did the loose imports the way it does. I spotted the problem after long hours of not thinking of how obj files actually work, but stareing at the exported files from GR2 files.

Then I took a step back and studied how an obj file works, looked at exports from GR2 files, and finally saw at lest part of the GR2 meshes scheme.

To encode a proper diffuse mesh and AO mesh, We need exact count matches for verts and such.

Sounds easy but it's not just that simple.
Well, it is, but it isn't also.

One major thing I found is that a mesh can contain references to a real-face/vert/texture as a placer but it does not get rendered.

It's a kind of OpenGL thing in some ways, but at render time is corrected by the granny engine.
(granny is not the only thing that handles this kind of issue)

We need to open 2 obj files, get a per vertext UV mapping for each.
Then do a bunch of compares and mixing to get 2 matched obj files for import with TDW's Program.

The hard part is what faces grouping can/should be duds to create the best false references?
  Reply With Quote
Old 01-03-13, 04:31 PM   #13
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

I'll be home on saturday, my textures nearly ready too; so it is time to import my lifeboat into GR2 and start up the testing of this tool
Let me know if there are any particular things you need me to test, privateer.
Targor Avelany is offline   Reply With Quote
Old 01-03-13, 08:55 PM   #14
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

That sounds great.
I did a test conversion of some files sent to me.
The files converted fine and I'm still testing the results with TDW's version 272.

I found a few things I need to re-code due to a too strict structure issue when importing.

Your project probably has a better chance at this time of working right out of the gate.

Send me a link to the obj files you have and which GR2 file you want to work with and I'll run it all through.

From what I'm seeing the idea and codeing is proper but I still need to work within what TDW's program will handle at this time.

What I'm am aiming for is to solve enuff issues to allow him to re-code when he has the time.
(Unless he wants some help in areas)
  Reply With Quote
Old 01-03-13, 09:28 PM   #15
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Since you are looking for something to test your tool on, I was going to suggest you to do it with the whale I've imported for OHII...

...but then it came to my mind that the whale got animated meshes. How is going GR2 editor to deal with them? In s3d this process was automatic but now, I guess, each mesh should be imported manually. Furthermore, the dat format had a MeshAnimationData controller, but what about GR2 format? I cannot think of any GR2 animated object featured in SH5 (flags are still in dat format by the way)

Okay, just talking out lout. Time to shut up and wait for your answer... unlike me you at least know what we are talking about
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:32 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.