Log in

View Full Version : OBJ to DAT


Trevally.
07-17-12, 04:23 PM
Hi all:salute:

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:06:

Thanks:sunny:

Madox58
07-17-12, 04:26 PM
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.

gap
07-17-12, 05:42 PM
Hi Trevally,

I see Orkney's shipyards are currently hard at work :haha:
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 (http://www.subsim.com/radioroom/showthread.php?t=135177&page=3) 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 :doh:

Madox58
07-17-12, 05:58 PM
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!
:haha:

Trevally.
07-18-12, 03:42 PM
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:rock:

So my learning continues:-

Here is my model in blender
http://img831.imageshack.us/img831/7982/blenderexport2.jpg



Exporting to obj file - handy reading (http://wiki.blender.org/index.php/Doc:2.6/Manual/Textures/Mapping/UV/Unwrapping)
http://img12.imageshack.us/img12/3553/blendermodel.jpg

Export settings
http://img4.imageshack.us/img4/2048/blenderexport.jpg


Import into privateer's dat file
http://img706.imageshack.us/img706/3528/s3dimport.jpg

http://img696.imageshack.us/img696/2110/s3dimport2.jpg

:hmmm: lots of triangles - is this bad:hmmm:
http://img850.imageshack.us/img850/5079/s3dimport3.jpg

It is in:woot:
http://img696.imageshack.us/img696/6607/s3dimport4.jpg

To be continued:D

Madox58
07-18-12, 03:51 PM
You're off to a nice start Mate.
:up:

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.

gap
07-18-12, 04:47 PM
Good start Trevally! :up:


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. :D

Madox58
07-18-12, 05:04 PM
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?
:haha:

Trevally.
07-18-12, 05:17 PM
Thanks guy:sunny:

I am starting to struggle to follow you privateer:doh:

:haha:
:up:

gap
07-18-12, 05:24 PM
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

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 :sunny:

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?
:haha:

yes, i can't complain: you got me pretty well confused! :haha:

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 :)

Madox58
07-18-12, 05:29 PM
That's good Mate.
:D
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?
:D

Trevally.
07-18-12, 05:31 PM
In game the balloons are lying on the beach rather than loating in the air:doh::hmmm:

Enough from me for tonight - I will try again tomorrow:up:

Trevally.
07-18-12, 05:33 PM
Now I know your lost, correct?
:D

:yep:

:D

Madox58
07-18-12, 05:35 PM
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.
:D

Madox58
07-18-12, 05:43 PM
@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.
:o

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'
:D

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?
:haha:

gap
07-18-12, 05:55 PM
That's good Mate.
:D
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?
:D

I hope not. There's a chance that I see your point, now :smug:

This how I would do it:
I would create a separate fin model, putting it into the library folder (with its dat, val and zon files). Then I would link it to the balloon using 3 different instances of dummy nodes within the dat file of the main model, each with its position and rotation.

Is it that method that you were suggesting? :hmm2:

Madox58
07-18-12, 06:02 PM
No Mate.

I'll provide the perfect example as soon as I can upload it.
It's one of the Forts from GWX I created.
Now remember I did this all by hex editing as there was no S3D to work with back then!!
Once I post the link and you get the file?
Open it with S3D.

Study how the towers and all the walk planks were built.
You'll see what I am on about.
Trust me as the proof is in the dat!
:yeah:

Download and be amazed.
http://www.mediafire.com/?nwuf110ldejefk1

And notice I did this so anyone can see what is, and has been in the open for years!

Note that there is a totally stock SH3 file that I learned from.
I don't recall what file it is though.

gap
07-18-12, 06:24 PM
@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.
:o

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'
:D

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?
:haha:

No problem at all, mate.

I know everyone here got his own nature, including qualities and flaws, tastes and idiosyncrasies.

I wasn't being rhetorical when I premised "if you don't mind". Though thinking that the teaching approach suggested by me would provide higher benefits, be sure that any contribution by you or by any willing person in this forum will be always welcomed with the highest gratitude, no matter in wich form it arrives, within an easter egg or by means of a carrier pigeon! :D :up:

gap
07-18-12, 06:37 PM
No Mate.

I'll provide the perfect example as soon as I can upload it.
It's one of the Forts from GWX I created.
Now remember I did this all by hex editing as there was no S3D to work with back then!!
Once I post the link and you get the file?
Open it with S3D.

Study how the towers and all the walk planks were built.
You'll see what I am on about.
Trust me as the proof is in the dat!
:yeah:

Download and be amazed.
http://www.mediafire.com/?nwuf110ldejefk1

And notice I did this so anyone can see what is, and has been in the open for years!

Note that there is a totally stock SH3 file that I learned from.
I don't recall what file it is though.

Thank you Privateer,

I am already amazed enough having learned that GWX got sea forts! :rock:

I've download the dat, and had a glance at it in s3d. I will need time to study it in depth anyway. I hope it will not get too long for me to learn appreciating all the techinical knowledge you had to put in it :) :up:

Madox58
07-18-12, 06:48 PM
It's a step by step process to teach someone even the simplest of things for SH Games.

I find the boreing approach just that.
Boreing!

That's why I do NOT do tutorials in the common way.
I find them misunderstood by new people on almost a daily basis.

I also find that even the best intended new Modders do not check existing files from earlier versions of SH nor the information in those areas!

I see many of the same questions/mistakes made or asked and only see that one did not study up even just a little bit.

There is very little need to re-invent the Wheel as a simple way to put it.

My way of doing things is just that.
My way.
That does not mean it's the ONLY way.
But if you can't beat me and I can prove you wrong?
I will.
I only do that to increase your determination.

If you allow me to beat you down?
You are sooner or later a drain on those that will carry on, no matter what!

So I'm a 'Richard' at times only because I care more then most can wrap a small mind around.

Only advise I could offer?
Get over it and do what you think you can do.
When that fails?
Use the PM and talk to people.
You'd be surprised how many great people will guide you on some really fantastic stuff!
:yeah:

Madox58
07-18-12, 07:03 PM
Thank you Privateer,

I am already amazed enough having learned that GWX got sea forts! :rock:

I've download the dat, and had a glance at it in s3d. I will need time to study it in depth anyway. I hope it will not get too long for me to learn appreciating all the techinical knowledge you had to put in it :) :up:


That's privateer with a small p if you will.
:haha:

If you've never had Sh3 with GWX?
I'd say get it for a few simple reasons.
You and other are trying to re-invent wheels.
That is wasteing your time and mine and others.

Where do you think the K-ship and other stuff is coming from?
Not that GWX is the end all be all mind you.
The Guys that worked LSH, NYGM, WAC, and so on are the trail blazers!
Go to SH4 and you have RFB, TMO, and others I'm sure I'll get trashed for not recalling.
:D

Everyone of the Guys that worked those Mods left a trail.
That trail is in many posts yes.
But the knowledge they left?
It's GOLD MATE!!

Mostly it's kind of like explaining the Australian Rappel.
Until I show you how it's done?
You'll never get it right.

Trevally.
07-19-12, 02:06 PM
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.
:D

Thanks privateer:sunny:

I will make a few corrections from mistakes I made last night and post a link here.
Perhaps others might want to try this and even make better skins

Madox58
07-19-12, 02:27 PM
No problem Mate.
My hat goes off for the Guys that do graphics work!
:salute:

I piddle about with it, but I'm not very good.
I can Air Brush the heck out of real life things but computer graphics?

I'd almost rather eat a can of worms.
:O:

Trevally.
07-19-12, 02:44 PM
Here is the file https://rapidshare.com/files/2206169842/Trevally Barrage Balloon Testing.7z Barrage Balloon Testing.7z

It has the balloons imported to SH5 and a test mission
+ the Blender file withe the 3d model
+ privateer's "air bomb" that has the dat and zon file used for importing

So if anyone wants to test with this - please do
Also note - I have messed up the skins (T01 DDS):doh: (see pic)
Also I have not tested with the zon file yet

http://img444.imageshack.us/img444/923/barrageq.jpg

:up:

messageboy101
07-19-12, 02:51 PM
looks great:woot:
looking forward to it

can we shoot it and will it blow up??:haha:

Madox58
07-19-12, 02:53 PM
Got your files.
:up:

I'm really looking forwards to seeing you get this in Game!

I can burn the AO's for you if you'd like?
I'll also do the instance thing so you can see an example that you'll probably understand better.
:yep:

Trevally.
07-19-12, 02:56 PM
Got your files.
:up:

I'm really looking forwards to seeing you get this in Game!

I can burn the AO's for you if you'd like?
I'll also do the instance thing so you can see an example that you'll probably understand better.
:yep:

Thanks - that would be great:up:

Its always easier to look at what others do and learn from that:)

