Page 48 of 52

### Re: World of Warships

Posted: Sun Jan 10, 2016 4:58 pm
The think about the normals are the values I'm seeing.

Like 00 7f 7f hex

This is 00 127 127 in decimal.
80 hex is -128
FF hex is -1
negative numbers are 2's complement. (backwards)

Ok.. if you divide 127 by 127 you get 1.0.. so the common math is n/127 to convert it from 0 to 1.0.
BUT.. there are 2 values at 1.0... This is ALL wrong for normals. This would mean the the face is square to 2 faces!!!
It can't be!
I could try Xor'ing one of the values (flip all the bits) and see what happens.
Let me try that.

### Re: World of Warships

Posted: Sun Jan 10, 2016 5:02 pm
HOLY SHIT!!!!

By using this method, it works!!!!!

Code: Select all

``````    Private Function unpackNormal_8_8_8(ByVal packed As UInt32) As vect3

Dim pkz, pky, pkx As Int32
pkx = CLng(packed) And &HFF Xor 127
pky = CLng(packed >> 8) And &HFF Xor 127
pkz = CLng(packed >> 16) And &HFF Xor 127

Dim x As Single = (pkx)
Dim y As Single = (pky)
Dim z As Single = (pkz)

Dim p As New vect3
If x > 127 Then
x = -128 + (x - 128)
End If
If y > 127 Then
y = -128 + (y - 128)
End If
If z > 127 Then
z = -128 + (z - 128)
End If
p.x = CSng(x) / 127
p.y = CSng(y) / 127
p.z = CSng(z) / 127
Dim len As Single = Sqrt((p.x ^ 2) + (p.y ^ 2) + (p.z ^ 2))

'avoid division by 0
If len = 0.0F Then len = 1.0F
'len = 1.0
'reduce to unit size
p.x = -(p.x / len)
p.y = -(p.y / len)
p.z = -(p.z / len)
Return p
End Function``````
Xor'ing by 127 or 7F flips all the lower 7 bits but retains the sign bit.
WOOOHOOOOO!!!!

### Re: World of Warships

Posted: Sun Jan 10, 2016 5:08 pm
Great!

PS: Those track reminds me about unfigured out .track format for HD-versions... But you is leveled up from last try, maybe from 70 to 90 lvl

### Re: World of Warships

Posted: Sun Jan 10, 2016 5:22 pm
Andrakann wrote:Great!
Thanks!

I have been working on this for a freak'in week!

Now I will need to write code to convert from real normals to this 888 format.

Here is a pic of the new format with out the normals visible.

### Re: World of Warships

Posted: Sun Jan 10, 2016 5:28 pm
Well..
Now that I know how the transforms work for the ship children, I might be able to render using the track sections and not the chassis model. I'll need to look at.
First thing is to get this working and exporting. Than I need to be able to save them as primitives.
I also want to save the ship models as primitives as well.
Be cause each format has different sections.. I will need a lot of different functions to export in primitives format.
The chassis vertex format is different from the other tank models. Also some buildings also have a different vertex format.

### Re: World of Warships

Posted: Sun Jan 10, 2016 5:30 pm
Coffee wrote:Here is a pic of the new format with out the normals visible.
Beautiful rendering

But the gun looks misplaced a little?
Or not... didn't have this tank in game to check closer.

### Re: World of Warships

Posted: Sun Jan 10, 2016 5:46 pm
I think its transformed correctly?

Anyway.. Thanks..
This is the old editor from CURSE.
I am making changes to this one first to get it up and running for the public than I will move these changes to the new version. There is a lot that has to be changed because of the Treeview.
I changed the shader in this old version to use the MG maps the same way as the new version. That's why it looks a lot better.
I will be gone for the next couple of days. I'm going to Pittsburgh with Terri for a short biz trip she has to deal with.

### Re: World of Warships

Posted: Mon Jan 11, 2016 10:14 am
Help me pliiiiz

### Re: World of Warships

Posted: Mon Jan 11, 2016 9:43 pm
Exmach wrote:Help me pliiiiz
Сейчас нет необходимости создавать XML-ки этой утилитой, в комплекте с редактором идет архив с уже созданными, нужно только распаковать/обновить их командой меню File>Force MASTER XML update.
Coffee wrote:The Zip is created using the XML Creator but you don't need that tool.
The new zip is built in to the the latest release of the editor.
Lots of models is removed by devs, latest miss is Bismarck, would be good to have some abilities to convert them from backups.
Maybe you can make XML Creator with old/new data detection for creating master XMLs for earlier versions of game too?

### Re: World of Warships

Posted: Tue Jan 12, 2016 9:08 am
Тогда я непонимаю почему не открывается ничего, 1 раз открылась часть корабля причем черная а сейчас вообще ошибку выдавать начало

### Re: World of Warships

Posted: Tue Jan 12, 2016 1:41 pm
Uninstall the editor.
Update game to 0.5.2.0
Reinstall the editor.

Go to "File" --> "Force Master XML Update"

If this does not fix it, I'm not sure how to help. Maybe Andrakann can help more.. He's Speaks Russian.

### Re: World of Warships

Posted: Tue Jan 12, 2016 1:45 pm
Andrakann wrote: Maybe you can make XML Creator with old/new data detection for creating master XMLs for earlier versions of game too?
Maybe at some point.
I have to get Terra! fixed before I go any further with this.
http://worldoftanks.curseforge.com/wot- ... ages/main/
http://worldoftanks.curseforge.com/wot- ... ne/images/

I'm going to start a thread and post some info in it.

EDIT:
viewtopic.php?f=16&t=13802

### Re: World of Warships

Posted: Tue Jan 12, 2016 3:24 pm
Install editor, force update xmls, set path to C:\Games\World_of_Warships\res what i doing wrong?
because i have this error

### Re: World of Warships

Posted: Tue Jan 12, 2016 3:41 pm
I would guess it has something to do with your location.

The app in your local is expecting commas for the decimals.

100,100.00 <--- USA format
100.100,00 <-- Russian format.

change your computers location to USA.

try this link.. I dont know if it can be translated.
http://windows.microsoft.com/en-us/wind ... =windows-7

### Re: World of Warships

Posted: Tue Jan 12, 2016 5:20 pm
Thanks, all works now