SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Modern-Era Subsims > Dangerous Waters > DW Mod Workshop
Forget password? Reset here

Reply
 
Thread Tools Search this Thread Display Modes
Old 11-09-18, 04:24 PM   #16
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,299
Downloads: 130
Uploads: 0


Default

Now. After all the above stuff we come to the faces.
It's all pretty boring to me but you all want the information.
What happens with the j3d file is ALL verts and tex info is one large block with no separation of models. YET!
Now we look at the faces needed. Those also run as one large block with separation coming later in the file.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 11-10-18, 04:36 PM   #17
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,299
Downloads: 130
Uploads: 0


Default

Again looking at the P4_Midget_Sub in 010 I jump to the faces section.
I get the jump address by multiplying the number of verts (4075) by 40 (which is the number of bytes in the chunk which gives us the verts and tex co-ords stuff) then add 20 for the header block.

I work with the 3DS file provided and export it from 3DS Max as an obj file.
3D Converter will also export as an obj if you have a registered version.
The trial will drop every 5th vert info. $50 USD for lifetime upgrades is a deal. And yes I have a registered version.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 11-10-18, 04:58 PM   #18
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,299
Downloads: 130
Uploads: 0


Default

One thing that will make it easier to read and match the j3d file info to the exported obj file is to rotate the model on export.

Now the faces info.

If you jumped to position 163020 decimal your at the start of the faces info.
You will see:
01 00 02 00 00 00 02 00 03 00 00 00 03 00 04 00
00 00 04 00 05 00 00 00 05 00 06 00 00 00 06 00
Blah blah blah.

ADD 1 to each Short. So 01 00 should be converted to 2 for export.
02 00 would be 3, 03 00 would be 4, and on and on.

The current export options accumulate all the faces info! You will hit the
01 00 02 00 00 00 02 00 03 00 00 00 03 00 04 00
00 00 04 00 05 00 00 00 05 00 06 00 00 00 06 00
Blah blah blah.
stuff 5 times in the example sub I am working with.
I suspect that is just objects imported during the building of the unit.
I'll check other files to see if this holds true.

So read the 01 00 02 00 00 00 as such for faces:
2/2 3/3 1/1

Current export options will give you:
1/1 2/2 3/3 and so on.
__________________
I don't do Stupid. So don't ask.

Last edited by Jeff-Groves; 11-10-18 at 05:07 PM.
Jeff-Groves is offline   Reply With Quote
Old 11-10-18, 05:18 PM   #19
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,299
Downloads: 130
Uploads: 0


Default

Working through the faces we come to some good stuff!
How to read all the info into a workable shape.
3D object converter is fantastic for giving me a lot of information here.
As a side note? I'm checking with a few old friends to see if I can get someone to write a new j3d exporter.
Looking at the files closer? I may install my old VC++ program and do a universal converter that reads the obj and mtl file to convert.
It is a pretty simple file structure. Almost a joke compared to Gr2 or even the dats used in SH Games.
__________________
I don't do Stupid. So don't ask.

Last edited by Jeff-Groves; 11-10-18 at 07:01 PM.
Jeff-Groves is offline   Reply With Quote
Old 11-12-18, 11:47 AM   #20
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,299
Downloads: 130
Uploads: 0


Default

Bought and installed DW today so I can check more files.
Also got the decompress program in the downloads section.
I just stopped by home on a return trip from Connecticut for a few hours as I load gear for a job in Nashville. So I grabbed my VC++ stuff. I needed that anyway for other projects.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 11-15-18, 03:11 PM   #21
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,299
Downloads: 130
Uploads: 0


Default

Here's the start of the 010 template for j3d files.
http://www.mediafire.com/file/f93une...bz/j3d.7z/file

This template will take you to the start of the faces.
It reads the file just as is!
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 11-15-18, 04:31 PM   #22
FPSchazly
Good Hunting!
 
FPSchazly's Avatar
 
Join Date: Apr 2014
Location: Maryland
Posts: 771
Downloads: 15
Uploads: 1


Default

Cool stuff. Keep it up!
__________________
Your friendly neighborhood modern submarine YouTuber.

