Jump to content
Korean Random
SkepticalFox

Blender Tank Viewer

Recommended Posts

Проблема так и не решена...

http://www.koreanrandom.com/forum/topic/28240-/?p=306315

def unpackNormal_tag3(packed):
    pkz = ( ( packed >> 16 ) & 0b11111111 ) ^ 0b11111111
    pky = ( ( packed >> 8  ) & 0b11111111 ) ^ 0b11111111
    pkx = ( ( packed       ) & 0b11111111 ) ^ 0b11111111

    if (pkx >> 7) == 1:
        x = -float( pkx & 0b01111111 ) / 127.0
    else:
        x = +float( pkx ^ 0b01111111 ) / 127.0

    if (pky >> 7) == 1:
        y = -float( pky & 0b01111111 ) / 127.0
    else:
        y = +float( pky ^ 0b01111111 ) / 127.0

    if (pkz >> 7) == 1:
        z = -float( pkz & 0b01111111 ) / 127.0
    else:
        z = +float( pkz ^ 0b01111111 ) / 127.0

    return (x, y, z)
Мы остановились на этом коде:

def normalize(vec3):
    x, y, z = vec3[:]
    _len = ( x**2 + y**2 + z**2 )**( 0.5 )
    return (x/_len, y/_len, z/_len)

def packNormal_tag3(vec3):
    x, y, z = normalize(vec3)

    if x > 0.0:
        pkx = int( round( x * +127 ) ) ^ 0b01111111
    else:
        pkx = ( 1 << 7 ) ^ int( round( x * -127 ) )

    if y > 0.0:
        pky = int( round( y * +127 ) ) ^ 0b01111111
    else:
        pky = ( 1 << 7 ) ^ int( round( y * -127 ) )

    if z > 0.0:
        pkz = int( round( z * +127 ) ) ^ 0b01111111
    else:
        pkz = ( 1 << 7 ) ^ int( round( z * -127 ) )

    return ( pkx ^ 0b11111111 ) ^ ( ( pky ^ 0b11111111 ) << 8 ) ^ ( ( pkz ^ 0b11111111 ) << 16 )
Он правильный и вроде работает) Edited by ShadowHunterRUS
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

А как включить отображение текстур? У меня и танки и ангар серые...

Share this post


Link to post

Short link
Share on other sites

Он неправильный. Нужно его доработать...

Во, а я как раз зашёл пожаловаться на нормали. Я правильно понимаю, что unpackNormal_tag3 это исходная функция, а надо сделать packNormal_tag3? Поковыряю. Я почему-то был уверен что ^ это OR, а не XOR.

Share this post


Link to post

Short link
Share on other sites

Я правильно понимаю, что unpackNormal_tag3 это исходная функция, а надо сделать packNormal_tag3? Поковыряю. Я почему-то был уверен что ^ это OR, а не XOR.

Все верно.

Во, а я как раз зашёл пожаловаться на нормали.

Blender их сам генерирует.

Share this post


Link to post

Short link
Share on other sites

Blender 2.77 зарелизили!

Уже Blender 2.77a вышел.

Ничего нового. Только исправление ошибок.

 

P.S. попробую доработать экспортер...

Edited by ShadowHunterRUS

Share this post


Link to post

Short link
Share on other sites

 

 

попробую доработать экспортер...

 

Ждём

Share this post


Link to post

Short link
Share on other sites

Ждём

Я смог в bound_box Blender'а)

Короче вот: https://bitbucket.org/ShadowHunterRUS/bigworld-blender-tools-wot-wowp-wows/commits/

Нужно проверить, что я ничего не сломал.

 

Поковыряю

Я его доковырял)

Теперь в экспортер можно добавлять новый формат(_processed).

post-16296-0-97644900-1460054537_thumb.png

Edited by ShadowHunterRUS
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Друзья, подскажите, я могу смотреть только танки? Я, к примеру, хотел подкрасить ж/д вагоны или локомотив. Я могу это вывести на просмотр?

Share this post


Link to post

Short link
Share on other sites

Помогите разобраться с рендером cycles на некоторых танках вот такая ерунда не грузит текстуры. В чём может быть проблема.

4a2f546d6818.png

Share this post


Link to post

Short link
Share on other sites

Помогите разобраться с рендером cycles на некоторых танках вот такая ерунда не грузит текстуры. В чём может быть проблема.

4a2f546d6818.png

В том, что протестировать все танки на отображение текстур невозможно.

Скорее всего alpha-clip(Нода less than) виноват...

Edited by ShadowHunterRUS

Share this post


Link to post

Short link
Share on other sites

 

 

Скорее всего alpha-clip(Нода less than) виноват.
он самый его на 0 надо выставить спасибо.

Share this post


Link to post

Short link
Share on other sites

Hello RUS their was alot of changes to WoWS so now the Coffee's Model viewer no longer works and no way of knowing if he will come back.

 

I am wondering are you still gonna add the WoWS portion of the importer for Blender?

 

Been trynig to import the ships to blender and it wasn't working mostly when I imported the primitives file it did nothing and no model showing up when I used the import-export Bigworld Model plugin.

 

Hope ya can help me out.

Share this post


Link to post

Short link
Share on other sites

I am wondering are you still gonna add the WoWS portion of the importer for Blender?

У меня нет клиента WoWS(

Share this post


Link to post

Short link
Share on other sites

Oh that sucks :S \

Been having trouble with the Modeler saying that it can't find the visual files that's odd since the visual file is in with the primitive file? If ya wondering yea the latest patch is 0.5.5 so yea 2 or 3 patches since coffee updated his Model Viewer.

Share this post


Link to post

Short link
Share on other sites

Does your tank viewer/or blender itself have any functionality to measure angles? 

Something like:

332rpfl.jpg

I remade the old meltymath effective armor calculator and plan on releasing it have the 9.15 patch. However I would really like to get all of the arc values in the XML updated. I have tried to find out if I could do measure angles in blender but frankly, I don't know blender at all. 

 

is there any way to do something like this with blender and your plugin?

Share this post


Link to post

Short link
Share on other sites

Только недавно создали ветку Blender 2.8 в которой пока ничего еще не сделали. (https://developer.blender.org/diffusion/B/browse/blender2.8/)

Трогать до окончательного релиза Blender 2.8 плагин я точно не буду.

Edited by ShadowHunterRUS

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...