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 01-17-13, 06:14 PM   #1726
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Just noticed that there has been a constant bug in the importers. The bug deals with Calculating tangents and binormals checkbox on the importer screen. If you set that to unchecked the app was still re-calculating the tangents and binormals. This has been fixed in v1.1.279.1
TheDarkWraith is offline   Reply With Quote
Old 01-17-13, 06:27 PM   #1727
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

I released v1.1.279.1 because of the bug I found in the imports and so that you all can start testing/playing around with adding new subsets to a mesh. I was unable to find any errors but if you do please post them in this thread. You can find the new version at post #1 of this thread.

All new subsets added will default to the first material listed in the GR2 file as their material. You'll need to manually edit this or add new materials for it.

Still working on the ability to move a subset of a mesh (currently you have to move the entire mesh [all of it's subsets] if you want to move it).

TheDarkWraith is offline   Reply With Quote
Old 01-17-13, 06:41 PM   #1728
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
I released v1.1.279.1
Got it, thank you TDW
gap is offline   Reply With Quote
Old 01-17-13, 07:04 PM   #1729
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

After some thought on how to implement the ability to move subsets of a mesh vice the whole mesh I know how I will implement it. I have a coordinates class that is responsible for keeping track of position, rotation, scale, etc. of any object. It contains all the support functions for manipulating these values also. What I will do is have each mesh subset create an instance of this coordinates class. Thus each subset will now have the ability to move, rotate, and scale. Now just to update the code to support this
TheDarkWraith is offline   Reply With Quote
Old 01-18-13, 12:04 PM   #1730
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

I knew the day was going to come when I would have to restructure my base classes. I was hoping that day was still a long ways away but the time had come to hunker down and do it. In order to give mesh subsets the ability to position, rotate, and scale I needed something that C# doesn't allow: multiple inheritance. Since I cannot have a class inherit from multiple base classes I had to restructure all my base classes. The benefit of this is the aforementioned and also reduced a lot of redundant methods and properties (thus saving memory). I have released v1.1.281.1 and you can find it at post #1. All this new version is is the previous version with all the base classes restructured and redundancy removed. Many, many changes were made and thus I hope there are no errors or bugs. You all can test this and tell me if you notice anything strange or notice any errors.

Now I can start coding the mesh subsets ability to translate, rotate, and scale
TheDarkWraith is offline   Reply With Quote
Old 01-18-13, 06:41 PM   #1731
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Exciting times ahead!

Just finished the bulk of the subset moving code and decided to give it a test. Here I picked Subset 0 of Hull01 and rotated it on it's Y axis to the right. Notice that the axis reference is positioned correctly on the subset of the mesh:



You'll also notice that the status bar is telling you that the app is adjusted Hull01 subset 0. You'll also notice that the Rotation box's Y button is activated. Everything works exactly like you're adjusting the mesh

So to really test the code I selected Hull01. I rotated it on it's Y axis a little to the right and rotated it on it's X axis a little. If everything is correct code wise then subset 0 should rotate with the main mesh and keep it's orientation to the main mesh. I would say we have success



Notice that the selected ref axis changed to the main mesh (Hull01). Everything working beautifully. Now I just have to finish the code for when you have adjusted a subset and you press the Store button in the Changes box.

If you'd like to playaround with this and/or test it here you go: http://www.mediafire.com/?1m55crcqe3yfcwk
I have disabled the Store button for mesh subsets. Pressing the Store button for meshes will NOT store the changes for any of the subsets. That's the code I'm working on now.


Last edited by TheDarkWraith; 01-18-13 at 06:57 PM.
TheDarkWraith is offline   Reply With Quote
Old 01-20-13, 10:15 AM   #1732
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Time to give the new version of your edotor a try, though I am still practising with its most basic functions

Talking about them I had a new tiny but, I believe. useful idea:

could you add an option for reloading diffuse/normal/occlusion maps? It would come handy when editing model's textures without changing textures definitions
gap is offline   Reply With Quote
Old 01-20-13, 10:19 AM   #1733
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
could you add an option for reloading diffuse/normal/occlusion maps? It would come handy when editing model's textures without changing textures definitions
IIRC that feature already exists. Select the Materials tab then select the material then select the Texture and right click on it for a list of actions. Select reload. You can do the same thing from the Textures tab. Pretty sure the Reload action is available from the Meshes tab also.
TheDarkWraith is offline   Reply With Quote
Old 01-20-13, 10:23 AM   #1734
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
IIRC that feature already exists. Select the Materials tab then select the material then select the Texture and right click on it for a list of actions. Select reload. You can do the same thing from the Textures tab. Pretty sure the Reload action is available from the Meshes tab also.
Thank you
gap is offline   Reply With Quote
Old 01-21-13, 12:15 PM   #1735
Ekmek
Mate
 
Join Date: Nov 2011
Posts: 53
Downloads: 4
Uploads: 0
Default

Great stuff! On the gr2 question - you said that it requires knowing the magic number of the granny file to import. How did you find it? If I get it for you can you add it to the options to load gr2?
Ekmek is offline   Reply With Quote
Old 01-21-13, 01:33 PM   #1736
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Ekmek View Post
Great stuff! On the gr2 question - you said that it requires knowing the magic number of the granny file to import. How did you find it? If I get it for you can you add it to the options to load gr2?
Post a link to the GR2 file in question and I'll look at it. The GR2 format is highly customizable and thus it's nearly impossible to code something to read everything without using Rad Game Tools DLLs.
TheDarkWraith is offline   Reply With Quote
Old 01-23-13, 01:51 AM   #1737
Ekmek
Mate
 
Join Date: Nov 2011
Posts: 53
Downloads: 4
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
Post a link to the GR2 file in question and I'll look at it. The GR2 format is highly customizable and thus it's nearly impossible to code something to read everything without using Rad Game Tools DLLs.

Great! Thank you for the help. Here is a link to the GR2 and I included the DLLs they use to convert FBX to their granny format. We can convert units exported as FBX from blender and then convert it to their gr2. But this limits us on reusing animations and is a real pain to re-rig our meshes to work on their animations. With leadres its impossible.

I hope the DLLs help. All I want to do is export one of their gr2s with its skeleton and a rigged mesh into a format I can modify in blender. If you can do that it would be greatly appreciated!

http://www.mediafire.com/?n5j42il74fq8491
Ekmek is offline   Reply With Quote
Old 01-24-13, 05:28 PM   #1738
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by Ekmek View Post
Great! Thank you for the help. Here is a link to the GR2 and I included the DLLs they use to convert FBX to their granny format. We can convert units exported as FBX from blender and then convert it to their gr2. But this limits us on reusing animations and is a real pain to re-rig our meshes to work on their animations. With leadres its impossible.

I hope the DLLs help. All I want to do is export one of their gr2s with its skeleton and a rigged mesh into a format I can modify in blender. If you can do that it would be greatly appreciated!

http://www.mediafire.com/?n5j42il74fq8491

The files are useing RAD's compression scheme to start with.
GrannyViewer can open those of course.
Until the compression is figured out?
You'd need to use RAD's dll's to access stuff.
They do frown on that.
  Reply With Quote
Old 02-03-13, 02:23 PM   #1739
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Ekmek View Post
Great! Thank you for the help. Here is a link to the GR2 and I included the DLLs they use to convert FBX to their granny format. We can convert units exported as FBX from blender and then convert it to their gr2. But this limits us on reusing animations and is a real pain to re-rig our meshes to work on their animations. With leadres its impossible.

I hope the DLLs help. All I want to do is export one of their gr2s with its skeleton and a rigged mesh into a format I can modify in blender. If you can do that it would be greatly appreciated!

http://www.mediafire.com/?n5j42il74fq8491
Quote:
Originally Posted by privateer View Post
The files are useing RAD's compression scheme to start with.
GrannyViewer can open those of course.
Until the compression is figured out?
You'd need to use RAD's dll's to access stuff.
They do frown on that.
That file with the link is compressed. Since I had time to kill in the air I decided to RE the Granny Viewer from when you click load file till the data was displayed. Doing this exposed some slight problems with the app that I will have to fix (some things that I guessed on I guessed wrong).
I was able to inject some assembly code into the Granny Viewer that caused it to spit out each decompressed section into a hex file. I then had my app take these files and make a new GR2 file out of them. The app had to adjust a bunch of pointers also but the result was SUCCESS Compressed files are no longer an obstacle to the GR2 Editor/Viewer I will explain more later when I have more time

I'll send the decompressed GR2 file to you so you can open in Granny Viewer and see for yourself. The app won't open it because there are some map names (irradiance map and such) that it doesn't recognize and thus throws an error. I have to add these map names to the app so it knows how to handle them.
TheDarkWraith is offline   Reply With Quote
Old 02-03-13, 02:47 PM   #1740
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Here is the file decompressed: http://www.mediafire.com/?1ujh04d0wja6jj3

You can open in Granny Viewer with no problems. Try and open it with the app and you will get an error about irradiance map unknown. I'll be updating the app when I have more time.

This is probably the first GR2 file decompressed without the use of Rad Games Tools DLLs The Granny Viewer is going to be the downfall of them. It tells me everything I've wanted to know and more

There was no sense in re-inventing the wheel and adding the code to decompress the GR2 file into the app (not to mention it's rather complex how they do their compression). It was easier to have the app spawn the Granny Viewer app, insert some assembly code into it, have the user open the file they want to decompress with the Granny Viewer, once the Granny Viewer displays the contents user closes Granny Viewer, app then reads the decompressed files spit out and builds a new GR2 file. Easy, simple, elegant...Utter shear beauty! That takes exploitation to a new level for me
TheDarkWraith is offline   Reply With Quote
Reply


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:36 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.