Page 41 of 52

Re: World of Warships

Posted: Sun Dec 20, 2015 2:45 pm
by Coffee
The compass is right...
Check it against the grid.. The colors line up with the heading.
The ships are drawn in the right direction in Z. You had me worried :P

After a update, I usually start the app, set the path and the mode, turn on load child models.
This has to be done before loading a ship.

I spent 2 hours looking at the plane transforms.
Their is definitely rotation for X and Y in the matrices. We don't and want to see roll (z) in the matrices.
What I can't explain is why the rotation in X is not being applied. EDIT... Because with its so minor.
I doubled checked that all the matrix data is being loaded and saved correctly and also that OpenGL is getting this data.
I'm at a loss so far.

I like that image compare site :)
Here is a plane transform from the Bogue_1942. This planes position (HP_Deck_12 midFront section)
is lined up with the deck in Z. (No rotation in Y)

Code: Select all

        <node>
           <name>HP_Deck_12</name>
           <model>usa\aircraft\dive\AAD007_Martin_BM2\AAD007_Martin_BM2.model</model>
           <row0>1.000000 0.000000 0.000000 0.000000</row0>
           <row1>0.000000 0.999986 -0.005236 0.000000</row1>
           <row2>0.000000 0.005236 0.999986 0.000000</row2>
           <row3>0.433041 0.939220 0.940420 1.000000</row3>
        </node>
This is an image of how the matrix values are used.
Image
Like I said.. the rotation for X is there..
But the angle of rotation in degrees is only .3... You cant even see it.
The inverse sine of .005236 = .300000

So.. my question is.. where are the REAL rotations for these planes??

I found this.. It shows what rotations effect what axis..
Image

Re: World of Warships

Posted: Sun Dec 20, 2015 5:30 pm
by Coffee
Something I just noticed.
I looks as if the specular is wrong on the planes.
Load a plane and look at it then load the Bogue_1942_MidFront and look at the planes.
It's very strange that the light is correct but the specular is wrong.

Re: World of Warships

Posted: Sun Dec 20, 2015 11:38 pm
by Andrakann
Coffee wrote:The compass is right...
Check it against the grid.. The colors line up with the heading.
The ships are drawn in the right direction in Z. You had me worried :P
So, it's have been wrong in old editor?
After a update, I usually start the app, set the path and the mode, turn on load child models.
This has to be done before loading a ship.
Can't be saved in wot_temp\config?
I also enable HD-textures load, toolbox (and change it's position), tune up BG, colors and light.
I spent 2 hours looking at the plane transforms.
Their is definitely rotation for X and Y in the matrices. We don't and want to see roll (z) in the matrices.
What I can't explain is why the rotation in X is not being applied. EDIT... Because with its so minor.
I doubled checked that all the matrix data is being loaded and saved correctly and also that OpenGL is getting this data.
I'm at a loss so far.
It's extremely strange, because you didn't have any problems with planes from start.
In my first screenshots they are posed correctly - sitting is sit, flying is horisontal:
Image

My only guess is devs changed something, you can compare old matrices with new, I attached old visuals for Bogue_1942 (from game version 0.4.0.106153).

Coffee wrote:Something I just noticed.
I looks as if the specular is wrong on the planes.
Load a plane and look at it then load the Bogue_1942_MidFront and look at the planes.
It's very strange that the light is correct but the specular is wrong.
You didn't add keys for toggle Specular and Gloss textures?
Also it's better to rename Diffuse 2 to Ambient Occlusion, because Diffuse 2 must contain camo or labels (IMHO).

Not sure I got problem with plane specular solo/on ship, but your light is adopted to selected child (uses as center for spin, radius, etc.), and for solo plane light looks like this:
Image
and for loaded with ship looks like this:
Image
Settings the same, but light goes down and wider.

Re: World of Warships

Posted: Mon Dec 21, 2015 12:26 am
by Coffee
The Light's radius is initially calculated from the scene's size.
This doesn't have to be done but keeps the light from going through objects.

I was looking at the normals on that plane and they are all over the place.
The wings have them pointing off the leading edge wrong. <--- WRONG. I was flipping normals and for got I did.

The normals on the bottom of the ship point UP.. This is wrong as well.
I think that's a lot of what I'm seeing.

For sure something has changed with the planes transforms.
It happened before I ever started the rewrite. All at once the planes didn't sit correctly on the decks.
If you look at the port and compound visuals you will see the HP_Deck_n transforms are the same.
I was thinking maybe it was a column verses row major matrix issue but I'm reading them in to a
array of 16 floats and this cancels any difference as far as OpenGL is concerned.
The thing is, even if the planes transformed wrong, at least you would see it.
The numbers are saying .30000 degrees.. That's nothing!

No.. I didn't add hot keys for the specular yet.

I'll fix the config loading.. I never changed any thing that has to do with loading the settings but it is't working now.

Re: World of Warships

Posted: Mon Dec 21, 2015 12:48 am
by Andrakann
Checking planes in game, and for BS catapults they looks ok, Montana have the same positions as in first post, and Iowa have same position as in editor.
But aircarriers have them sitted..

For Tirpiz plane position is also wrong:
Image Image

Maybe devs leave some of planes "as is" if them looks ok, but for others enable something like collision physics?..

Re: World of Warships

Posted: Mon Dec 21, 2015 5:58 pm
by Coffee
Andrakann wrote:Checking planes in game, and for BS catapults they looks ok, Montana have the same positions as in first post, and Iowa have same position as in editor.
But aircarriers have them sitted..

For Tirpiz plane position is also wrong:
Image Image

Maybe devs leave some of planes "as is" if them looks ok, but for others enable something like collision physics?..
Glad you spotted that :)
The German Catapults are using Matrix Translate_Z_BlendBone where all others use Rotate_Y_Blendbone.
I fixed it by checking for the name "Trans" and if matches, I uses that matrix.
I don't know where all the inconsistency of the data is coming from. Many People working on this is probably the reason.

