![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
![]() |
#1 |
Swabbie
![]() Join Date: Apr 2018
Posts: 10
Downloads: 6
Uploads: 0
|
![]()
UPDATE: I've managed to get custom models working, but I'm still having trouble with default textures disappearing.
Does anyone else have anything to add? |
![]() |
![]() |
![]() |
#2 |
GLOBAL MODDING TERRORIST
|
![]()
I can provide enough info on the format to allow you to write a viewer/exporter.
I've only looked at it for a few hours so still figuring out the last bit of unknowns. One could write a new exporter for 3D Max or other programs once I figure it all out. ![]() Thank you TLAM Strike for a few models I downloaded to look at the structure. Those were a great source to work with. Last edited by Jeff-Groves; 11-09-18 at 12:39 PM. |
![]() |
![]() |
![]() |
#3 |
GLOBAL MODDING TERRORIST
|
![]()
Looking at the P4_Midget_Sub j3d file header in SweetScape 010 We have this:
EB 0F 00 00 EC 0E 00 00 02 00 00 00 12 00 00 00 10 00 00 00 EB 0F 00 00 as an integer is 4075. That is the number of verts in the j3d file. EC 0E 00 00 as an integer is 3820. That is the number of polys in the j3d file. 02 00 00 as a short is 2. That is the number of textures used by the j3d file. 12 00 00 00 as a short is 18. That is the number of 3d models in the j3d file. 10 00 00 00 as a short is 16. That is the number of texture mappings in the j3d file. So we have 4075 verts, 3820 polys, 2 textures, 18 3d models, and 16 texture mappings. The next stuff is all the verts and texture co-ords. I'll break that down in the next post as there is some info I am not sure of at this time. |
![]() |
![]() |
![]() |
#4 |
GLOBAL MODDING TERRORIST
|
![]()
Following the header I described is a large block of data which includes the vets and faces of the 3D objects. Let's look at a chunk of that.
66 4C 41 BC BB D2 66 BF 6A AA 68 C1 00 00 00 00 55 55 AD AE 40 CA 2B 38 00 00 80 BF 00 00 00 00 00 00 00 00 16 F5 09 3F This chunk gives us the verts, an unknown I suspect may be tangents, and our texture co-ords. We read them all as floats. 66 4C 41 BC BB D2 66 BF 6A AA 68 C1 = v 0.011798 -0.901653 -14.541605 00 00 00 00 = seems always the same. maybe a divider? 55 55 AD AE 40 CA 2B 38 00 00 80 BF = unknown. Maybe tangents? 00 00 00 00 00 00 00 00 16 F5 09 3F = tex co-ords. 0.000000 0.000000 0.538996 This one is interesting as so far as I have found the 3rd co-ord of 0.538996 must be subtracted from 1 to get the proper number. Then moved to the secondary position on export! vt 0.000000 0.461104 0.000000 If someone could send me a couple of the Games original 3D files that may help. Last edited by Jeff-Groves; 11-09-18 at 03:10 PM. |
![]() |
![]() |
![]() |
#5 |
GLOBAL MODDING TERRORIST
|
![]()
A template and script to work with j3d files is being created.
However. I am creating a special file to work with those that will require you to buy a legal copy of SweetScapes 010 Hex Editor. I put a lot of time in to help with stuff. SweetScape has the best hex editor out there! I support them and they add nearly anything requested. Spend a few bucks to support a great bit of software! 010 is the best tool a modder can own! |
![]() |
![]() |
![]() |
#6 |
GLOBAL MODDING TERRORIST
|
![]()
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. |
![]() |
![]() |
![]() |
#7 |
GLOBAL MODDING TERRORIST
|
![]()
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. |
![]() |
![]() |
![]() |
Tags |
j3d |
|
|