Madox58
07-19-12, 03:32 PM
Are you sure you're just learning 3D modeling?
:hmmm:

I will admit I am impressed with the model for a Guy that just started.
(Your much better then I was when I started!)
:salute:

It will be my pleasure to help you learn more and get much better if you decide to keep doing 3D work.
:yep:

That's if that is OK with you.
You have a gift for this Mate!
:yeah:

Trevally.
07-19-12, 03:43 PM
:shucks: thanks :sunny:

Yes - I am just starting. This link was my Sunday afternoon:-
http://cgcookie.com/blender/get-started-with-blender/
I got to step 4 and thought i would give it a try and a balloon sounded like a good model to test with.

Madox58
07-19-12, 03:53 PM
You did a good job just starting out.
:yep:

Weld a few verts here and there on the fins?
It's outstanding for a new modeller!
:salute:

I'm almost afraid to see what you will be able to do in a very short period of time!
:o

And I mean that as a very high compliment!

Trevally.
07-19-12, 04:51 PM
:shucks:

Added some colour to the balloons.


Air Defence Over Scapa Harbour
http://img404.imageshack.us/img404/1172/21328623.jpg

http://img196.imageshack.us/img196/6590/72385047.jpg

http://img831.imageshack.us/img831/2757/55516501.jpg

