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-25-14, 02:34 PM   #2191
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Using the same GR2 file that we have been experimenting on today, I have cloned the 'BalloonMkVII_wires' bone, gave it the 1 flag and changed its x position.

Problem #1: the "Update" button never worked for me (always greyed out). I can store the bone changes without updaing them though, and though being warned on saving that there are changes that need to be stored/updated, my changes are saved correctly.

Problem #2: I tried to link the cables to the new mesh. By pressing Ctrl, I can select a new bone by keeping the old one selected. After confirming the change, nothing happens in the Editor. When I open again the bone editing window, I can see that the mesh is still linked to the old bone, but not to the new one.

Problem #3: I can discard the old bone linking and select a new one (without pressing Ctrl). The change is accepted apparently. The next time I open the bone linking Editor, it shows that the new bone is selected, but the viewport tells me that the mesh is still linked to the old bone.
I'm looking into it now...
TheDarkWraith is offline   Reply With Quote
Old 01-25-14, 02:48 PM   #2192
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 'broke' into the code at the point where it goes to render the texture coordinates and dumped the contents of the mesh's UV coordinates. I don't understand why DirectX did this but here's an except of those uvs:

...

Since there are values in 0.0-1.0 range and values in -1.0-0.0 range the app tiled them 2X2. So the app is doing exactly what it was programmed to do.

DirectX must have 'optimized' these UVs when I called the DirectX function to optimize the mesh . My local copy of the vertices that were used to build the mesh have the 'correct' uvs with all in the range 0.0-1.0. Strange. DirectX is doing what it needs to do I guess
Do you mean that UV coordinates are changed in memory?

Summing up, what would be the adverse effect of UV coordinates not being in the 0-1 range? During my tests in game I couldn't notice anything wrong except for the balloon "jumping" on screen at times (as if some frames of their animation were skipped), when looked through the binoculars with the boat swinging. The game didn't lag anyway: I don't know how to explain it, but only the balloons seemed to lag, while the rest of the scene went on flawlessy
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-25-14, 03:27 PM   #2193
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Do you mean that UV coordinates are changed in memory?

Summing up, what would be the adverse effect of UV coordinates not being in the 0-1 range? During my tests in game I couldn't notice anything wrong except for the balloon "jumping" on screen at times (as if some frames of their animation were skipped), when looked through the binoculars with the boat swinging. The game didn't lag anyway: I don't know how to explain it, but only the balloons seemed to lag, while the rest of the scene went on flawlessy
I dumped a DirectX internal data structure just to see what it was doing with the uvs. Nothing to worry about.

uvs do not have to be in 0-1.0 range. They can be any value. How they will be handled outside the 0-1.0 range depends on how the wrapping is defined.

v1.1.418.1 released. See post #1
This addresses your #1 problem. Let me know if it's still not working.
The C# operator || (short-circuit OR) was not working like it was supposed to and thus was causing something to happen that wasn't supposed to. Now the Update button will become active as soon as you move something OR you change the Position, Rotation, Scale, Flags of a bone or mesh. Note I said Flags. If you change the Flags from 0 to say 1 (Position) then you need to press the Update AND Store buttons. Failure to do so will result in Flags being reset when you press the Reset button (if you ever press it)
TheDarkWraith is offline   Reply With Quote
Old 01-25-14, 04:06 PM   #2194
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
v1.1.418.1 released. See post #1
This addresses your #1 problem. Let me know if it's still not working.
Testing it right away
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-25-14, 04:18 PM   #2195
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by gap View Post
Testing it right away
Changed bone position data, but the 'Update' button was still grayed out; changed flags from 0 to 1, but nothing changes, as far as that button is concerned....

Anyway I wonder what is its use, since I am able to press the 'Store' button and to save any bone change without updating
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-25-14, 04:24 PM   #2196
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Changed bone position data, but the 'Update' button was still grayed out; changed flags from 0 to 1, but nothing changes, as far as that button is concerned....

Anyway I wonder what is its use, since I am able to press the 'Store' button and to save any bone change without updating
You sure you are using v1.1.418.1? The update button should've gone active as soon as you changed the flags or moved the bone (or you move a mesh)

The update writes the changes to memory. Until you press the update button the changes are temporary. Changes have to be written to memory before they can be Stored (set as new default).
TheDarkWraith is offline   Reply With Quote
Old 01-25-14, 04:41 PM   #2197
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
You sure you are using v1.1.418.1?
So I asked myself before posting my last report, and I double-checked

Yes, I am sure, v1.1.418.1 (its window is still open from my last test, and I can clearly read the version number from the header bar)

Quote:
Originally Posted by TheDarkWraith View Post
The update writes the changes to memory. Until you press the update button the changes are temporary. Changes have to be written to memory before they can be Stored (set as new default).
I (still) can press the 'Store' button without pressing 'Update' first.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-25-14, 04:49 PM   #2198
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
I (still) can press the 'Store' button without pressing 'Update' first.
That's interesting. How did you do that?

