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, 06:13 AM   #1
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   #2
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   #3
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   #4
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
Old 08-16-10, 07:05 AM   #5
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

I can split the Tri-Groups as there are pointers as to where to break them.
The materials are then linked to those.
But I've found no link to the Verts, Normals, Textures listing.
It's one long chain.

So no sub objects.
If it's in the Extended Data?
I have not spotted it yet.

I've also not extracted any data from the extended section yet.
It's not placed in the GR2 like everything else.


Now I have to go to my real job.


That gives me all day to ponder on things.
  Reply With Quote
Old 08-16-10, 11:31 AM   #6
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default

Excellently, guys
It's pleasure to see/read your replies.
__________________
Alex ®


Moses said: "Don't create yourself an idol"...
Anvart is offline   Reply With Quote
Reply

Tags
edit the gr2


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 12:59 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.