SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   DW Mod Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=196)
-   -   J3D File Format (https://www.subsim.com/radioroom/showthread.php?t=236990)

Jeff-Groves 11-09-18 04:24 PM

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.

Jeff-Groves 11-10-18 04:36 PM

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.

Jeff-Groves 11-10-18 04:58 PM

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.

Jeff-Groves 11-10-18 05:18 PM

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.

Jeff-Groves 11-12-18 11:47 AM

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.

Jeff-Groves 11-15-18 03:11 PM

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!

FPSchazly 11-15-18 04:31 PM

Cool stuff. Keep it up! :Kaleun_Cheers:

Jeff-Groves 11-15-18 05:07 PM

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.

Polak2 11-16-18 08:39 PM

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 ?

Jeff-Groves 11-17-18 07:04 PM

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.

Polak2 11-17-18 08:04 PM

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.

Jeff-Groves 11-18-18 07:04 PM

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.

Polak2 11-18-18 07:51 PM

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.

Jeff-Groves 11-18-18 08:16 PM

Quote:

Originally Posted by Polak2 (Post 2577904)

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.

Polak2 11-18-18 08:58 PM

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.


All times are GMT -5. The time now is 11:06 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.