SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   GR2 Editor/Viewer/Extractor/Importer (https://www.subsim.com/radioroom/showthread.php?t=188290)

TheDarkWraith 01-28-14 04:33 PM

Quote:

Originally Posted by tonschk (Post 2169064)
Hello :salute: TheDarkWraith :up:, please can you suggest me an example path for me to open with your GR2 Editor/Viewer ? LNK@ paths ? , with my poor knowledge about this, at the moment I am not able to open anything, thank you

Any sub

Quote:

Originally Posted by gap (Post 2169073)
In other words, does it works likewise dat format files, where mesh position follows node position? :hmm2:

No. The bone bindings (bones) are controlling (actually providing an offset) where the bounding box is positioned on the mesh. I'm not sure how bounding boxes and DMG_col nodes go together (if at all) :hmmm: Actually I'm not sure of the purpose of the bounding boxes at all.

Someone should try editing the bounding box for something and make it really small and located way above the object and see if it effects whether the object gets collided with (via a shell/another object).

TheDarkWraith 01-28-14 07:47 PM

Fixed the code to account for this new discovery I made. Now the bounding boxes and bounding spheres are part of the bone binding class.

Accounting for the bone binding's bone's position now renders the bounding box in the correct position in 3D space:
http://www.subsim.com/radioroom/pict...pictureid=7307

Looks just like Granny Viewer :D Gotta love it...

Moving the bone binding's bone's position also moves the bounding box associated with it.

Also fixed a problem I found when you move individual vertices of a mesh using the mouse.

TheDarkWraith 01-28-14 08:03 PM

v1.1.424.1. released. See post #1

- Fixed problem when moving individual vertices of a mesh with the mouse
- Started coding in new Feature: File-->Clean. This will clean the GR2 file of unneeded entries and objects. Currently only removes 'filler' found between embedded strings. I would strongly suggest only using this right after you load a file. If the 'cleaner' encounters an exception and it has modified the file then it will close the file to protect it (thus you lose everything if you didn't save it before).
- Fixed problem in renderer where it was using the incorrect shininess strength value
- Adjusted code to account for discovery made of how bounding boxes are controlled via bone binding's bone (they provide an offset)
- Added code for any lights defined to be rendered in 3D space. You can render the light's position and it's name. Selecting the light in the lights treeview will cause the rendered 'spot' to double in size. Selecting the same light again in the lights treeview will render the 'spot' normal size. This makes it easy to find the light. You can also set the render color for the lights.
- Enhanced the importers so that if they encounter a Ks value > 1.0 in the MTL file then they will scale it to 0.0-1.0 range (so it's compatible with Granny) - this fixes the problem gap was having with the barrage balloon

tonschk 01-29-14 03:36 AM

Hi there, I try to open any sub but I cannot figure out how to open :wah:
http://i194.photobucket.com/albums/z...psc4e88e5a.png

Quote:

Originally Posted by TheDarkWraith (Post 2169074)
Any sub



.


TheDarkWraith 01-29-14 10:27 PM

Quote:

Originally Posted by tonschk (Post 2169175)
Hi there, I try to open any sub but I cannot figure out how to open :wah:

You need to set the install path to your \Silent Hunter 5 folder.
Now all you need to do is click File-->Open and select the GR2 file you want to open


v1.1.427.1 released. See post #1

Fixed rendering problem with some units (a part or parts of the unit would not render)
Did some optimizations to make the loading/saving faster

TheDarkWraith 01-29-14 11:55 PM

v.1.1.428.1 released. See post #1

More optimizations done to make the loading process faster
Optimizations done to make the moving/rotation of a mesh or moving of it's vertices faster
Fixed rendering problem with the bounding spheres (they were rendering in incorrect positions)

gap 01-30-14 02:21 AM

Quote:

Originally Posted by TheDarkWraith (Post 2169130)
v1.1.424.1. released.

Quote:

Originally Posted by TheDarkWraith (Post 2169476)
v1.1.427.1 released.

Quote:

Originally Posted by TheDarkWraith (Post 2169493)
v.1.1.428.1 released.

Sorry for not reporting lately, I have been quite busy during the last few days, and thank you for your great work. :yeah:

Maybe this is a banal question, but seeing how fast you are progressing with your application, I wonder how far are we from the possibility to add new meshes to a granny file (or delete them), as you mentioned in another thread. Together with animations, that is probably one of the most important features needed for creating 'complex' units, i.e. composed by many independent parts, without having to carefully select the GR2 template that we start importing our meshes in :yep:

tonschk 01-30-14 03:30 AM

:yeah::up::sunny:

Quote:

Originally Posted by gap (Post 2169512)
and thank you for your great work. :yeah:


TheDarkWraith 01-30-14 07:19 AM

Quote:

Originally Posted by gap (Post 2169512)
Maybe this is a banal question, but seeing how fast you are progressing with your application, I wonder how far are we from the possibility to add new meshes to a granny file (or delete them), as you mentioned in another thread. Together with animations, that is probably one of the most important features needed for creating 'complex' units, i.e. composed by many independent parts, without having to carefully select the GR2 template that we start importing our meshes in :yep:

In time it will come :up:

tonschk 01-31-14 05:31 PM

Thank you for the help, finally I was able to load something, when I try to close the application, the viewer ask me if I want to save the modification made by the viewer itself to be able to open the GR2 file (I didnt do anything)

http://i194.photobucket.com/albums/z...ps901685bc.png


Quote:

Originally Posted by TheDarkWraith (Post 2169476)
You need to set the install path to your \Silent Hunter 5 folder.
Now all you need to do is click File-->Open and select the GR2 file you want to open



TheDarkWraith 01-31-14 05:50 PM

Quote:

Originally Posted by tonschk (Post 2170195)
Thank you for the help, finally I was able to load something, when I try to close the application, the viewer ask me if I want to save the modification made by the viewer itself to be able to open the GR2 file (I didnt do anything)

You said yes to add missing embedded strings. That is why it's asking if you want to save the changes.

tonschk 02-01-14 08:23 AM

Are those "missing embedded strings" modifications gonna negatively or positively affect the SH5 simulator if I click "yes save changes" ?, thank you for your help :up:


Quote:

Originally Posted by TheDarkWraith (Post 2170201)
You said yes to add missing embedded strings. That is why it's asking if you want to save the changes.


TheDarkWraith 02-01-14 08:42 PM

Quote:

Originally Posted by tonschk (Post 2170351)
Are those "missing embedded strings" modifications gonna negatively or positively affect the SH5 simulator if I click "yes save changes" ?, thank you for your help :up:

Neither. If you start modifying the file then you will need them.


Fixed the texture coordinate rendering problem I found when rendering gap's barrage balloon's uvs. All his uvs were in the range of 0.0-1.0 but the app still tiled them 2X2. What I changed was where the app was getting the uvs from. Before I was taking them straight from the mesh. I found that when dumping the DirectX internal data structures it 'optimizes' the uvs and other data so they are not 'original' anymore. Now the app takes the uv data from the vertices in the mesh's PrimaryVertexData class.
http://www.subsim.com/radioroom/pict...pictureid=7310

Also did some more optimizations on the loading to decrease the loading time even further. I'll never attain Granny Viewer speed but every little bit helps :D

Also fixed problem of bounding box(s) not being recomputed when importing

gap 02-02-14 02:41 AM

Quote:

Originally Posted by TheDarkWraith (Post 2170577)
Fixed the texture coordinate rendering problem I found when rendering gap's barrage balloon's uvs.

...

Also did some more optimizations on the loading to decrease the loading time even further. I'll never attain Granny Viewer speed but every little bit helps :D

Also fixed problem of bounding box(s) not being recomputed when importing

:yeah:

Have you looked into why, once imported with your application, the baloon gets so many 'redundand' vertices? Looking in its UV map, I have spotted a few unwelded vertices which can be optimized before importing, but they evidently can't be the one reason for the many tangents/binormals displayed by your application for each vertex. :hmm2:

Useless to say that the lesser the vertices, the smaller the file size (on disc and in memory), the smoother the rendering of units in game :)

P.S: what is the exact meaning of the 'calculate' button in the meshes tab? IIRC, it says something about normals, but clicking on it does nothing apparently...

tonschk 02-02-14 05:21 AM

Every little bit helps :yeah:


Quote:

Originally Posted by TheDarkWraith (Post 2170577)
Also fixed problem of bounding box(s) not being recomputed when importing



All times are GMT -5. The time now is 10:34 PM.

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