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-01-12, 07:52 AM   #1
rocker_lx
Watch
 
Join Date: May 2005
Posts: 27
Downloads: 0
Uploads: 0
Default

Wow, nice tool.

So I tried to open :\Ubisoft\Silent Hunter 5\data\Submarine\NSS_Uboat7b\NSS_Uboat7b.GR2

GR2 editor showes "Loading..." for aprox 5 sec then writes
"c:\Ubisoft\Silent Hunter 5\data\Submarine\NSS_Uboat7b\NSS_Uboat7b.GR2 closed"
in the status message ??

I can succesfully open "C:\Ubisoft\Silent Hunter 5\data\Submarine\NSS_Uboat7b\Submarine Parts\Conning_7B_02.GR2"
I can also export this one to obj.

Although I'm not able to import it into lightwave. I can open the file in wings3d and then export to lightwave, which will then open the file.

I'm sure I'm just missing something here. Is it normal that the tool always compiles the shaders at launch?

Anyway I'm really impressed with your work, you sir are really talented.

Edit:
how to to rotate, zoom objects in viewer? I can't figue it out.

Last edited by rocker_lx; 01-01-12 at 08:42 AM.
rocker_lx is offline   Reply With Quote
Old 01-01-12, 10:44 AM   #2
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by rocker_lx View Post
Wow, nice tool.

So I tried to open :\Ubisoft\Silent Hunter 5\data\Submarine\NSS_Uboat7b\NSS_Uboat7b.GR2

GR2 editor showes "Loading..." for aprox 5 sec then writes
"c:\Ubisoft\Silent Hunter 5\data\Submarine\NSS_Uboat7b\NSS_Uboat7b.GR2 closed"
in the status message ??

I can succesfully open "C:\Ubisoft\Silent Hunter 5\data\Submarine\NSS_Uboat7b\Submarine Parts\Conning_7B_02.GR2"
I can also export this one to obj.

Although I'm not able to import it into lightwave. I can open the file in wings3d and then export to lightwave, which will then open the file.

I'm sure I'm just missing something here. Is it normal that the tool always compiles the shaders at launch?

Anyway I'm really impressed with your work, you sir are really talented.

Edit:
how to to rotate, zoom objects in viewer? I can't figue it out.
There are things that make you ho hmmm, and there are things that make you go hmmm even more. This is one of them (NSS_Uboat7b). With every mesh that is made the final thing that is done to it is it gets 'optimized'. It's really not optimized but a cheap way to get DirectX to assign attribute IDs to each vertice. I call this function:

mesh.OptimizeInPlace(MeshFlags.OptimizeAttributeSort | MeshFlags.OptimizeIgnoreVerts, adjac);

Usually it has no problems. But for this sub and some others it fails on attempt. So I said what if I call it again? I did and it worked. Things that make you go hmmm...

So the problem is fixed and I'll have a new version out shortly

I don't have a lightwave exporter. I currently only export to obj format.

Yes the tool always compiles the shaders at launch. This is because you are free to modify them at any time and recompile and use. Press the R key to recompile and use.

Press H to access help screen overlay.

To rotate click and hold left mouse button, move mouse.
To pan hold middle mouse button and move mouse
To zoom hold right mouse button and move mouse forward/backward

Once the camera is 'locked' things change. It depends on which axis of freedom you have granted and which axis's aren't locked. Press H key for help. The help screen is dynamic based on what you are currently doing. Once an object is locked the help screen will change.
TheDarkWraith is offline   Reply With Quote
Old 01-01-12, 11:55 AM   #3
rocker_lx
Watch
 
Join Date: May 2005
Posts: 27
Downloads: 0
Uploads: 0
Default

Ok, thanks.

I tried with the mouse to move and it didn't do anything, so I retried and now it works !? I wonder what I did wrong before.

I meant the .obj import into lightwave, it gave an error. You can't of course implement an export for every format. I also tried with XSI modtools opening the .obj which gave no error but the mesh was not shown, this could also be due that I don't know XSI enough.

Last edited by rocker_lx; 01-01-12 at 01:49 PM. Reason: incomplete sentence
rocker_lx is offline   Reply With Quote
Old 01-01-12, 01:35 PM   #4
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by rocker_lx View Post
Ok, thanks.

I tried with the mouse to move and it didn't do anything, so I retried and now it works !? I wonder what I did wrong before.

