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-23-14, 09:41 PM   #2161
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Okay. In other words, I must always remove manually the 'default' material (from within Wings 3d it is not possible to do it). This would be a minor disturbance but (for the sake of programming cleanness)...

...how hard would be making your application to check actual subset/material linkings instead?
Actually more than 75% of the code for this is already there. I must've worked on this while overseas last year! When it's complete then that default material won't matter anymore. I might be able to finish it up tomorrow

I also see why the materials aren't updating (I see how I broke it!). Once again I'll fix tomorrow.

Now it's time to finally sit down on my own sectional and watch a movie on my own bigscreen
TheDarkWraith is offline   Reply With Quote
Old 01-24-14, 02:23 AM   #2162
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

v1.1.408.1 released. See post #1

Fixed problem where materials that have been modified not showing (Modified) in the materials tab
Fixed problem of mesh's materials not being updated if the update materials checkbox is checked on an import
The import/export window will now hide after pressing the Import/Export button
Changed how the updating of mesh's materials works during an import with the update materials checkbox checked: importer will try and match up the objects defined and it's usemtl definition to the subsets (now that default material that's always defined in Wings3D MTL files is not an issue). If the importer matches up all that it can and there are some subsets that still don't have materials updated then it will default to using the remaining materials defined to fill in the subsets needing materials updated.
You no longer have to save/reload to see the material changes after an import. All the changes are done immediately and will be visible. This now forces you to plan your subsets/materials before an import. You need to ensure that the subsets have the correct (might need different materials assigned to them) materials assigned before import. Take for instance where a mesh has 2 subsets defined. You are wanting to import an OBJ file that defines 2 subsets with 2 different materials. If the current mesh has the same material defined for both subsets then both mesh's subset's materials will be updated with the last material properties.
If you are importing into a mesh and the import will cause the mesh to gain additional subsets then the importer can't update the materials for those additional subsets because no prior material was defined for them. You will need to assign a material(s) to those additional subsets after the import is complete.
If the importer can't find a texture specified in a material then it will ask you to find it for it (it will show a window where you can navigate to the texture to be used)
If your MTL file defines self-illumination/emissive (Ke) then you need to ensure the emissive/self-illumination is enabled in the material's extendeddata before doing the import. If the emissive/self-illumination is not enabled in the material's extendeddata prior to import then the importer will NOT update the material's emissive/self-illumination data.
There are only two maps the importer supports: map_Kd (diffuse) and map_Bump (or Bump). All other maps (map_Ks for instance) will be ignored. For the occlusion map (AO) define it as map_Kd and the importer will know how to handle it

TheDarkWraith is offline   Reply With Quote
Old 01-24-14, 11:14 AM   #2163
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

v1.1.409.1 released. See post #1
Added the ability to view the vertex declaration for a mesh



right click on a mesh to view the context menu. You'll notice a new entry: Vertex declaration. If you click that:



A dialog box will appear showing you how the vertices for that mesh are defined. The number after the component name is the number of items that comprise that component. i.e.: Position has a value of 3. That means 3 items are needed to define position (X, Y, and Z). It also tells you how many bytes each vertex in the mesh occupies memory wise.

I'm currently working on the ability to change the vertex declaration of a mesh (add/remove components)
TheDarkWraith is offline   Reply With Quote
Old 01-24-14, 01:37 PM   #2164
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

Welcome back, TDW!

Awesome to see you and that you are still working on the editor!!!!

One thing: I have had issues with "mirrired" or "inverted" texture coords.
The example can be seen here: http://www.subsim.com/radioroom/show...22#post2147022

I was never able to figure it out, so I have just inverted the textures and it worked fine, but it would be interesting to understand.
Targor Avelany is offline   Reply With Quote
Old 01-24-14, 02:50 PM   #2165
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Targor Avelany View Post
Welcome back, TDW!

Awesome to see you and that you are still working on the editor!!!!

One thing: I have had issues with "mirrired" or "inverted" texture coords.
The example can be seen here: http://www.subsim.com/radioroom/show...22#post2147022

I was never able to figure it out, so I have just inverted the textures and it worked fine, but it would be interesting to understand.
Have you tried the newest version to see if the same thing happens? If it does then have you tried setting the double sided property in the mesh's extended data? Did you also try unchecking the invert Y texture coordinates in the importer window?
TheDarkWraith is offline   Reply With Quote
Old 01-24-14, 02:54 PM   #2166
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

Quote:
Originally Posted by TheDarkWraith View Post
Have you tried the newest version to see if the same thing happens? If it does then have you tried setting the double sided property in the mesh's extended data? Did you also try unchecking the invert Y texture coordinates in the importer window?
No on th first question. Yes to the second. I will be trying the new version as soon as I have a smidge of free time at home on computer.
Targor Avelany is offline   Reply With Quote
Old 01-24-14, 04:14 PM   #2167
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Coded in the ability to see the face normals and vertex normals. This could be useful to see if your normals are screwed up or not.

The app calculates the face normal by taking each triangle's 3 vertice's normals and averaging them.

Here is a screenshot of face normals being rendered:
TheDarkWraith is offline   Reply With Quote
Old 01-24-14, 05:36 PM   #2168
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

It's growing thorns


No, not really. That would be the rendering of the vertex normals (green), binormals (yellow), and tangents (orange). Of course if the mesh's vertex declaration doesn't define one or more of these then they can't be rendered.

Don't know what binormals and tangents are? Google it

Now you can visually verify that these are correct also
TheDarkWraith is offline   Reply With Quote
Old 01-24-14, 06:22 PM   #2169
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

While trying to open Silent Hunter 5\data\Terrain\Locations\CustomAreas\navrik.GR2 with GR2EditorViewer_v_1_1_409_1
Comes up with error embedded string failed its alignment check
THE_MASK is offline   Reply With Quote
Old 01-24-14, 07:27 PM   #2170
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by sober View Post
While trying to open Silent Hunter 5\data\Terrain\Locations\CustomAreas\navrik.GR2 with GR2EditorViewer_v_1_1_409_1
Comes up with error embedded string failed its alignment check
The app caught what it was coded to do. Here are some dumps from that GR2 file: https://www.mediafire.com/?wbwrbw0dtnc13qs

I swear when I think I just start to have a clue about the Granny format some GR2 file pops up that blows one of my theories, assumptions, or rules out the window! I don't have many theories, assumptions, or rules for special GR2 files (which this one is - pointers come before data) but previous ones at least followed the alignment or didn't follow the alignment specified for the sections. This one is totally bizarre - only in Section 0 does it break the 'rules'. Sometimes it decides to follow the alignment, then nope, then oh I'll follow it again, nah not anymore, oh ok let's follow alignment again, etc. etc
TheDarkWraith is offline   Reply With Quote
Old 01-24-14, 08:26 PM   #2171
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by sober View Post
While trying to open Silent Hunter 5\data\Terrain\Locations\CustomAreas\navrik.GR2 with GR2EditorViewer_v_1_1_409_1
Comes up with error embedded string failed its alignment check
I updated the 'rules' for special GR2 files with the revelation from this GR2 and the app was able to successfully load AND save it I hope there aren't too many more of these 'surprises' still. Starting with v1.1.413.1 you'll be able to load and save this file and others like it.
TheDarkWraith is offline   Reply With Quote
Old 01-24-14, 11:30 PM   #2172
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

rendering tab updated with items needed for the rendering of face normals, vertex normals, vertex binormals, and vertex tangents


The context menu for the mesh's has been updated with the necessary entries for the rendering of face normals, vertex normals, vertex binormals, and vertex tangents


v1.1.415.1 released. See post #1

- updated rendering tab and mesh's context menu for rendering of face normals, vertex normals, vertex binormals, and vertex tangents
- changed the code dealing with bounding boxes and bounding spheres to save memory and minimize errors
- updated the 'rules' for the special GR2 files due to something Sober found
- the verify function read a book and gained intelligence. Less false 'is possibly corrupt' now. It has had some new rules added to it.
- Mesh adding/deleting/changing subsets shouldn't cause any problems - people need to verify this though
- a few optimizations were done on the code to minimize memory usage (found some com objects that I wasn't disposing of when I was done with them)
- When you view a mesh's materials you are no longer able to select any
- Started coding in the ability to change a mesh's vertex declaration - about 50% done on it

The app calculates the face normal by taking each triangle's 3 vertice's normals and averaging them.

I've noted that the guns_radars GR2 file will not load with the app due to mixed values being found in Section 0. I'm investigating what these mixed values are.
TheDarkWraith is offline   Reply With Quote
Old 01-25-14, 07:48 AM   #2173
tonschk
Admiral
 
Join Date: Mar 2007
Posts: 2,200
Downloads: 172
Uploads: 0
Default



Quote:
Originally Posted by Targor Avelany View Post
Welcome back, TDW!
tonschk is offline   Reply With Quote
Old 01-25-14, 09:23 AM   #2174
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Just finished testing the new features with v1.1.415.1

Vertex declarations/Normals, Tangents and Binormals rendering: they seem to work as supposed. I can see 1 Normal and up to 6 Tangents and Binormals coming out of each balloon vertex. Does it mean that each vertex has been split into six during importing, each with slightly different topology?

Material updating: textures/material properties are getting updated now. Everything looks fine within GR2 Editor (lighting enabled) but... no matter what ambient/diffuse/specular/shininess settings I set in Wings3d, the result is always the same in Goblin (i.e. an over reflective model, as for the crates that we discussed before).

An example:

material properties of the imported object:
ambient: 0.5 / diffuse: 0.5 / specular: 0.5 / shininess: 0.5

result:



left: Goblin; right: GR2 Editor (Lightning Enabled with ambient light and one directional light - light colors and direction: default).

Tried importing in various files, but the result didn't change. I have uploaded the files of my example on mediafire, if you want to have a look into them:

https://www.mediafire.com/?b3e0sibqwt7nhbr

NOTE: the GR2 file included in the above package is reported as 'possibly corrupt' by your verifier. This is because it had been previously edited with various old version of GR2 Editor. Anyway, as I have stated before, importing the same object in a clean file didn't make things better.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 01-25-14, 09:45 AM   #2175
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Vertex declarations/Normals, Tangents and Binormals rendering: they seem to work as supposed. I can see 1 Normal and up to 6 Tangents and Binormals coming out of each balloon vertex. Does it mean that each vertex has been split into six during importing, each with slightly different topology?

Material updating: textures/material properties are getting updated now. Everything looks fine within GR2 Editor (lighting enabled) but... no matter what ambient/diffuse/specular/shininess settings I set in Wings3d, the result is always the same in Goblin (i.e. an over reflective model, as for the crates that we discussed before).
If you see multiple binormals and tangents for a vertex then it has been cloned by the importer (it needed to because different UV data for each clone was found).

Using the new normals, tangents, and binormals features I can see what's going on with them:


And they look fine. All the normals are pointing outwards and the binormals and tangents are orthogonal where they need to be (the normals, binormals, and tangents form a corner).

This is an interesting thing of why it renders 'washed-out' in Goblin...What I'm having a hard time with is why the importer needed to clone some of the vertices multiple times when it appears they are only really needed once. Take the body for instance along the side. I can see multiple binormals and tangents which tells me that there are multiple vertices at that one vertex. I don't see why.

As far as the verifier saying it might be corrupt it's saying that because it found 'filler' between embedded strings. Most likely because you imported this into the GR2 file using a version < 400. It's nothing to worry about.
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:12 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.