My videos:
**Exclusive Look at Modern Naval Warfare!**
Dangerous Waters Liu Doctrine (LwAmi
Learn to play Dangerous Waters
FPSchazly is offline   Reply With Quote
Old 11-15-18, 05:07 PM   #23
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,299
Downloads: 130
Uploads: 0


Default

Thank You!

I plan to do lots more in the long run.
A stand alone exporter is pretty simple to do but I'd like to create a new program to create new j3d files.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 11-16-18, 08:39 PM   #24
Polak2
Weps
 
Join Date: May 2005
Posts: 371
Downloads: 60
Uploads: 0


Default

Very interesting!

It could be perhaps handy for you to know that 3DObject converter handles reading j3d and displaying it including UWV coordinates materials etc. for nice and easy conversion to various editable formats.

What is still problematic is :
a. plugin to go back from any editable format back to j3d is only available to 3dsMax3.1 which unfortunately is not so popular or easily available any longer
b. what is even worse in that plugin there is a limitation of vertices of 32768 which is rather annoying and prevents most of the more complex models from exporting.

Do you think such a limitation could be removed or better yet new plugin for newer 3dsMax versions could be made ?
Polak2 is online   Reply With Quote
Old 11-17-18, 07:04 PM   #25
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,299
Downloads: 130
Uploads: 0


Default

I have 3DConverter. A legal lifetime version.
I also have 3D Studio 3.1 and the j3d exporter.

Now is the exporter the limiting factor on verts? Or the Game engine?

I can Hex edit a file to run way over that but would need to test it in Game.
I bought DW from Amazon but it won't run.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 11-17-18, 08:04 PM   #26
Polak2
Weps
 
Join Date: May 2005
Posts: 371
Downloads: 60
Uploads: 0


Default

Quote:
Now is the exporter the limiting factor on verts? Or the Game engine?
Exporter, 99.9% sure. RA modders having j3d models which are way beyond this limit of 32768 . If you can hexedit this barier I can gladly test it.
Polak2 is online   Reply With Quote
Old 11-18-18, 07:04 PM   #27
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,299
Downloads: 130
Uploads: 0


Default

Kara2 seems to be the largest 3D file and does not exceed 32181 polys
nor more then 29009 verts.
Of which only 22750 verts are shown in 3D object converter.

Interesting to note you need to jump down the file to decode the verts.

The 212_esm. j3d file is even more interesting.
__________________
I don't do Stupid. So don't ask.

Last edited by Jeff-Groves; 11-18-18 at 07:17 PM.
Jeff-Groves is offline   Reply With Quote
Old 11-18-18, 07:51 PM   #28
Polak2
Weps
 
Join Date: May 2005
Posts: 371
Downloads: 60
Uploads: 0


Default

Quote:
Kara2 seems to be the largest 3D file and does not exceed 32181 polys
nor more then 29009 verts.
Of which only 22750 verts are shown in 3D object converter.
Indeed, I concur. I am little rusty on this j3d quest, so I thought that they managed to "sneak" larger file.

What is interesting 212_esm. j3d an ESM mast? I assume the interesting part is in hex look of the file.
Polak2 is online   Reply With Quote
Old 11-18-18, 08:16 PM   #29
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,299
Downloads: 130
Uploads: 0


Default

Quote:
Originally Posted by Polak2 View Post

What is interesting 212_esm. j3d an ESM mast? I assume the interesting part is in hex look of the file.
Yes. The header part which lays out the number of verts and such is different. Still looking at it to try to figure out what the extra area is for.
I can calculate 283 verts of which 163 show up in 3d Object converter.
The extra space is what I don't understand at this time.
It's the first 4 bytes of the file.

EDIT: The first 4 bytes appear to mark the file as having an animationable part? That would explain the missing verts in 3D object converter also. Several files from DW stock have the exact same 4 bytes. Windsock is one.

I'll add a check to the template for 010 to jump the first 4 bytes if it is found. That will read all verts properly and get us to the faces.
__________________
I don't do Stupid. So don't ask.

Last edited by Jeff-Groves; 11-18-18 at 08:42 PM.
Jeff-Groves is offline   Reply With Quote
Old 11-18-18, 08:58 PM   #30
Polak2
Weps
 
Join Date: May 2005
Posts: 371
Downloads: 60
Uploads: 0


Default

You are possibly right animation perhaps ....If my memory serves me right that ESM antenna (tiny bit) extends from the thicker mast above the surface of the water.
Polak2 is online   Reply With Quote
Reply

Tags
j3d

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 09:46 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.