SUBSIM Radio Room Forums



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

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 08-16-10, 04:00 AM   #1
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 28
Uploads: 3
Default

Quote:
Originally Posted by privateer View Post
I didn't take it that way at all Mate.


I did fix the bad loop and that 600 meg file comes out at
just over 51 megs now.

If I dropped the normals it would be smaller.
Around 38+ megs.
That's great

Quote:
Originally Posted by Anvart
Thanks for the situation analysis, Skwasjer.
At last i have seen the constructive answer...
I suspected not optimised creation of obj-file too (for this purpose i have written #65)... but i wanted to see your answer.
... or you have not understood my intentions...? with my english i cannot be assured...
I just thought 600 MB for an OBJ-file was crazy (and total export > 1GB from a single 50 MB GR2-file)! So I had to look why... no ill intentions.

Last edited by skwasjer; 08-16-10 at 04:17 AM.
skwasjer is offline   Reply With Quote
Old 08-16-10, 05:26 AM   #2
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

Quote:
Originally Posted by skwasjer View Post
...
to look why... no ill intentions.
Why you have supposed it?
...
My EN is difficultly understood (or not is understood completely)...?
__________________
Alex ®


Moses said: "Don't create yourself an idol"...

Last edited by Anvart; 08-16-10 at 11:15 AM.
Anvart is offline   Reply With Quote
Old 08-16-10, 06:06 AM   #3
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Dropping the loop puts all objects in one mesh again.
But I'm looking at a function to make the loop optional,
to break the objects up, then filter out the unused verts.
The VGC library is what I'm looking at to do the filtering.

I've found no good way yet to do it differently.
There's no pointer I have found to break them up without the extra garbage.
  Reply With Quote
Old 08-16-10, 06:13 AM   #4
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 28
Uploads: 3
Default

You do not need to filter the vertex/uv/normal list yourself, just drop it in the first section of the file like you already have, and then you can break up the file in subobjects with an g-token... Then you can use the same vertex/uv/normal list, still all in one big file. This is equaly valid as putting shorter lists of vertex/uv/normals before each face list (although the latter would be a little better to read visually).

v x,y,z
..
..

vn x,y,z
..
..

vt u,v(,w)
..
..

g object1
(usemtl)
f vi/vti/vni etc...
..
..

g object2
(usemtl)
f vi/vti/vni etc...
..
..

Last edited by skwasjer; 08-16-10 at 06:26 AM.
skwasjer is offline   Reply With Quote
Old 08-16-10, 06:22 AM   #5
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

I understand the 'g object' command.
What I have not found is a way to break the list down in the GR2 files.
They are packed as one long list.
(That's why the loop)

I've not found a pointer as to where to break this list.
  Reply With Quote
Old 08-16-10, 06:25 AM   #6
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 28
Uploads: 3
Default

You don't have to is what I am saying. You just write them all out only once at the top of the file, and then loop all subobjects and write them out. That should do, afaik. Did you already try this, and/or does this give specific problems?
skwasjer is offline   Reply With Quote
Old 08-16-10, 06:27 AM   #7
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 28
Uploads: 3
Default

Or do you mean there are no subobjects in that one big mesh? In that case you could do a split on material (I think Anvart suggested this too). This is also what I did in my example above.
skwasjer is offline   Reply With Quote
Reply

Tags
edit the gr2

Thread Tools
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 08:54 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.