I meant the .obj import into lightwave, it gave an error. You can't of course implement an export for every format. I also tried with XSI modtools opening the .obj which gave no error but the mesh was not shown, this could also be due that I don't XSI enough.
I use Wings3D to verify that the exporter is working correctly. If Wings3D opens it up correctly then I know the exporter is working correctly
TheDarkWraith is offline   Reply With Quote
Old 01-01-12, 08:52 PM   #5
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

v1.0.493.0 released. See post #1

Shaders precompiled now so app starts up quick. You can still recompile if you want if you modify them.

Fixed problem with bounding sphere class that would prevent some units from loading

Fixed problem in Mesh class that would sometimes prevent the chosen file from being loaded (i.e. NSS_Uboat7b.GR2)

Fixed bugs in rendering of texture coordinates. I wasn't taking into account the possibility of V values exceeding 1 or being less than 0.

Did some cosmetic fixes to the window(s) shown when texture coordinates are rendered. Unmaximizing the window now returns it to it's former state. Double clicking the status bar at the bottom of the window sets the window back to it's default (starting) size (even if maximized).

Double clicking the rendered area of the rendered texture coordinates allows you to save the image.

Still have to 'cut' the rendered texture coordinates into subdivisions for those who U or V value(s) exceed 1 or are less than 0.

Re-enabled the import function. This is the first import style I coded (I'm still working on finishing the other importer). So previous restrictions apply when importing back into the GR2 file.

Fixed some bugs in the exporter. Bugs had to do with when the mesh had more than one subset and the first subset was disabled exceptions would be thrown.

Fixed some other minor bugs

TheDarkWraith is offline   Reply With Quote
Old 01-02-12, 01:18 AM   #6
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


v1.0.495.0 released. See post #1

The texture coordinates now render a tiled image showing you the 'overall' texture coordinates layout and then it breaks those down into individual windows (those grids that have a valid face rendered in them). This will bring a new age to skinning in SH5

This part I coded I had to pat myself on the back about. Rarely do I ever make something this slick

Planning your app really does pay off. I had about a month of planning of it and boy was I itchin to code. I'm not one to plan, I shoot from the hip usually.

Work continues on the new importer. If everything goes as planned I'll be patting myself on the back again Everything's looking good so far...

In this screen shot I had the NRTW loaded up. I had selected Hull 01 mesh. I asked the app to render texture coordinates 0 for subsets 0 and 1:


What we have is the overall texture coordinate layout in the topleft for subset 0. Those images to the right of it are the grid breakdowns.

In the bottom left we have the overall texture coordinate layout for subset 1. Those images to the right of it are the grid breakdown.

Notice that in the overall layout it tells you the grid structure.
In the grid breakdowns it tells you the U and V range of that grid.

I have to say that I did complain about texture coordinates being outside of the 0-1 range initially. Now I'm quite fond of the idea This makes skinning so much easier to do!

On the grid breakdowns: A grid will render if it has a valid face of the mesh rendered in it. This means you can get 'garbage' grids if the grid contains garbage but that garbage is a valid mesh face (as told by the mesh's indicies)

Every texture coordinate window is an individual. That means you can save each one if you want or discard it by clicking the red X in the upper right corner. To save double click anywhere in the rendered part.

Next thing I plan to do with the texture coordinates is let you select individual faces of a mesh (if fillmode selected has wireframe in it) by double clicking the face and exporting those. This will allow you to pinpoint exactly the place where you want to skin or change the texture. You'll be able to select multiple faces of a mesh (a face is a triangle of the mesh in case you didn't know). When you switch to a fillmode that has wireframe in it you are seeing the 'faces' of each mesh.

When you ask the app to render the texture coordinates by pressing 1 or 2 in the Show box of the meshes it will first ask you if you are creating a mask. A mask does not render the background image, it only renders the 2D texture coordinates. So if you say yes to this question you will only get the 2D texture coordinates (masks are used to make/edit skins). If you answer no to this question the material for the texture coordinates will be rendered then the 2D texture coordinates. Either way the name and path of the material for the texture coordinates being rendered in the window appears at the bottom of the window.


Last edited by TheDarkWraith; 01-02-12 at 01:43 AM.
TheDarkWraith is offline   Reply With Quote
Old 01-02-12, 05:33 AM   #7
urfisch
Sea Lord
 
Join Date: Mar 2005
Location: Deep down in Germany
Posts: 1,944
Downloads: 42
Uploads: 0
Default

good job, rb!
__________________


urfisch is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 05:01 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 1995- 2026 Subsim®
"Subsim" is a registered trademark, all rights reserved.