SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
02-23-13, 10:03 AM | #1876 |
Black Magic
|
more than likely yes Try viewing it in Granny Viewer to see if the animations are screwed up or not.
|
02-23-13, 11:03 AM | #1877 |
Black Magic
|
Using the Granny Viewer as my guide I'm going through my trackgroups and animations code to see where I might have screwed up in not reading in all the data. Hope to have it sorted out here soon
The trackgroups and animations code just reads in all the data. I have no clue yet how to assemble that data to view/change the mesh data to make animations possible. |
02-23-13, 12:17 PM | #1878 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
|
Quote:
Animations are displayed correctly Last edited by gap; 02-23-13 at 12:29 PM. |
|
02-23-13, 04:10 PM | #1879 | |
Black Magic
|
Quote:
Found the error with the TrackGroups and Animations. The error wasn't actually in any of them per se but actually in my ExtendedData class, specifically the reader function In the TrackGroups they define curve data. Well that curve data has a special type of granny data type, what I call an integer-string layout. It's only found in this curve data (that I've come across so far). That in itself is not the problem. The problem was I set a flag denoting that the reader encountered this so that it knew what to do with the number of items it had to read into for this. I never reset the flag when it was done reading the required number of items This was wreaking havoc on anything read in after that from then on. The fix was easy: reset the flag when done reading the required number of items. Finding the problem was like finding a needle in a haystack though! I should be lifting the TrackGroups and Animations restrictions with the next version. I also plan on adding an Animations tab to the app. Don't get too excited - I still don't understand how all these TrackGroups make animations possible yet What I do know: the TrackGroups work on the deformable mesh data (section 3). Each TrackGroup somehow defines how to deform some part of the mesh. What the curve data means in those TrackGroups is still a mystery to me. |
|
02-23-13, 09:23 PM | #1880 |
Black Magic
|
What I said about TrackGroups working on only deformable vertex data just got shot to pieces:
the pericope_ct proved me wrong. It contains nothing but rigid vertex data. It is also a compressed GR2 file but the app had no problem with that I also had a perfect load of this compressed GR2 file (no broken chains in ANY section!) Looks like I fixed the not reading all the TrackGroups and Animation data finally |
02-23-13, 10:41 PM | #1881 |
Ace of the Deep
|
yayay!!!!
I also will write up my problem with textures. Unfortunately it persists even with the newest version. I'll write up the adding subsets problem too. |
02-24-13, 02:04 AM | #1882 |
Ace of the Deep
|
Ok.
1) open stock file 2) select the mesh you want to add the subsets to 3) Go through the menu... 4) select the mesh (in this .obj file there are 4 meshes - so it is possible I have to add one by one, but not sure) 5) get the error TDW, here's the file that I was attempting to use to add the subsets: p.s. I deleted the link and file, assuming you grabbed it already. Last edited by Targor Avelany; 02-24-13 at 05:50 PM. |
02-24-13, 02:15 AM | #1883 |
Black Magic
|
What all did you have checked for import (ao, normals, etc.)? Strict or loose import?
|
02-24-13, 02:53 AM | #1884 | |
Ace of the Deep
|
Quote:
p.s. the second error reproduction, with textures, will write up tomorrow. But one interesting point there: the way I get all the subsets into the GR2 is actual regular import of a mesh (loose, selecting everything). It imports all of the subsets and arranges them perfectly: Reason mentioning it is in regards to the above problem. |
|
02-24-13, 11:49 PM | #1885 |
Ace of the Deep
|
So, problem with textures:
1) so, as I mentioned in my last post, I'm not able to add meshes. But, replacing the mesh altogether, works extremely well: it replaces the mesh, arranging the subsets in perfect order (see pic. 1) 2) now, for the textures. Currently, with materials import/textures import locked out, have to go through it manually. First: add all the textures. 3) Now, need to add 1st layer of material. It doesn't work if you finish here - need to go through the second layer of materials. First layer is just adding materials with 0 maps with existing textures. 4) Now, need to go through and define maps. This is the second layer 5) The next step is to add all the maps to material bindings of the mesh. 6) Fix all the materials for each subset, hull for hull, floor for floor. Etc. 7) Save, reload, look pretty! 8) Load in Goblin Editor - not so much fun. |
02-26-13, 02:00 PM | #1886 |
Ace of the Deep
|
Found another little problem with materials/textures. This also has been tested on a stock file of Uboat_7b_AI.gr2
The error appears when you attempt to save the edited gr2. Process: 1) add new texture 2) add new material with no maps for the above texture 3) add a materials with above texture as diffuse (or any other) map |
03-03-13, 01:17 PM | #1887 | |
Black Magic
|
Quote:
That also exposed a bug in my function that calculates tangents and binormals (if the user decided to have them calculated). I forgot to pass an offset to this function to account for the current vertices. That problem has also been fixed. I was finally able to import your OBJ file into the lifeboat: I hope that is what your file was supposed to add to the lifeboat. Looks very strange to me. I viewed it in Wings3D and I see the same thing (minus the original lifeboat). Yes the materials are messed up because I never coded that in. I currently set all new subsets to default to the first material binding of the mesh. Why? Well because I haven't decided how to best implement the correct way to do this yet. Same thing applies for importing a mesh. Once I have finally decided on the correct way to implement adding the materials defined in the mtllib I'll implement it. I finally figured out what the mixed values for section 0 were for. I have that coded in and working correctly also now Now I'm just looking for a GR2 file that has mixed values for section 2 and/or 4. Those mixed values are probably defining Int16 indices vice Int32 indices but won't know for sure till I can look at one. Last edited by TheDarkWraith; 03-03-13 at 01:30 PM. |
|
03-03-13, 01:19 PM | #1888 | |
Black Magic
|
Quote:
|
|
03-03-13, 01:20 PM | #1889 | |
Black Magic
|
Quote:
|
|
03-03-13, 02:41 PM | #1890 | ||
Ace of the Deep
|
Quote:
Quote:
|
||
|
|