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 03-17-12, 03:47 AM   #946
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

I didn't break extendeddata The problem is a multi-threading problem, more specifically more than one object (thread) trying to read from a variable at the same time. I know it has to do with GR2 files with more than one model so I have a place to start looking in the code. Multi-threaded bugs are the hardest to eliminate

One excellent thing I did was used pre-processor directives to allow me to enable the app as multi-threaded or single threaded. I switched it back to single-threaded and was able to load the UBoat_sensors.GR2 file which tells me a multi-threaded problem.

Good news is almost all the errors posted so far by you all have been fixed
TheDarkWraith is offline   Reply With Quote
Old 03-17-12, 03:56 AM   #947
pedrobas
Seasoned Skipper
 
Join Date: Apr 2007
Location: Huelva, Spain
Posts: 664
Downloads: 301
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
I didn't break extendeddata The problem is a multi-threading problem, more specifically more than one object (thread) trying to read from a variable at the same time. I know it has to do with GR2 files with more than one model so I have a place to start looking in the code. Multi-threaded bugs are the hardest to eliminate

One excellent thing I did was used pre-processor directives to allow me to enable the app as multi-threaded or single threaded. I switched it back to single-threaded and was able to load the UBoat_sensors.GR2 file which tells me a multi-threaded problem.

Good news is almost all the errors posted so far by you all have been fixed
pedrobas is offline   Reply With Quote
Old 03-17-12, 04:38 AM   #948
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Rubini View Post
@TDW,

One more thing "Material" related. I was tryiing to change my Rod antenna texture to avoid that feeling that it is the "same as periscopes" but obviously that material/texture is used for a lot of others sensors objects. So i need to change the attached Material (or must be able to create a new one ) to the round antena. This way i can use a exclusive texture only for it. But as it is now GR2 Editor don´t allow me to do this "simple" task. Any idea? Am i doing something wrong?
Creating a new texture won't work? Or many other materials reference this material as a map?

Quote:
Originally Posted by BIGREG View Post
other way is to able to change just the texture of the mesh needed without change the other in the "tree" Please TDW

Edit : For the errors one exemple

If you change the diffuse map of the mesh you want , all works fine
(see in the "Meshes" menu -> select the Mesh->Subset->material and look in material to know how to "map number" is used)

But if you change the BumpMap ( relief ) in the editor you get not see the new one ,but just a "flat" one or not be loaded and when you look again in the menu "Meshes" the "material" is present !?
But that work ingame and in the goblin editor
I fixed the renaming problem. I knew that the Granny System hates duplicates of anything but I still went ahead and renamed the object vice creating a new embedded string for it. Now I create a new embedded string in the GR2 file for the object you change the name of. Now word of caution: everytime you rename an object I create a new embedded string in the GR2 file (even if it already exists). This means that if you change an object's name and then you go and change it again the first name is now 'orphaned' in the GR2 file (akin to memory leaks in windows).

Quote:
Originally Posted by Rubini View Post
1. Also I noticed that the help menu is gone (when pressing "H")

2. the new material's edition isn't available for that light bulb issue. It continues without possibility to edit/change/add anything. I tried to use a new real dds texture for bec_submarine.dds (so, no changes on .GR2 files at all). The game reads it but it loss the light emission...then probably the light emission/color for this material is yet hidden somewhere.

3.About to change a texture (now the rod antenna issue), it don't work because a lot of others objects uses the same material/texture. What need to be made here is to change/create a new material only for the rod antenna.
The rendering of the text (key H) bug has been fixed. This bug happened when you had text being rendered (help screen or the likes) and you minimized the app and then restored it.

You have multiple materials referencing a given texture? Why can't you create a new texture and have one of those materials reference the new texture? Creating new materials I'll be working on in the next coupe of days.

Quote:
Originally Posted by Rubini View Post
2.The files in question:Room_CR.GR2, bone CR_bec_sticla, matetrial 4-Default, cfg#498, bec_submarine.dds. (IIRC - I'm at my work now - anyway this bone only have one material attached to it)

3.Will be a great advance to we edit/change/add material and textures on SH5 models!
2. I'll take a look at these files

3. You can edit/change/add new textures currently. Materials are coming shortly.

Quote:
Originally Posted by Rubini View Post
1. The "H" help key contend works at first but continues not be showing after you hide/show UI.

