Quote:
Originally Posted by Anvart
Everyone goes by own way 
*********************
You speak about *.dat & S3D?
Look example...
File - Room_CR.GR2
Using Privateer's GR2_Exporter.exe - 55 objects (*.obj) have been exported/created... during 3 minutes (on my not fast machine ).
Two objects have very big size of obj-file...
...
CR_BSide.obj - file size = 407 223 KB
CR_FSide_Stairs.obj - file size = 657 264 KB
May be, these objects can be divided into smaller with (on) corresponding single-materials...?
...
For those who has not understood...
For comparison: SH4, file NSS_Porpoise_CR.dat, exported object Tzevi01_03_LM2.obj - file-size 2 658 KB...
Whether S3D can process such big file... 657 264 KB...? simple experiment has shown cannot...
... and pressing of "Continue" button leads to S3D hanging.
...
and Look forward - multi-materials...
|
Ok since you brought this up, I took a look, and I'm sorry to say that the OBJ-files exported are highly unoptimized. For every subobject, the entire vertex, normal and texture array is exported as a whole, each time, over and over.
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