I think this is as good as its going to get:
Image

Re: World of Warships

Posted: Mon Dec 21, 2015 11:35 pm
by Coffee
OK...

Update time...

Version 30.0.11 http://209.159.152.184:8080/WoW/

This fixes the plane translation on the Tripiz.

I added a slider for the specular reflection..

And most important...
I found a bug in the shader that I have been trying to fix for a long time.
Now all objects should light correctly regardless of where the center of the light is.

Re: World of Warships

Posted: Tue Dec 22, 2015 12:00 am
by TheSeeker
there are some buildings in the game that have guns and listings in the gameparams, they are in the \res\content\location\gameplay\building folder - here is an example of one of them from the .json: http://pastebin.com/Ah4jA0iU

can you configure the xml generator to generate xml files for them too?

Re: World of Warships

Posted: Tue Dec 22, 2015 2:00 am
by Coffee
TheSeeker wrote:there are some buildings in the game that have guns and listings in the gameparams, they are in the \res\content\location\gameplay\building folder - here is an example of one of them from the .json: http://pastebin.com/Ah4jA0iU

can you configure the xml generator to generate xml files for them too?
Yes.. and I need to find the Vessel ships as well...
The xml generator you are using is out of data.. but when you install a new version of the editor and than do a 'Force XML update", its all good.
You will need to restart the editor after.. I dont know why this is.. yet.

Re: World of Warships

Posted: Tue Dec 22, 2015 2:56 am
by Andrakann
Coffee wrote:This fixes the plane translation on the Tripiz.
This fix is not suitable for aircarriers?

Re: World of Warships

Posted: Tue Dec 22, 2015 3:29 am
by Coffee
Andrakann wrote:
Coffee wrote:This fixes the plane translation on the Tripiz.
This fix is not suitable for aircarriers?
I don't know how to fix them. All I have is whats in the port or compound for the transforms.
All I can do is get the transforms and apply them. I checked that they being multiplied in OpenGL by the correct values. (The ones in the port)
Even if the matrices where backwards, there should be X rotation even if its wrong...
but after calculating it to be only .30000 degrees, If it is rotating, it isn't enough to really see.

One good thing.. The light is 100% working now. The only time I see any thing wrong is when a model has goofy normals.

Try this...
Set the lights R to zero... adjust the Y so the light is some where close to the ship and drag the center around. (Shift _ left mouse button).
All the objects on the ships are lighting correctly and the specular is correct.
It takes some fiddling with Brightness and Contrast to see this at its best.

Re: World of Warships

Posted: Tue Dec 22, 2015 3:47 am
by Andrakann
Coffee wrote:I don't know how to fix them.
This solution won't work?
The German Catapults are using Matrix Translate_Z_BlendBone where all others use Rotate_Y_Blendbone.
Btw, Tirpiz Plane2 position looks not perfect, but I can't check it in game.

Lighting and speculars looks really good :)

Re: World of Warships

Posted: Tue Dec 22, 2015 3:51 am
by TheSeeker
Coffee wrote:
Andrakann wrote:
Coffee wrote:This fixes the plane translation on the Tripiz.
This fix is not suitable for aircarriers?
I don't know how to fix them. All I have is whats in the port or compound for the transforms.
All I can do is get the transforms and apply them. I checked that they being multiplied in OpenGL by the correct values. (The ones in the port)
Even if the matrices where backwards, there should be X rotation even if its wrong...
but after calculating it to be only .30000 degrees, If it is rotating, it isn't enough to really see.

One good thing.. The light is 100% working now. The only time I see any thing wrong is when a model has goofy normals.

Try this...
Set the lights R to zero... adjust the Y so the light is some where close to the ship and drag the center around. (Shift _ left mouse button).
All the objects on the ships are lighting correctly and the specular is correct.
It takes some fiddling with Brightness and Contrast to see this at its best.
Perhaps that 0.3 value is in radians, have you considered that? It would seem bizarre but 0.3 radians is about 17 degrees, which seems accurate.

Re: World of Warships

Posted: Tue Dec 22, 2015 4:30 am
by Coffee
TheSeeker wrote: Perhaps that 0.3 value is in radians, have you considered that? It would seem bizarre but 0.3 radians is about 17 degrees, which seems accurate.
Those are given as sine and cosine of the angles. sine(.005236) So it doesn't matter. It can be the sine in radian or degrees.
Nice thought tho.

Re: World of Warships

Posted: Tue Dec 22, 2015 4:34 am
by Coffee
Andrakann wrote:
Coffee wrote:I don't know how to fix them.
This solution won't work?
The German Catapults are using Matrix Translate_Z_BlendBone where all others use Rotate_Y_Blendbone.
Btw, Tirpiz Plane2 position looks not perfect, but I can't check it in game.

Lighting and speculars looks really good :)
Thanks... I think the lighting is finally fixed.

In the ports all there is, is the matrices defined as the HP_Deck_n locations.
They do work for rotation in Y but not X.
I'll look at it again tomorrow and see what I can find.