2. The clone bone function works, but not for the bone that i´m working on!!. Confirm here: file Rom_CR.gr2, bone CR_bec_sticla. It gives a error and stop the GR2 editor.

3. To solve the light bulb and the rod antenna issue (that i´m working on) we need to have the hability to add/delete a material for a bone. As it is now i can only change names (material and textures) but not really "edit" the material for a bone.

4. I can´t open the file UBoot_Sensors.GR2 without an error and automatically close of GR2 editor.
It says: "extendeddata unknown x is not 0x0!" (where x = 1, 2, 3...etc)
1. see above

2. I'll load this file up tomorrow and try to clone it to see what's going on

3. As I mentioned above I'll be working on adding new materials in the upcoming days. Deleting of anything will come much later (I have the code to do it it's just figuring out the correct order to remove everything that I need to figure out)

4. Problem is due to a multi-threading problem in the app. There are mutliple objects (thread) trying to read from one/many () variables all at the same time which is a problem. I have to narrow down the offenders and use locks on them. Because of this I have taken the app back to single-threaded (loading times will increase some).

Quote:
Originally Posted by Vanilla View Post
'New->Bone' stopped doing anything for me (the skeleton is selected). My bad?

When panning view with the RMB 'Edit' context menu always appears when you release right button, makes zooming a bit clumsy.
Fixed the New-->Bone problem. The problem appeared when I enabled the ability to clone bones.

The panning view RMB 'Edit' context menu has been removed from the render window.

More context menus and menu items have been added to the treeviews.

Fixed other errors I encountered while using the app.

Test version 1.1.116.0 available here: http://www.mediafire.com/?8z7tw2q9lpd7qiq
TheDarkWraith is offline   Reply With Quote
Old 03-17-12, 09:08 AM   #949
BIGREG
Grey Wolf
 
Join Date: Oct 2005
Location: Bretagne-FRANCE
Posts: 813
Downloads: 155
Uploads: 0
Default

Hi TDW

Here a little picture

__________________
~~~~BigReg~BigRegOne~~~~



"Better watch where you do not go, because where were going, we will know what it is when we get there, and anyway, it will never be only water."

Proverbe Shadok
BIGREG is offline   Reply With Quote
Old 03-17-12, 10:40 AM   #950
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Bump maps are for normals. Normals are used in lighting. Thus you have to enable lighting and add some lights to see the bump maps
The app defaults to no lighting so under lighting Tab ensure that lighting is checked. I would add some ambient light also so ensure ambient is checked. And the best light to use for all around lighting is directional

You could just use ambient lighting and 'crank up' the light output by selecting a higher white value for the diffuse and specular.

Ensure you are rendering using shaders for best possible picture. Rendering using fixed-function pipeline will give you SH3 like rendering, rendering using programmable pipeline will give you SH5 rendering.

Last edited by TheDarkWraith; 03-17-12 at 10:51 AM.
TheDarkWraith is offline   Reply With Quote
Old 03-17-12, 04:47 PM   #951
Vanilla
Lieutenant
 
Join Date: Nov 2006
Location: St. Petersburg, Russia
Posts: 264
Downloads: 72
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
...
I fixed the renaming problem. I knew that the Granny System hates duplicates of anything but I still went ahead and renamed the object vice creating a new embedded string for it. Now I create a new embedded string in the GR2 file for the object you change the name of. Now word of caution: everytime you rename an object I create a new embedded string in the GR2 file (even if it already exists). This means that if you change an object's name and then you go and change it again the first name is now 'orphaned' in the GR2 file (akin to memory leaks in windows).
So we'd better not rename anything or risk unnecessary increasing file-size? I mean I am creating several 'layers' of waypoints for different situations and needs (like 'run-web' layer in addition to standart 'walk-web' layer, or 'crash-dive TRF positions' layer in addition to standard TRF one) by copying and editing original files and then linking them through @LNK, I guess it will be easier to understand and edit, but this requires renaming of many waypoints in the copied files, should I better not do this but rather create complete new bones instead?

- bug: cannot clone bone SQ_SQ_WP02_DOOR, gives unhandled exception: cannot convert bone to skeleton error

- issue noticed: when I 'add' waypoints.gr2 to the room.gr2 linking the waypoints to their intended locations in the room no longer work. I mean the waypoints appear at 0, 0, 0 world coordinates.

