![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
03-06-13, 06:47 PM
|
#1921 | |
|
Mate
![]() Join Date: Nov 2011
Posts: 53
Downloads: 4
Uploads: 0
|
Quote:
ouch! I got faith in you man! |
|
|
|
03-06-13, 07:01 PM
|
#1922 |
|
Black Magic
![]() |
|
|
|
03-07-13, 12:53 PM
|
#1923 |
|
Black Magic
![]() |
v1.1.371.1 released. See post #1
You need to upgrage to this version if you are using older versions. This version fixes some inconsistencies found in the app while trying to load the montezuma GR2 file (this file exposed some problems I wasn't aware of!) This version also lets you delete transformtracks from a trackgroup. The transformtrack(s) in conjuction with an animation is what lets animation happen. The animation will define the trackgroup(s) it is tied to. I still haven't figured out how the transform track(s) cause animation. I'm thinking that they are defining bezier curves but not 100% sure yet ![]() You still won't be able to open any GR2 file that contains granny_real16 values yet (montezuma). I'm still coding that in |
|
|
03-07-13, 03:33 PM
|
#1924 |
|
Black Magic
![]() |
just finished updating the app so that it can handle any granny_real16 value in the vertex data. Was able to read in all the montezuma's vertex data with no issues
![]() Now just have to update the app to handle granny_real16 indices |
|
|
03-07-13, 04:03 PM
|
#1925 |
|
Mate
![]() Join Date: Nov 2011
Posts: 53
Downloads: 4
Uploads: 0
|
wow, that was quick!
|
|
|
03-07-13, 07:54 PM
|
#1926 |
|
Black Magic
![]() |
Coded in the reading of 16 bit indices. App is really coming along now
![]() Now there is a wide range of GR2 files it can open. Should only be a limited few it will have problems with. The granny_real16 is still a little problem. I can read them no problem. The problem is when it comes time to write them. I read the granny_real16 values as 16 bit values but then cast them to 32 bit floats internally (actually I read the 2 bytes that make up the granny_real16 value then pass this to a function that converts the 2 bytes to a float value). This way I didn't have to make tons of internal code changes. It also helped because there would be a big problem with VertexDeclarations because they don't have a type that describes 3 float16 values. What I'm thinking about doing is converting any granny_real16 values to granny_real32 values. This will increase the file size but it's all I can do until I can find a way to convert a float (4 bytes) into a 16 bit float. Microsoft DirectX's 16 bit float is useless - you can't use a BinaryWriter to write it nor can you cast it to anything. Does anyone know of any code that will convert a float (or single or double) to a 16 bit value Obviously there is a way to do it because the granny_real16 value exists in the GR2 file ![]() Also made a code change in regards to a mesh's visibility. If the mesh has more than 1 bone binding then the app will set the visibility of the mesh to visible. Most of these GR2 files outside of SH5 don't have the same extendeddata for the bones that specifies it's visibility. |
|
|
03-07-13, 10:36 PM
|
#1927 |
|
Black Magic
![]() |
v1.1.374.1 released. See post #1
The app will now let you load a GR2 file that has 16 bit values If the app has 16 bit values it is locked out from doing many things. Basically you can view the GR2 file and you can export from it. You cannot import into it or do anything that would change the file structure (you are totally locked out from saving it). Reason is I haven't finished coding that part that deals with writing 16 bit values yet.
|
|
|
03-08-13, 09:33 AM
|
#1928 |
|
Black Magic
![]() |
after much searching I finally found a class for C# that works with 16 bit floats
No longer need to convert 16 bit vertex data to 32 bit. I can now write 16 bit floats Internally the app uses 32 bit data for vertex data and indices (if they are 16bit in the GR2 file they are read as a 16bit value but then converted to 32bit) but when it comes time to write the data it will convert the necessary data on the fly back to 16 bit before writing.
|
|
|
03-08-13, 11:58 AM
|
#1929 |
|
Mate
![]() Join Date: Nov 2011
Posts: 53
Downloads: 4
Uploads: 0
|
Nice! This thing is really coming along. I still need to learn my way around it though.
|
|
|
03-08-13, 12:06 PM
|
#1930 | |
|
Black Magic
![]() |
Quote:
Just found a critical error in the app. I removed the download link in post #1. DO NOT IMPORT ANYTHING USING CURRENT VERSION POSTED AT POST #1 OR ANY OTHER EARLIER VERSIONS The critical error is if the vertex data contains DiffuseColor0 data I'm presently not accounting for that when I allocate space for additional vertices in the GR2 file. This, of course, will totally corrupt the mesh data in the GR2 file. If the vertex data doesn't contain a DiffuseColor0 component then everything is fine. I'm working on the error currently. I've also discovered another critical error in the app that was exposed by the montezuma GR2 file. When I would allocate/deallocate space for indices/vertices the app was not checking to ensure they were properly aligned to the section's alignment value. This will also corrupt the GR2 file. Live and learn The more files I try to open with the app the more I learn and the more robust the app becomes.I will post a new version when the errors have been fixed. |
|
|
|
03-08-13, 12:21 PM
|
#1931 |
|
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
|
|
|
|
03-08-13, 12:26 PM
|
#1932 | |
|
Ace of the Deep
![]() |
Quote:
Glad that the app is maturing pretty well! You are doing some amazing job, TDW!Just funny how it works out
|
|
|
|
03-08-13, 12:37 PM
|
#1933 | |
|
Black Magic
![]() |
Quote:
|
|
|
|
03-08-13, 01:31 PM
|
#1934 |
|
Black Magic
![]() |
Just tested all the new code for ensuring indices and vertices are aligned to the section's alignment value on the lifeboat and all went well. Now to test the montezuma file. If it can make it through it we should be good
|
|
|
03-08-13, 02:36 PM
|
#1935 |
|
Ace of the Deep
![]() |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
