![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|
11-21-11, 06:06 PM
|
#1 |
|
Black Magic
![]() |
ok, after some thought on this here's what I'm going to do:
Bones reposition like they should when you change position and rotation which is good. Meshes on the other hand do not. Even though meshes are supposedly 'bound' to a bone they are, in fact, not in SH5. Thus if we treat each mesh as a new 'bone' then it will help mitigate the pain and frustration. Since they will be classified as a bone then they will inherit position information (from the GR2Coords class). I'll initialize their position information to 0 (no rotations, no position - (0,0,0)) and set their transform to the Identity transform. This will work because they are already pre-positioned to where they need to be. Now when the user asks to reposition the item or change it's rotation then these variables will obviously not be 0 anymore. I'll check to see if they are 0 or not and if not then I'll update the mesh's verticies to reflect the change the user wanted. Now to take what I just described and apply it to the code The fact that this has to be done in the first place is utterly absurd. There was no reason to use the Granny system...the DAT file system would've done everything they needed. |
|
|
11-21-11, 06:13 PM
|
#2 |
|
Stowaway
Posts: n/a
Downloads:
Uploads:
|
I'd tend to agree about the dat format.
The benifits of the Granny system were not implemented in a 'saveing Grace' way. I'm just sitting here wondering how many of the Upper's are sweating it out wondering when people like you and I can pull thier arses out of the fire!
|
|
11-21-11, 06:42 PM
|
#3 |
|
Captain
![]() Join Date: May 2011
Posts: 489
Downloads: 106
Uploads: 0
|
Just dropping by to express my gratitude for still working on fixing the game and learning more about it.
|
|
|
11-22-11, 06:45 AM
|
#4 | |
|
Lieutenant
![]() Join Date: Nov 2006
Location: St. Petersburg, Russia
Posts: 264
Downloads: 73
Uploads: 0
|
Quote:
While this policy is understandable in the case of charging user for the copy-protection and things alike in the hope to prevent loosing $$ that should motivate further development work, in the SH5 case not only the money were unnecessarily spent but $$ loss is further aggravated by preventing modders saving the unfinished game. In my opinion this is squandering at its best! I am sorry for the offtopic, just couldn't hold myself. ![]() @ TDW, This is amazing progress with bones, wtg! I actually wanted to ask whether I understand correctly that this non-moving meshes issue doesn't affect animation editing in the sense that when we will be editing animations we won't need to move the meshes? To give an example - if we think of the infamous 'ladder-climbing-lamp-changing' animation, I guess it is much easier to cut it directly in the file to leave only climbing part of it and we will not need 3d editor in this case. Sorry if it is a stupid question. Last edited by Vanilla; 11-22-11 at 08:15 AM. |
|
|
|
11-22-11, 04:05 PM
|
#5 | ||
|
Stowaway
Posts: n/a
Downloads:
Uploads:
|
Quote:
Someone will get hurt. ![]() Quote:
One can edit the animations GR2 files to 'zero out' things in a way. Say to remove the 'screw in the light bulb' part? Just loop the information just before that part so the animation appears to pause for the set duration or change the timing so it passes quicker. |
||
|
11-22-11, 04:40 PM
|
#6 |
|
Black Magic
![]() |
v1.0.394.0 released. See post #1
Now you can edit everything related to bones (except the name) including extended data. In the Bones tab double click a bone or skeleton to have a window appear that will list all the properties associated with the bone/skeleton. Double click a property to change it's values. Values are immediately written to file when ok is clicked. As the changes are immediate you'll be able to see your changes on the screen also (after ok pressed). Working on the meshes now (being able to scale, rotate, and reposition them) Just some FYI: the inverseworldtransform I do not use in the app (rendering wise). I haven't been able to see it used in the game either so I haven't utilized it. If you do find that it actually does something in game let me know so I can see what it does. You still can't change the model's position, rotations, or scaling yet. I'll probably have that in next version. The transform that is used for rendering is bone transform * model transform |
|
|
11-22-11, 04:49 PM
|
#7 |
|
The Old Man
![]() |
Hope you include a Undo button option.
|
|
|
11-22-11, 05:06 PM
|
#8 |
|
Black Magic
![]() |
|
|
|
11-22-11, 09:48 PM
|
#9 |
|
Black Magic
![]() |
now since we can edit a bone's position, orientation, scale, etc. I should tell you all about the flags property of the bone. The flags property is a bitarray and has (that I know of) 3 bits:
bit 0: defines whether the bone has position data or not bit 1: defines whether the bone has rotation data or not bit 2: defines whether the bone has scale/shear data or not if bit 0 is high (value of 0x1) then the bone will use the position data it has. If it is low then it defaults to 0,0,0 for position. Even if the bone has position data if this bit is low then it will ignore it. if bit 1 is high (value of 0x2) then the bone will use the rotation data it has. If it is low then it defaults to Quaternion.Identity. Even if the bone has rotation data if this bit is low it will ignore it. if bit 2 is high (value of 0x4) then the bone will use the scale/shear data is has. If it is low then it defaults to Matrix.Identity. Even if the bone has scale/shear data if this bit is low it will ignore it. You can 'combine' bits to use more data. i.e: bits 0 and 1 enabled (value of 0x3) will cause the bone to use it's position data and rotation data but ignore it's scale/shear data (scale/shear will be set to Matrix.Identity). Took me some time to figure this out about the Granny bones. |
|
|
11-23-11, 02:33 PM
|
#10 |
|
Ace of the deep .
|
Nice work
![]() I downloaded GR2EditorViewer_v1_0_402_0 Dont know really what i am doing . I opened the undersea GR2 and edited the meshes scale for the rocks to 3 . I can see the larger rocks in the viewer ok . When i exit out of the viewer and then open up undersea again the GR2 file is the vanilla size again . 1.5 looks nice for the KGV hull . If i try to open NBB_Nelson the message says Name was not found for mesh in pointers . |
|
|
11-23-11, 06:01 PM
|
#11 | |
|
Stowaway
Posts: n/a
Downloads:
Uploads:
|
Quote:
|
|
|
11-23-11, 06:01 PM
|
#12 | |
|
Black Magic
![]() |
Quote:
Right now you get to safely 'play' and experiment with them I am going to change the way you input rotations. Most, if not all, don't know what a quaternion is or how to specify rotations with it. I'm going to make it the standard pitch, yaw, and roll so it will be much easier to rotate meshes and bones. I'll look into the NBB_Nelson and see what's going on. |
|
|
|
11-23-11, 06:42 PM
|
#13 | |
|
Black Magic
![]() |
Quote:
My parser set the pointer type for strings with the first character of '_' as the wrong pointer type. It has been corrected and the NBB_Nelson now loads correctly without error |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