http://img542.imageshack.us/img542/9159/65733083.jpg

gap
07-20-12, 07:41 AM
The real thing:

http://www.fosjp.org.uk/history/history_stories/barrage_balloon.jpg http://3.bp.blogspot.com/_mrITPlIAWkk/TSAdowGtGtI/AAAAAAAABzc/64vIMdukseQ/s400/6.jpg


...and this is an HD picture of the same:
http://www.bbrclub.org/Barrage%20Balloon%20vessel%20adj.jpg


its american counterpart:

http://www.worldwar-two.net/multimedia_archive/images/26.jpg


I think both british and US barrage balloons were silver grey in color, as shown in this other color picture:

http://www.sciencephoto.com/image/354021/large/T6200035-Barrage_balloon_floating-SPL.jpg


Finally, this is a model for sell at TurboSquid:

http://preview.turbosquid.com/Preview/Content_2009_07_14__11_30_15/balloon_prev02.jpg55e30b83-70c1-4293-937e-0f80628af2e6Large.jpg

Thanks to you, Trevally, it seems that we have just spared 60 bucks :D :up:
This (http://www.turbosquid.com/3d-models/3ds-barrage-balloon/380783) is the TurboSquid page with some more vies of the former model, just in case you want to get inspiration from it for adding some more detail to your creation :sunny:

Trevally.
07-20-12, 01:15 PM
I think both british and US barrage balloons were silver grey in color, as shown in this other color picture:

http://www.sciencephoto.com/image/354021/large/T6200035-Barrage_balloon_floating-SPL.jpg


Thanks Gap - I will change it to a silver colour and try and add more cables:up:

messageboy101
07-20-12, 01:35 PM
will those balloons move with the wind?
or be static attacht to ships like in SHIII

Trevally.
07-20-12, 01:54 PM
will those balloons move with the wind?
or be static attacht to ships like in SHIII

:D

I do not think I can do that - I am just starting to understand how to imprort them into the game - getting flash stuff like that to work may be a step to far:03:

I have not thought where to place them yet - if I can get them looking good I will add to harbours:yep:

gap
07-20-12, 02:51 PM
Thanks Gap - I will change it to a silver colour and try and add more cables:up:

Good! :up:
If you are familiar with photoshop, I think you can use the big b/w picture I've linked to my previous post as base for obtaining nice high detail textures.

I would try also adding vertical stress lines where cables are connected to the main balloon, as visible in some of the pictures and in the TurboSquid 3d model.

Besides this, imo the edges between the three parts composing each fin, look a bit too soft in your model. There is a quick setting for making edges hard in wings 3d. I am sure the same setting can be found in blender. Peraphs you can play a bit with it :hmm2:

Other than that, your model looks just perfect! :sunny:

Trevally.
07-20-12, 03:29 PM
Ok - I have got the stress lines showing on the balloon:up:

Now for the cables:doh:
anyone know any tricks for this?

Trevally.
07-20-12, 05:50 PM
Added cables

http://img38.imageshack.us/img38/6779/21272564.jpg

http://img820.imageshack.us/img820/5539/33220005.jpg

http://img3.imageshack.us/img3/8816/31907185.jpg

gap
07-20-12, 06:40 PM
Added cables

Brilliant! :up:

If possible there should be 3-4 cables per side going straight from the top of the balloon to land, as seen in the pictures.

And here's a standard size tileable texture I've created for your cables.

http://img715.imageshack.us/img715/6508/steelrope.jpg

I's 128x128 in size, but as we are not going to see its details anyway, I think you can reduce it at your wish :).

Trevally.
07-21-12, 09:01 AM
:Kaleun_Binocular:

http://img585.imageshack.us/img585/3750/10867858.jpg

http://img100.imageshack.us/img100/5109/82332512.jpg

http://img193.imageshack.us/img193/6663/96245504.jpg

http://img401.imageshack.us/img401/6608/26863179.jpg

http://img256.imageshack.us/img256/7920/19415642.jpg

flostt
07-21-12, 11:13 AM
:rock::rock::Kaleun_Applaud:

gap
07-21-12, 11:25 AM
:Kaleun_Thumbs_Up:

I think it is time for you to give a proper texture to those odd flying objects, Trevally ;)

...and by the way, have you noticed how dark they look? Other than increasing lightness in diffuse/specular map, I think you can play with specular color/strenght and glossines in material attributes (node 2/0).

I don't know if they are correctly applied to dat units, but there is no arm in trying :)

Trevally.
07-21-12, 11:37 AM
yes - it is most odd.

With the block ships - I could use Uekel's method to apply all the light/texture (T01, N01 and O01)

I just can not get this to work with the ballons (grey blobs only:nope:)
So I am using Rongels method - but just the T01 will apply:hmmm:

I can send you the file if you want a go:D

gap
07-21-12, 12:12 PM
yes - it is most odd.

With the block ships - I could use Uekel's method to apply all the light/texture (T01, N01 and O01)

I just can not get this to work with the ballons (grey blobs only:nope:)
So I am using Rongels method - but just the T01 will apply:hmmm:

I can send you the file if you want a go:D

Well, for a start we can have a go at the diffuse map. A good texture cannot hurt, and is always worth the time you spend on it. ;)

I am still busy with the whale, but if you want I can deal with that texture too. Just send me the last version of your UFO :O:

Once finished with the diffuse map, we will brainstorm Uekel, Rongel, privateer, TDW, etc. on why normal and occlusion maps are not working correctly :D