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 07-17-12, 04:23 PM   #1
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default OBJ to DAT

Hi all

I am looking for a prog to convert obj files to dat
I am sure I have seen posts about Pack3D
Does anyone have a link to this app or know of another program that can do this

Thanks
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 07-17-12, 04:26 PM   #2
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Mate,

You can't just convert an obj file to a dat.
You need to import it to a dat.

What are you trying to do?

If it's secret?
Just PM me and I'll keep your secret.

Anytime you want to extract models from a dat?
If it's SH4 dats - use S3D as it will extract the 2nd UV channel (AO)
But you will have to extract each 3D model one at a time.
Pack3D will extract ALL models but only channel one of the UVs.

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

Hi Trevally,

I see Orkney's shipyards are currently hard at work
I am sure that Privateer will be able to provide any detail on the process of importing 3d meshes onto dat files.

Nevertheless, you might want to have a look also at this tutorial by skwasjer covering the same topic.

Take in mind that it was written assuming that the obj file we want to import was generatet using 3D studio. Using Wings 3D or Blender meshes might require different settings and/or some post-processing of the obj and mtl files to be imported.

Afaik, s3d provides an easy way to import animated meshes as well. I am sure I've read another tutorial on this feature, but I cannot find it anymore
gap is offline   Reply With Quote
Old 07-17-12, 05:58 PM   #4
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

If there is no 2nd channel (AO mapping)?
S3D will import with little trouble.

S3D also imports animations with no trouble if you follow the simple rules.
Do an export of an animation first and those should show you how to prepare the needed files.
Then import those same files and check the settings.
You'll see you need to set all timings.

Once you do that?
Bob's your Uncle!
  Reply With Quote
Old 07-18-12, 03:42 PM   #5
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Thanks to privateer who sent me his barrage ballon dat file so I could use it to learn from and to import my obj file into S3D

So my learning continues:-

Here is my model in blender




Exporting to obj file - handy reading


Export settings



Import into privateer's dat file




lots of triangles - is this bad


It is in


To be continued
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 07-18-12, 03:51 PM   #6
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

You're off to a nice start Mate.


Objects like AirCraft can use Normals but I don't recall why they do at the moment.
Subs and Ships cause problems with the Caustics controller though.
You get what I call 'Rainbow Bright' effect.
Never checked to see if SH5 also has that with imported SH4 Units.

There's a few tricks to reduce the size of the model but I'll save those for later.
  Reply With Quote
Old 07-18-12, 04:47 PM   #7
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Good start Trevally!

Quote:
Originally Posted by privateer View Post
There's a few tricks to reduce the size of the model but I'll save those for later.
I think you refer to poly count, Privateer, but on a side note: is there a scale factor or any other method that you know of for reducing meshe's size within the dat file, without having to export the model, resize it in a 3d editing program and reimport it?

By the way, I've empirically calculated that 0.094 Wings 3D/Blender units is equal to about 1 mt in SH world. Maybe, paraphrasing a common italian phrase, I've just discovered the warm water, but I thought to share anyway this little piece of information.
gap is offline   Reply With Quote
Old 07-18-12, 05:04 PM   #8
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

You can not reduce scale in the dat.
Only scale it properly then import.
I have a handy scaleing object created by DivingDuck long ago that will help if you need it.

Mostly I just remember that anything going into files should be reduced by a factor of 10 IF you scaled your model to meters.

The scaleing, if you look at it, is .1 = 1 meter

On reduceing polys (actually triangle count of the 3D mesh)?
That is an advanced subject that pretty much I have been the only one to take advantage of for SH3 in the GWX mod.
It works for any dat file you care to try it on.
To this date I've never seen anyone follow the example except for Hans in HAHD.

And I had to explain and provide an example.
But that's what I do.
Explain and show examples of advanced tricks and such.

On render, all the object are shown.
On loading however, there are not several things loaded that are the same basic object!

Have I confussed you yet?
  Reply With Quote
Old 07-18-12, 05:17 PM   #9
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Thanks guy

I am starting to struggle to follow you privateer


__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 07-18-12, 05:24 PM   #10
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by privateer View Post
You can not reduce scale in the dat.
Only scale it properly then import.
I have a handy scaleing object created by DivingDuck long ago that will help if you need it.
Okay, thank you. Good reason for scaling 3d models properly before importing them

Quote:
Originally Posted by privateer View Post
Mostly I just remember that anything going into files should be reduced by a factor of 10 IF you scaled your model to meters.

The scaleing, if you look at it, is .1 = 1 meter
Okay, close enough to the conversion factor I had found myself

Quote:
Originally Posted by privateer View Post
On reduceing polys (actually triangle count of the 3D mesh)?
That is an advanced subject that pretty much I have been the only one to take advantage of for SH3 in the GWX mod.
It works for any dat file you care to try it on.
To this date I've never seen anyone follow the example except for Hans in HAHD.

And I had to explain and provide an example.
But that's what I do.
Explain and show examples of advanced tricks and such.

On render, all the object are shown.
On loading however, there are not several things loaded that are the same basic object!

Have I confussed you yet?
yes, i can't complain: you got me pretty well confused!

Out of jokes, if you don't mind, I would suggest the concerned ones to use the public forum instead of PM's for posing/answering questions on units creation.
In this way you wouldn't be forced to answer the same questions more than once, and there would be a chance even for "accidental" readers to contribute to the topic or to learn something from other's experience.

My two cents opinion indeed
gap is offline   Reply With Quote
Old 07-18-12, 05:29 PM   #11
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

That's good Mate.

I'm going to use your barrage ballon as the perfect example to follow along with.
(If you don't mind)

You have 3 parts on that model that are the same.
The fins.
Each is the same from images I see posted here.
When you load that model into any SH version?
All 3 get loaded into memory at one point or another because it's one 3D mesh.

Now, if we only load one fin into the dat you've lost alot of overhead on loading.

How do you think SH Games can reproduce many Ship with only one simple model?

It's called instanceing.

We create not a new 3D mesh but an instance of an existing 3D mesh.

So for the barrage balloon?
Only one fin is in the dat file.
We create the other two by instanceing it in that dat file and rotating thier positions.

Now I know your lost, correct?
  Reply With Quote
Old 07-18-12, 05:31 PM   #12
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

In game the balloons are lying on the beach rather than loating in the air

Enough from me for tonight - I will try again tomorrow
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 07-18-12, 05:33 PM   #13
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Quote:
Originally Posted by privateer View Post
Now I know your lost, correct?


__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 07-18-12, 05:35 PM   #14
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Trevally,
Your always welcome to send me your files to look at.
I could make corrections and send them back so you can learn.
That's pretty much all I do now days is help others.
  Reply With Quote
Old 07-18-12, 05:43 PM   #15
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

@gap,

I only work by PM when someone requests it remain that way.
Yes. I am a weird one at times on my responces and so forth.
That's just the way I am even in real life.


Go beyound the jokey, simple stuff and see the techie stuff?
You'll see the details quite clearly.

It's just that you and many others need teachin'


Once that part is done did in?
You'll love it all.
That's a promise!
So hang in there and don't look at my sig below.
OK?
  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:25 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.