SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
12-18-11, 02:26 AM | #286 |
Black Magic
|
Implemented picking. Currently you can 'pick' a mesh on the screen by double clicking it's bone origin and:
- render is set so solid or solidwire - lighting is disabled I will convert it over to just being able to double click the mesh itself but I just wanted to see if my idea worked or not. The stipulations of render set to solid or solidwire and lighting disabled will still hold The item 'picked' will turn a beige color and the meshes tab will show the item as the currently selected item. If you select another item in the meshes tab then the currently 'picked' item will change to the item selected. A message is posted in the status box letting you know that you 'picked' a mesh: Double click an empty part of the screen to 'unpick'. I will implement picking for verticies also so I can implement the ability to edit/change verticies of a mesh. I will have it coded that in order to 'pick' a vertice you have to be in a render mode that has points (because each point is a vertice). |
12-18-11, 10:11 PM | #287 | |
The Old Man
|
Quote:
|
|
12-19-11, 02:05 AM | #288 |
Black Magic
|
have all the picking done. You can select an object by double clicking on it.
If a render mode contains solid then double click any object. If a render mode conatins solid and you have bones enabled then you have to double click the bone origin to select the object If a render mode contains points then double clicking a point will select the vertice. Now for the fun part: use the mouse to drag/rotate the object/vertice to it's new position/rotation You can now deform the mesh by dragging verticies to new positions. I currently have one problem that is a matrix problem that I can't figure out. It deals with rotations. Say you double click the funnel on top of the King George V. Now you yaw the mesh 90 degrees. Now let's say you want to pitch the mesh 90 degrees. What should happen is it pitches on it's yawed coordinate system (since we yawed it 90 degrees +x is now where +z was and +z is now facing down -x). But I can't make this happen. I've tried to figure out how to do this but keep running into a ro*******. I have everything working except for this more to come... |
12-19-11, 02:49 PM | #289 |
Weps
Join Date: Sep 2002
Location: SW France
Posts: 361
Downloads: 137
Uploads: 0
|
Sorry to be dumb. Keep getting
Exception is: Error in the application. ********* ********* Exception while presenting I've had this with all the latest versions. Set SH5 path to top level SH5 directory (one above data) as in screenshots. Whatever GR2 file I try opening I get the error. Any help would help. MLF
__________________
Je pense donc je fuis! |
12-19-11, 03:26 PM | #290 | |
Black Magic
|
Quote:
Figured out my matrix problem After sleeping on it I woke up realizing that I had to treat each axis of the selected object's rotation offset individually. Think of it like camera control - you compute a rotation matrix for each axis based on a combination of up, look, and right vectors. When you want to rotate the camera you change the up, look, and right vectors then compute the new viewmatrix. Well instead of it being a viewmatrix it's a rotation offset matrix. Ah the simple things allude us sometimes... |
|
12-19-11, 04:22 PM | #291 | |
Weps
Join Date: Sep 2002
Location: SW France
Posts: 361
Downloads: 137
Uploads: 0
|
Quote:
When I load up the editor the status panel shows:- Silent Hunter 5 GR2 Editor/Viewer v1.0.429.0 by TheDarkWraith Reading in cfg file... DirectX initialized SH5 install path set to E:\SH5 Then try loading, for example, Bunker.gr2 and :- Silent Hunter 5 GR2 Editor/Viewer v1.0.429.0 by TheDarkWraith Reading in cfg file... DirectX initialized SH5 install path set to E:\SH5 GR2 file path is E:\SH5\Data\Terrain\Locations\bunker.gr2 ********* Exception while presenting Exception is: Error in the application. ********* ********* Exception while presenting Exception is: Error in the application. ********* Directx Version = 9.0c 4.09.0000.0904 Thanks for all your work on this application. MLF
__________________
Je pense donc je fuis! |
|
12-19-11, 04:30 PM | #292 | |
Black Magic
|
Quote:
I'll have the new version ready here soon |
|
12-19-11, 04:46 PM | #293 |
Weps
Join Date: Sep 2002
Location: SW France
Posts: 361
Downloads: 137
Uploads: 0
|
Hi TDW,
I have tried Bismark, KG5, Scharnhorst, Hipper..... usw usw. Same result. regards MLF
__________________
Je pense donc je fuis! |
12-19-11, 05:06 PM | #294 | |
Black Magic
|
Quote:
You probably had it set to shaders and are missing the \Shaders folder or it can't find the shaders folder and/or the .fx files. |
|
12-19-11, 05:41 PM | #295 | |
Weps
Join Date: Sep 2002
Location: SW France
Posts: 361
Downloads: 137
Uploads: 0
|
Quote:
Regards MLF
__________________
Je pense donc je fuis! |
|
12-19-11, 05:48 PM | #296 | |
Black Magic
|
Quote:
Anything change in your system since then? DirectX updated? Microsoft .NET 3.5 installed? |
|
12-19-11, 07:54 PM | #297 |
Black Magic
|
Now I need to tell you all about the new changes:
1 = Name of GR2 file opened (has always been there) 2 = Name of object or vertice selected 3 = Camera locked or not. Pressing C will lock/unlock camera. Useful when you don't want to disturb the image accidentally. Also camera has to be locked in order to move/rotate an object/vertice 4 = Coordinate system reference. If no item is selected then this will say Camera. Once an item is selected: - if camera is not locked then this will say Camera (so you can move the camera around with the item locked) - if camera is locked then this will say Object. Now you are free to move the item around, rotate it, scale it, etc. with the mouse 5 = Current axis of freedom. - XYZ means you have all axis available and can move in any direction - X means only X axis is free to move - Y means only Y axis is free to move - Z means only Z axis is free to move - you can have any combination of the XYZ, i.e. XY, YZ, ZX, etc. - You can toggle an axis of freedom on/off by: - for X press X - for Y press Y - for Z press Z Now some may ask what's with this axis of freedom stuff? It's really handy. Say your moving an object and you only want to move it in the Y direction. Disable X and Z axis and you don't have to worry about it moving in any other direction but Y. 6 - This is what the color of the object will turn to when selected. NOTE: if you are selecting a vertice then it will not change color. A lock diamond of this color will appear around the vertice. The default 4 arrow cursor has changed. Now when the render surface is active (you click on it) the cursor will change from default to a + symbol. This means you are ready to select something. Once an item is selected the cursor will change depending on what axis of freedom you have enabled. To select an object/vertice double click on it. Once an item is selected an axis origin will appear on it showing you it's orientation in the world. This is needed so you know how to move/rotate the unit. Note: if you have bones enabled (shown) then you have to double click the bone origin itself to select an object. The object 'tied' to that bone will be selected. To select objects you must be in a render mode of: - solid - solid & wire To select vertice you must be in a render mode of: - point - wire & point - solid & point - solid & wire & point You can select objects/vertice with lighting enabled or disabled. I recommend lighting be disabled so you can see the color change. Once an object/vertice is selected you are free to change the render mode to anything you want. This is handy for when you select a vertice. After selecting it set the render mode to solid. Now when you drag the vertice around you can see the mesh deform in real time. By clicking on the Meshes tab you bring up a list of the meshes. When you click on one it will also select the object on the screen (you'll get the color change). This means the object is selected and ready to moved/rotated. To clear a selection (unselect) press spacebar. Pressing T will show stats (time it takes to render a frame, number of verticies rendered, number of objects culled) Pressing H will show the help screen. This help screen is dynamic. It can change based on whether you have an object selected or not and some other things. There are two screenshots available. Pressing W will take a screenshot of only the rendered 'world' on your screen. Pressing A will take a screenshot of the application itself (everything you see about the app). You get to specify a name and location to save these. NOTE: they can only be saved as .dds files. These screenshots can be used to take a screenshot of a problem or something you were doing so you can give me more information about it. I might code in the ability to select a wide range of output formats for the screenshots... EDIT: I did. You can save in bmp, dds, jpg, png, or tga format. more to come... Last edited by TheDarkWraith; 12-19-11 at 10:00 PM. |
12-19-11, 10:26 PM | #298 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
Nice!
On the sleep on it thing? I know the feeling well! After several days of mulling it over? I broke the compression of modified GR2 files for SWTOR. |
12-19-11, 11:58 PM | #299 |
Black Magic
|
After testing it out I needed to make another change:
I was repositioning Decal31 from the bunker with the mouse. The mouse has many shared functions on it. This was really annoying sometimes. So I made a way you can turn off certain items the mouse can do. You can let the mouse translate, rotate, or scale by pressing the R, T, or S keys. Number 1 in the screenshot shows that I currently only have Translation (repositiong) turned on. Number 1 in that screenshot can show: R - rotations enabled S - scaling enabled T - translations enabled any combination of those letters. These only apply when an item is selected. 2 in the screenshot above allows you to choose the output format for the screenshot files. 3 in the screenshot above is another way you can choose what the mouse can do with the selected item. 4 in the screenshot above is the poster I had framed in the screenshot earlier. It's picture is gone because it's selected (and thus has the selected color). You'll also notice the axis attached to the item that shows it's orientation. I moved it away from the wall using the mouse Notice in the bottom that it says that the camera is locked (cause I was moving the poster) and it shows the selected object's name: Decals31. It says object because we are using the object's coordinate system for any repositioning/rotating/scaling. All the axis were available for repositioning/rotationg/scaling (XYZ) and the mouse could only do translations (T) with the selected item. I also enabled all the help screens. Pressing H will show the one in the top right. Pressing U will show the one in the top left. Pressing M will show the one under it. The M menu shows all the combinations for the mouse. This menu is dynamic based on what you have selected (object or vertice) or not selected. |
12-20-11, 01:14 PM | #300 |
Black Magic
|
Advanced German technology:
Able to get away in a hurry... Was getting some CTDs when I would select a vertice to modify. Couldn't figure out why...cryptic message of "Execution engine has encountered a problem". After some in-depth searching on Google and finally at Microsoft's website this can happen if the garbage collecter (this is a managed app) tries to 'collect' while your app is doing something 'heavy'. So I had to force GC collections while the app is trying to figure out what you wanted to select. This results in about a 1-3 second delay from when you double click something to when it shows as being selected. Minor annoyance... |
|
|