SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
01-25-14, 10:04 AM | #2176 |
Black Magic
|
This is looking straight down at the top of the barrage balloon. Look at the vertex right in the middle of the screen. There are like 6-10 vertices at that one point! Why? The importer found that vertex to have multiple references with all different UV data. Why does that one vertex have multiple UV data? It's displaying one texture only. There's something wrong with the Wings3D export or you did something really screwy in the UV mapping. |
01-25-14, 10:10 AM | #2177 | |||
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
http://www.subsim.com/radioroom/show...92#post2152092 Quote:
In any case I am afraid that this vertex iteration thing has nothing to do with the model looking washed out in Goblin. It is a material corruption. I have re-imported the same object file in a copy of the same file I used for my previous tests, but disabled the update material checkbox. This is a Goblin rendering of the resulting file: Quote:
On a side note: I have a little (or big?) request. As it is now, you program won't let us to have multiple bone bindings per mesh. I wonder if this can be changes. It would be useful for when we need to iterate a mesh many times and, I suppose, it would reduce greatly memory usage. |
|||
01-25-14, 10:17 AM | #2178 | |
Black Magic
|
Quote:
You should be able to specify as many bone bindings as you want for a mesh. If that isn't working then I need to look into it. I coded that in a long time ago. |
|
01-25-14, 10:23 AM | #2179 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
The top of the balloon (highlighted) is a continuous surface (I have just checked that there aren't unwelded vertices/edges). I can't see anything wrong in it. A 3ds max export of the same object provided by Targor, looks identical both in Wings and in GR2 Editor (same GR2 file size once imported, same binormals/tangents). |
|
01-25-14, 10:29 AM | #2180 |
Black Magic
|
Here's how my app rendered the texture coordinates:
What's interesting is that it had to tile it 2X2. I have to look over the code but I'm almost 100% sure it only tiles if it finds additional texture coordinates |
01-25-14, 10:43 AM | #2181 |
Black Magic
|
okay looking over the render texture coordinates code the app only tiles if the texture coordinates exceed 1.0 (u or v) and every multiple of 1.0 (plus or minus) causes an additional tiling.
Thus since it had to tile 2 X 2 either or both the u and v texture coordinates exceeded 1.0 (texture coordinates were in the range of -1.0 to 1.0 or 0.0-2.0 or -2.0-0.0). But clearly some of those texture coordinates are not being used so they are redundant and should be removed. Wings3D doesn't show tiling - that's one thing I disliked about it. Instead of tiling it just ensures all UV coordinates fall in 0.0-1.0 range (when rendering them) |
01-25-14, 10:57 AM | #2182 | |||
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
Quote:
Quote:
Last edited by gap; 01-25-14 at 11:07 AM. |
|||
01-25-14, 11:05 AM | #2183 |
Black Magic
|
Figured out why it looks 'washed-out'. Change the shininess strength to 0 in the extendeddata. Problem solved
I'm looking over my code to see if I screwed up and that value should be in range 0-1.0 vice 0-100. |
01-25-14, 11:07 AM | #2184 |
Black Magic
|
Yep I screwed up in the code. Shininess strength should be in range 0.0-1.0. I'll correct the code
For your barrage balloon set shininess strength to 0.5 and it will look like you wanted it to. |
01-25-14, 11:18 AM | #2185 |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
It works
|
01-25-14, 12:56 PM | #2186 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
Result: after re-importing the object with GR2 Editor, and clicking on the 'Show' button, the texture is tiled 3 x 3 times, rather than 2 x 2. My suspect is that either your code has 0-1 set as texture range, but with 0 and 1 not included, or for some reson Wings3d slightly exceeds this range Edit: no, it can't be this: I have scaled all my UV items so that they are well within the size of one texture, but GR2 Editor keeps showing them in a 2 x 2 frame Last edited by gap; 01-25-14 at 01:15 PM. |
|
01-25-14, 01:14 PM | #2187 | |
Black Magic
|
Quote:
As far as the shininess strength if you look at your MTL file the Ns is set at 50.0 so the app was doing everything correctly. It's just that granny expects this value in a 0.0-1.0 value. So what I've done is check this value to see if it's greater than 1.0 and if so then divide it by 100 to scale it to 0.0-1.0. I've also got to update the lighting render so that it uses this value. I noticed that it didn't appear 'washed-out' with my app like it did in Goblin. |
|
01-25-14, 02:00 PM | #2188 |
Black Magic
|
Ok I updated the renderer so that it's using the correct shininess value. Now if you get shininess strength value > 1.0 you will see this (if lighting is enabled):
Shininess strength was 50.0 in the above. With it set to 0.5 you get this: Much better. Now you can verify it here along with Goblin Looking into the mesh bone binding problem now |
01-25-14, 02:18 PM | #2189 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
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. |
|
01-25-14, 02:32 PM | #2190 | |
Black Magic
|
Quote:
Code:
u=0.959849 v=-0.300698 u=0.976901 v=-0.300698 u=0.976901 v=-0.002600 u=0.959849 v=-0.002600 u=0.959849 v=-0.598797 u=0.976901 v=-0.598797 u=0.976901 v=-0.300698 u=0.959849 v=-0.300698 u=0.964299 v=-0.300698 u=0.967409 v=-0.300698 u=0.970569 v=-0.300698 u=0.973906 v=-0.300698 u=0.973906 v=-0.002600 u=0.970569 v=-0.002600 u=0.967409 v=-0.002600 u=0.964299 v=-0.002600 u=0.964299 v=-0.598797 u=0.967409 v=-0.598797 u=0.970569 v=-0.598797 u=0.973906 v=-0.598797 u=0.973906 v=-0.300698 u=0.970569 v=-0.300698 u=0.967409 v=-0.300698 u=0.964299 v=-0.300698 u=0.976302 v=-0.002600 u=0.975703 v=-0.002600 u=0.975104 v=-0.002600 u=0.974505 v=-0.002600 u=0.976302 v=-0.300698 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 |
|
|
|