![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#11 | |
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 28
Uploads: 3
|
![]() Quote:
The first subobject (on material) is: - 7517 vertices - 7517 vertex normals - 7017 texture coordinates - 5496 faces In privateers export however it is: - 351977 vertices - 351977 vertex normals - 351977 texture coordinates - 5496 faces What?? Why export a massive array of which you only use 2% of data? For the next subobject, he exports the same vertices, the same texture coordinates, the same normals, only the face-assignment obviously differ... That's roughly 30MB of extra data, for each next subobject, data you don't need because it's already written once in the file. I don't want to stomp on privateer's work, but not reusing the vertex, normal and texture arrays is bad coding. No wonder the file is so big. It should be not much more than 1/9th that size for this entire OBJ-file (and that's just an estimate, it might be even smaller). Here's an image: ![]() To import this I cut off all subobjects trailing the first. The resulting OBJ-file was 30 MB. After import I got the above. Exporting it again from S3D resulted in an OBJ-file of 856KB !! That's 97% less bytes. Then there's the subject of S3D failing on this file reporting 350K vertices, but that makes sense since DAT-files can't hold models larger than 65K vertex indices and 65K-texture indices. Splitting the object up removes the problem as an object of 7517 vertices as per example above clearly is not a problem for S3D/DAT. Anyway, I've looked into GR2 files myself and have written code for it in april too (to analyze), so it was an honest suggestion that it can be done and is much easier. It doesn't matter in the end, it's privateer's project, and I appreciate his work (glad he does so), and if he continues on the OBJ-path I hope he can improve it further (also based on the above analysis) or perhaps he already knows. In the end it does not matter, even if he does not improve on the above, you can break the model up in a 3D studio, or by hand in notepad like I did, and after import in S3D it will drop any unused data (Pack3D won't). Regards, skwas
__________________
![]() SH5 mods: Speech Recognition for SH5 | Digital UI Clock Tutorials: [TEC] Import/export 3D models to/from game using S3D [TEC] How to work with the model viewer in S3D - VIDEO Last edited by skwasjer; 08-15-10 at 06:47 PM. |
|
![]() |
![]() |
Tags |
edit the gr2 |
|
|