- this is one is long there: if you modify something, then save, then close not changing anything, the Editor still pops the 'The file was modified. Do you wish to save?' dialog, that's a bit confusing. Just opening and closing not doing anything does not invoke the dialog.

- On 1400 x 900 resolution bone creation dialog is messed: name, parent, gr2 file and flags fields are clipping onto each other.

And a wish: is it possible to have a default camera position, so that I don't have to 'zoom-in' everytime I open a file? I mean if it is not too difficult to do, there are many more important things I know.

Last edited by Vanilla; 03-17-12 at 05:19 PM.
Vanilla is offline   Reply With Quote
Old 03-17-12, 05:09 PM   #952
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
Creating a new texture won't work? Or many other materials reference this material as a map?

You have multiple materials referencing a given texture? Why can't you create a new texture and have one of those materials reference the new texture? Creating new materials I'll be working on in the next coupe of days.
Yes, exactly this is the problem. I have one texture being used by a lot of materials. I can´t remember if others materials are using the same map in this case ... I will look at this now with this last GR2 Editor version (because i could not open the file on the lasts versions) feedback soon!
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 03-17-12, 05:15 PM   #953
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Are you programing in CS or C++?
I may have some source code on the animations stuff you'd be interested in. It's in CS.
  Reply With Quote
Old 03-17-12, 05:24 PM   #954
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Ok! tested!

1. The help key problem is gone!
2.The file UBoot_Sensors.GR2 is now openned without problems!
3. And really that texture is attached to a material that is used by a lot of objects. See:

__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 03-17-12, 06:27 PM   #955
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Vanilla View Post
So we'd better not rename anything or risk unnecessary increasing file-size? I mean I am creating several 'layers' of waypoints for different situations and needs (like 'run-web' layer in addition to standart 'walk-web' layer, or 'crash-dive TRF positions' layer in addition to standard TRF one) by copying and editing original files and then linking them through @LNK, I guess it will be easier to understand and edit, but this requires renaming of many waypoints in the copied files, should I better not do this but rather create complete new bones instead?

Don't understand what you're asking I think I have a way that I can search for 'orphaned' embedded strings in the GR2 file. I'm testing it currently. If it works then I'll have a new menu item File-->Clean that will remove these orphaned embedded strings and anything else that isn't being used.

- bug: cannot clone bone SQ_SQ_WP02_DOOR, gives unhandled exception: cannot convert bone to skeleton error

I need to know which GR2 file this is in

- issue noticed: when I 'add' waypoints.gr2 to the room.gr2 linking the waypoints to their intended locations in the room no longer work. I mean the waypoints appear at 0, 0, 0 world coordinates.

Looking into this currently

- this is one is long there: if you modify something, then save, then close not changing anything, the Editor still pops the 'The file was modified. Do you wish to save?' dialog, that's a bit confusing. Just opening and closing not doing anything does not invoke the dialog.

This has been annoying me too and I just haven't gotten around to fixing it. I'll look into it now

- On 1400 x 900 resolution bone creation dialog is messed: name, parent, gr2 file and flags fields are clipping onto each other.

This is my fault. I anchored everything to the bottom when I was resizing the form and forgot to set their anchors back to the top. This has been fixed.

And a wish: is it possible to have a default camera position, so that I don't have to 'zoom-in' everytime I open a file? I mean if it is not too difficult to do, there are many more important things I know.

Not a bad idea. I'll have to think about how I want to implement such a thing
see above in yellow
TheDarkWraith is offline   Reply With Quote
Old 03-17-12, 06:29 PM   #956
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by privateer View Post
Are you programing in CS or C++?
I may have some source code on the animations stuff you'd be interested in. It's in CS.
C#. I can read/write C#, C++, C, Java, Python, VB, and some others. I'm interested in anything that will help speed development of this app along
TheDarkWraith is offline   Reply With Quote
Old 03-17-12, 06:39 PM   #957
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

I'll send a PM with the source code DL link.
I've not looked at it since it was sent to me so I can't say it's what you may need.
A quick look tells me it's got a bit of interesting info.
  Reply With Quote
Old 03-17-12, 07:13 PM   #958
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by privateer View Post
I'll send a PM with the source code DL link.
I've not looked at it since it was sent to me so I can't say it's what you may need.
A quick look tells me it's got a bit of interesting info.
Thank you much. I'll look it over tomorrow