EDIT: actually there's one way that will happen. If you change the Flags in the extendeddata then the store button will be active without the update button active. Since you didn't change any position, rotation, or scale then the update button is not active.
TheDarkWraith is offline   Reply With Quote
Old 01-25-14, 05:01 PM   #2199
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
That's interesting. How did you do that?
Oh, not everyone got the skills for doing it

Out of jokes... it has always been like this for me: when I tweak a bone the 'Store' button becomes available in place of 'Update'. This is something I can live with, because (despite any warning by GR2E) I can still save the changes, but since you asked to break you application, I thought I should inform you about this oddity
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-25-14, 05:05 PM   #2200
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
EDIT: actually there's one way that will happen. If you change the Flags in the extendeddata then the store button will be active without the update button active. Since you didn't change any position, rotation, or scale then the update button is not active.
Whether I modify or not position, rotation, or scale data, 'Store' is always activated instead of 'Update'
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-25-14, 05:15 PM   #2201
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Whether I modify or not position, rotation, or scale data, 'Store' is always activated instead of 'Update'
Close all opened GR2 files.
Open your barrage balloon.
Select the last bone in the bones treeview
Is the Update or Store button active?
Edit the bone's extendeddata and set Flags to 7
Is the Update or Store button active?
If Store active then press Store to store the new flags value of 0x7
Store should now go inactive
Now move the bone on it's Z axis
As soon as you started moving it the Update button should've gone active along with Reset
Press Update
Store should've now gone active and Update goes inactive
Press Store
Store goes inactive and Reset goes inactive
Move bone again
Update should go active along with Reset
Press Reset
Update and Reset should go inactive and bone should move back to last stored position (last press of Store)
TheDarkWraith is offline   Reply With Quote
Old 01-25-14, 05:31 PM   #2202
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Problem #2: I tried to link the cables to the new mesh. By pressing Ctrl, I can select a new bone by keeping the old one selected. After confirming the change, nothing happens in the Editor. When I open again the bone editing window, I can see that the mesh is still linked to the old bone, but not to the new one.

Problem #3: I can discard the old bone linking and select a new one (without pressing Ctrl). The change is accepted apparently. The next time I open the bone linking Editor, it shows that the new bone is selected, but the viewport tells me that the mesh is still linked to the old bone.
Problem #2: I see why you can't add more bone bindings than what was originally declared. I test for this equality and if not satisfied (you asked for more bone bindings than what was originally declared) then it jumps to an empty function Whoops. Forgot to code that one

Problem #3: fixed. Now the treeview is updated with the change.

I'm coding in a 'Clean' function. This will 'clean' the GR2 file of irrelevant data (fillers for one). This will be a continuous WIP.
TheDarkWraith is offline   Reply With Quote
Old 01-25-14, 05:32 PM   #2203
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Close all opened GR2 files.
Open your barrage balloon.
Select the last bone in the bones treeview
Is the Update or Store button active?
None of them

Quote:
Originally Posted by TheDarkWraith View Post
Edit the bone's extendeddata and set Flags to 7
Is the Update or Store button active?
Store

Quote:
Originally Posted by TheDarkWraith View Post
If Store active then press Store to store the new flags value of 0x7
Store should now go inactive
Done, and the Store button went inactive

Quote:
Originally Posted by TheDarkWraith View Post
Now move the bone on it's Z axis
As soon as you started moving it the Update button should've gone active along with Reset
Done (through the Transform Position vindow). Store and Reset went active.

Quote:
Originally Posted by TheDarkWraith View Post
Press Update
Store should've now gone active and Update goes inactive
Press Store
Store goes inactive and Reset goes inactive
Pressed Store instead

Quote:
Originally Posted by TheDarkWraith View Post
Move bone again
Update should go active along with Reset

As before: Store and Reset are active

Quote:
Originally Posted by TheDarkWraith View Post
Press Reset
Update and Reset should go inactive and bone should move back to last stored position (last press of Store)
Done; Store and Reset went inactive, and bone moved back to its last stored position.

On my system, the Store button picks up and blocks all the "messages" sent to Update
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-25-14, 05:34 PM   #2204
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Problem #2: I see why you can't add more bone bindings than what was originally declared. I test for this equality and if not satisfied (you asked for more bone bindings than what was originally declared) then it jumps to an empty function Whoops. Forgot to code that one

Problem #3: fixed. Now the treeview is updated with the change.

those are important features!
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-25-14, 05:53 PM   #2205
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Done (through the Transform Position vindow). Store and Reset went active.
Ok, that makes sense. Try moving the bone using the render window. Select the bone in the bone treeview. Place mouse in the render window. Click the render window. Press C to cage the camera. Ensure T is visible in the bottom right of the app, if not then press T. Ensure Z is visible in the bottom right of window, if not press Z. Now press and hold right mouse button and move mouse forward. Soon as mouse started moving the Update and Reset button should've gone active. Press C to uncage the camera.

When you update the Position, Rotation, or Scale using the extendeddata window you bypass the Update. Obviously you know exactly where you wanted the item since you are directly typing it in!
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 07:48 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.