Jump to content
Korean Random
SkepticalFox

Blender Tank Viewer

Recommended Posts

Ладно, придётся парсить и нормали в primitives.

Сделано!

гусли и ходовую тоже надо scale -1 сделать

Теперь это делается не с помощью размеров и поворотов, а на этапе парсинга.

Одним костылем меньше)

пока разберёшься и настроишь....

Нажми на лампу -> выбери другую лампу

post-16296-0-09184300-1448658682_thumb.png

Подумаю, в 3D конвертере алгоритм другой, всё же количество точно не сходится.

Я понял!

Вместе с картой текстур нужно сравнивать и нормали)

Edited by ShadowHunterRUS
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Поможешь с питоном?

Я что-то совсем не могу в списки(после C++).

Можно-ли оптимизировать данный код?

 

Не очень понятно что делает этот код, но мне кажется он должен быть таким:

from time import time
# X,Y,Z,U,V
l = [(1,2,3,4,5),(1,2,3,4,5),(3,3,3,6,8),(3,3,3,6,8),(3,3,3,6,8),(3,3,3,6,8),(4,4,3,9,0),(4,7,8,8,9),(7,6,6,9,6),(5,7,6,3,2),]*1000
old2new = {}

t=time()
old2new = list(set(l))
print(time()-t)
Edited by Degit22
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Может ты знаешь какой самый быстрый эквивалент in?

 

in и есть самый быстрый.

Share this post


Link to post

Short link
Share on other sites

Ладно, а как на счет модуля array? Стоит его использовать если у нас только float в массиве?

 

Стоит, они быстрее должны быть. По крайней мере так пишут.

Share this post


Link to post

Short link
Share on other sites

Посмоти v17

 

v17 - всё ок.

v19 - тоже всё ок.

Думаем по поводу оптимизации.

Ещё бы сглаживание нулевого полигона, поправить.

Edited by Degit22

Share this post


Link to post

Short link
Share on other sites

А я победил сглаживание первого полигона

-                bmesh.polygons.foreach_set( "use_smooth", range(0, nbr_faces*3, True) )
+                smooth_states = [True] * len(bmesh.polygons)
+                bmesh.polygons.foreach_set( "use_smooth", smooth_states )
 

Share this post


Link to post

Short link
Share on other sites

Ну как оно?

Хоть секунду оптимизировал?

весь затык в поиске индекса элемента, в большом списке.

for i in range(len(vert_list3)):
            old2new[i] = vert_list2.index(vert_list3[i])

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...