Quote:
Originally Posted by Vanilla View Post
- issue noticed: when I 'add' waypoints.gr2 to the room.gr2 linking the waypoints to their intended locations in the room no longer work. I mean the waypoints appear at 0, 0, 0 world coordinates.
Pre-processor directives are nice for compiling in different manners/forms but they are frowned upon because they are a source of bugs. Such is the case with this. Once the pre-processor directive of multi-threaded was commented out so was the function call that takes care of this. I have fixed it now
TheDarkWraith is offline   Reply With Quote
Old 03-17-12, 08:46 PM   #959
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Vanilla View Post
So we'd better not rename anything or risk unnecessary increasing file-size? I mean I am creating several 'layers' of waypoints for different situations and needs (like 'run-web' layer in addition to standart 'walk-web' layer, or 'crash-dive TRF positions' layer in addition to standard TRF one) by copying and editing original files and then linking them through @LNK, I guess it will be easier to understand and edit, but this requires renaming of many waypoints in the copied files, should I better not do this but rather create complete new bones instead?
I just coded an embedded string remover that used my de-allocater for the first time. It worked flawlessly That opens up the door for deleting items now

Now this means there's no worry (well there is until we fully prove my code is working as intended and the GR2 file isn't hiding some surprises that I haven't figure out yet) about renaming items now I don't see any surprises happening as the pointers are the life blood of the GR2 file and I check every pointer to see if the embedded string to remove is referenced or not. If referenced I don't remove it, if not referenced it gets removed. I've tested the code on several GR2 files (special and non-special types) and have had no problems. Verified them all with Granny Viewer also
TheDarkWraith is offline   Reply With Quote
Old 03-18-12, 12:28 AM   #960
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

NOTE: We are in an alpha state now (the ending .1 in the version) due to when changing an object's name the app creates a new embedded string in the GR2 file then it looks to see if the old embedded string isn't referenced anymore. If it's not referenced anymore then it removes the old embedded string from the GR2 file (via my de-allocater). It's this removing of the old embedded string that has put us into an alpha state. I'm 99% sure that I have everything correct code wise for this but there's that 1% chance I don't. If that old embedded string is in-fact referenced by something then the GR2 file is most likely shredded. Once a GR2 file is shredded it's nearly impossible to fix (due to all the pointers). Once enough people have changed names on many different objects and have experienced no errors (error would be shredded GR2 file that app AND Granny Viewer is not able to open) then I will take it out of alpha state. If you're going to edit an object's name ensure to backup your files when using this version before letting the app save them in case something goes irai.

Fixed all errors reported except for this:

Quote:
Originally Posted by Vanilla View Post
- bug: cannot clone bone SQ_SQ_WP02_DOOR, gives unhandled exception: cannot convert bone to skeleton error
because I need to know which GR2 file this is located in so I can try and duplicate the problem.

Added ability to store camera settings into cfg file. Camera tab's Reset box has been updated with boxes of Loaded and Designed. The buttons in those boxes will reset the camera to as-loaded (Loaded - as read from cfg file) or to as-designed (Designed - as I designed the app to be) values. When the app starts it reads the cfg file and will apply the last camera settings it saved to the cfg file (position, rotation, and zoom).

New File-->Settings menu entry: Store Camera. When clicked this will store the current camera settings in memory and it makes these settings the new as-loaded values. When the app closes the current 'as-loaded' values are written to the cfg file. You can force a write of the cfg file by clicking File-->Settings-->Save



The changing of Texture names (path) has been updated so that it creates a new embedded string in the GR2 file. Before it was just changing the embedded string which could impact many other Textures. Now it only changes the embedded string (path) for that Texture only.

Adding a Waypoints_Room_x file to the app when the app already has a Room_x (where x is equal to both) loaded results in the waypoints being automatically moved to correct position in room. This was broken in last version and has been fixed now.

File-->Save problem has been fixed

App is still in single-threaded mode as I haven't been able to track down the error(s) of multiple objects reading/writing to common variable(s) yet

@BIGREG: did you enable lighting and get the bump maps to show (using programmable pipeline for rendering)


test version 1.1.118.1 available here: suspended due to finding pointers in Texture's extendeddata (char * bitmap and char * File Name) not being updated

Last edited by TheDarkWraith; 03-18-12 at 01:34 AM.
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 11:09 AM.


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.