XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sat Oct 20, 2018 4:28 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 768 posts ]  Go to page Previous  1 ... 45, 46, 47, 48, 49, 50, 51, 52  Next
Author Message
 Post subject: Re: World of Warships
PostPosted: Sun Jan 10, 2016 4:58 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Thu Aug 06, 2015 5:57 pm
Posts: 518
Has thanked: 74 times
Have thanks: 205 times
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.

_________________
I'd love to change the world but I can't get my hands on the code.


Last edited by Coffee on Sun Jan 10, 2016 5:58 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: World of Warships
PostPosted: Sun Jan 10, 2016 5:02 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Thu Aug 06, 2015 5:57 pm
Posts: 518
Has thanked: 74 times
Have thanks: 205 times
HOLY SHIT!!!!

By using this method, it works!!!!!
Code:
    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!!!!


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
I'd love to change the world but I can't get my hands on the code.


Last edited by Coffee on Sun Jan 10, 2016 5:11 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: World of Warships
PostPosted: Sun Jan 10, 2016 5:08 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Wed Jul 06, 2011 8:47 am
Posts: 385
Location: Russia
Has thanked: 662 times
Have thanks: 182 times
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 ;)


Last edited by Andrakann on Sun Jan 10, 2016 5:22 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: World of Warships
PostPosted: Sun Jan 10, 2016 5:22 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Thu Aug 06, 2015 5:57 pm
Posts: 518
Has thanked: 74 times
Have thanks: 205 times
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.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
I'd love to change the world but I can't get my hands on the code.


Top
 Profile  
 
 Post subject: Re: World of Warships
PostPosted: Sun Jan 10, 2016 5:28 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Thu Aug 06, 2015 5:57 pm
Posts: 518
Has thanked: 74 times
Have thanks: 205 times
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.

_________________
I'd love to change the world but I can't get my hands on the code.


Top
 Profile  
 
 Post subject: Re: World of Warships
PostPosted: Sun Jan 10, 2016 5:30 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Wed Jul 06, 2011 8:47 am
Posts: 385
Location: Russia
Has thanked: 662 times
Have thanks: 182 times
Coffee wrote:
Here is a pic of the new format with out the normals visible.

Beautiful rendering :keke:

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


Top
 Profile  
 
 Post subject: Re: World of Warships
PostPosted: Sun Jan 10, 2016 5:46 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Thu Aug 06, 2015 5:57 pm
Posts: 518
Has thanked: 74 times
Have thanks: 205 times
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.

_________________
I'd love to change the world but I can't get my hands on the code.


Top
 Profile  
 
 Post subject: Re: World of Warships
PostPosted: Mon Jan 11, 2016 10:14 am 
Offline
ultra-n00b

Joined: Mon Jan 11, 2016 10:08 am
Posts: 4
Has thanked: 0 time
Have thanks: 2 times
Help me pliiiiz :disturbed:


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: World of Warships
PostPosted: Mon Jan 11, 2016 9:43 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Wed Jul 06, 2011 8:47 am
Posts: 385
Location: Russia
Has thanked: 662 times
Have thanks: 182 times
Exmach wrote:
Help me pliiiiz :disturbed:

Сейчас нет необходимости создавать 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?


Top
 Profile  
 
 Post subject: Re: World of Warships
PostPosted: Tue Jan 12, 2016 9:08 am 
Offline
ultra-n00b

Joined: Mon Jan 11, 2016 10:08 am
Posts: 4
Has thanked: 0 time
Have thanks: 2 times
Тогда я непонимаю почему не открывается ничего, 1 раз открылась часть корабля причем черная а сейчас вообще ошибку выдавать начало


Top
 Profile  
 
 Post subject: Re: World of Warships
PostPosted: Tue Jan 12, 2016 1:41 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Thu Aug 06, 2015 5:57 pm
Posts: 518
Has thanked: 74 times
Have thanks: 205 times
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.

_________________
I'd love to change the world but I can't get my hands on the code.


Top
 Profile  
 
 Post subject: Re: World of Warships
PostPosted: Tue Jan 12, 2016 1:45 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Thu Aug 06, 2015 5:57 pm
Posts: 518
Has thanked: 74 times
Have thanks: 205 times
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-mods/terra-3d-tactical-battle-designe/pages/main/
http://worldoftanks.curseforge.com/wot-mods/terra-3d-tactical-battle-designe/images/

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

EDIT:
I started a thread to talk about the work on Terra!
http://forum.xentax.com/viewtopic.php?f=16&t=13802

_________________
I'd love to change the world but I can't get my hands on the code.


Top
 Profile  
 
 Post subject: Re: World of Warships
PostPosted: Tue Jan 12, 2016 3:24 pm 
Offline
ultra-n00b

Joined: Mon Jan 11, 2016 10:08 am
Posts: 4
Has thanked: 0 time
Have thanks: 2 times
Install editor, force update xmls, set path to C:\Games\World_of_Warships\res what i doing wrong?
because i have this error


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Last edited by Exmach on Tue Jan 12, 2016 5:09 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: World of Warships
PostPosted: Tue Jan 12, 2016 3:41 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Thu Aug 06, 2015 5:57 pm
Posts: 518
Has thanked: 74 times
Have thanks: 205 times
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/windows/change-country-region-setting#1TC=windows-7

_________________
I'd love to change the world but I can't get my hands on the code.


Top
 Profile  
 
 Post subject: Re: World of Warships
PostPosted: Tue Jan 12, 2016 5:20 pm 
Offline
ultra-n00b

Joined: Mon Jan 11, 2016 10:08 am
Posts: 4
Has thanked: 0 time
Have thanks: 2 times
Thanks, all works now :]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 768 posts ]  Go to page Previous  1 ... 45, 46, 47, 48, 49, 50, 51, 52  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: Bing [Bot], daemon1 and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group