Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

贴图命名 #7

Open
Qfather opened this issue May 4, 2021 · 31 comments
Open

贴图命名 #7

Qfather opened this issue May 4, 2021 · 31 comments

Comments

@Qfather
Copy link

Qfather commented May 4, 2021

作者大佬好,
之前用过别的下载工具,下载下来材质会有命名的,不过是EXE格式的,看不到代码是什么,不知道您这边能把贴图代码加上去吗?
Snipaste_2021-05-04_17-00-57

@MiniKimmy
Copy link
Owner

MiniKimmy commented May 4, 2021

可以的,之前发现下载的图片格式不是png/jpeg,有的是dds格式,我按回文件原本是什么格式就下载什么格式好了。

这个是exe,看不到源码很正常,不过只能win系统用它,不够友好。

MiniKimmy added a commit that referenced this issue May 5, 2021
@MiniKimmy
Copy link
Owner

可以啦。image

@IWILLTAKEIT0
Copy link

大佬,脚本挂了 求更新呜呜呜~
https://sketchfab.com/3d-models/point-cloud-demo-natural-history-museum-london-05940cf8ceaa44b4852bb6f04537cb97
step 1 ============ download model ============
Pending...

Traceback (most recent call last):
File "D:\ku\sketchfab_download-master\bin\py\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen
self._prepare_proxy(conn)
File "D:\ku\sketchfab_download-master\bin\py\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy
conn.connect()
File "D:\ku\sketchfab_download-master\bin\py\lib\site-packages\urllib3\connection.py", line 359, in connect
conn = self._connect_tls_proxy(hostname, conn)
File "D:\ku\sketchfab_download-master\bin\py\lib\site-packages\urllib3\connection.py", line 502, in connect_tls_proxy
ssl_context=ssl_context,
File "D:\ku\sketchfab_download-master\bin\py\lib\site-packages\urllib3\util\ssl
.py", line 432, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls)
File "D:\ku\sketchfab_download-master\bin\py\lib\site-packages\urllib3\util\ssl
.py", line 474, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock)
File "D:\ku\sketchfab_download-master\bin\py\lib\ssl.py", line 423, in wrap_socket
session=session
File "D:\ku\sketchfab_download-master\bin\py\lib\ssl.py", line 870, in _create
self.do_handshake()
File "D:\ku\sketchfab_download-master\bin\py\lib\ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\ku\sketchfab_download-master\bin\py\lib\site-packages\requests\adapters.py", line 449, in send
timeout=timeout
File "D:\ku\sketchfab_download-master\bin\py\lib\site-packages\urllib3\connectionpool.py", line 756, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "D:\ku\sketchfab_download-master\bin\py\lib\site-packages\urllib3\util\retry.py", line 573, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='sketchfab.com', port=443): Max retries exceeded with url: /3d-models/point-cloud-demo-natural-history-museum-london-05940cf8ceaa44b4852bb6f04537cb97/embed (Caused by ProxyError('Cannot connect to proxy.', OSError(0, 'Error')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\ku\sketchfab_download-master\code\sketchfab_download.py", line 116, in
main(args)
File "D:\ku\sketchfab_download-master\code\sketchfab_download.py", line 103, in main
parse(args.url, args.output)
File "D:\ku\sketchfab_download-master\code\sketchfab_download.py", line 52, in parse
page = requests.get(url, headers=HEADERS, timeout=30).content
File "D:\ku\sketchfab_download-master\bin\py\lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "D:\ku\sketchfab_download-master\bin\py\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "D:\ku\sketchfab_download-master\bin\py\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "D:\ku\sketchfab_download-master\bin\py\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "D:\ku\sketchfab_download-master\bin\py\lib\site-packages\requests\adapters.py", line 510, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='sketchfab.com', port=443): Max retries exceeded with url: /3d-models/point-cloud-demo-natural-history-museum-london-05940cf8ceaa44b4852bb6f04537cb97/embed (Caused by ProxyError('Cannot connect to proxy.', OSError(0, 'Error')))
err returnCode: 1
Press any key to continue . . .

@MiniKimmy
Copy link
Owner

Cannot connect to proxy.

要开梯子,或者网络不行,或者是你的梯子不行,或者是你的梯子配了自动代理(最好不要动态改变系统代理)

@IWILLTAKEIT0
Copy link

大佬,我试了一下,多数模型可以正常下载,少数模型不成功
例如https://sketchfab.com/3d-models/annotation-shortcuts-demo-earthquakes-2ffe7b8e3e4341bf8048ef8dc0f55fd1
https://sketchfab.com/3d-models/point-cloud-demo-natural-history-museum-london-05940cf8ceaa44b4852bb6f04537cb97
https://sketchfab.com/3d-models/real-time-light-demo-rotate-lighting-alt-drag-21f97d94b9a242369ad31d6985652c67

大佬那边可以正常使用吗

Active code page: 65001
请输入网址:
https://sketchfab.com/3d-models/real-time-light-demo-rotate-lighting-alt-drag-21f97d94b9a242369ad31d6985652c67
step 1 ============ download model ============
Pending...

开始下载缩略图...
开始下载模型数据...
开始下载模型...
开始下载贴图... (0/15)
开始下载贴图... (1/15)
开始下载贴图... (2/15)
开始下载贴图... (3/15)
开始下载贴图... (4/15)
开始下载贴图... (5/15)
开始下载贴图... (6/15)
开始下载贴图... (7/15)
开始下载贴图... (8/15)
开始下载贴图... (9/15)
开始下载贴图... (10/15)
开始下载贴图... (11/15)
开始下载贴图... (12/15)
开始下载贴图... (13/15)
开始下载贴图... (14/15)
Traceback (most recent call last):
File "D:\ku\sketchfab_download-master\bin\py\lib\shutil.py", line 566, in move
os.rename(src, real_dst)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。: 'D:\ku\sketchfab_download-master\code\real-timelightdemo:rotatelighting(alt-drag)_temp' -> 'D:\ku\sketchfab_download-master\code\real-timelightdemo:rotatelighting(alt-drag)'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\ku\sketchfab_download-master\code\sketchfab_download.py", line 116, in
main(args)
File "D:\ku\sketchfab_download-master\code\sketchfab_download.py", line 103, in main
parse(args.url, args.output)
File "D:\ku\sketchfab_download-master\code\sketchfab_download.py", line 91, in parse
shutil.move(download_dir_path, save_dir_path)
File "D:\ku\sketchfab_download-master\bin\py\lib\shutil.py", line 580, in move
copy_function(src, real_dst)
File "D:\ku\sketchfab_download-master\bin\py\lib\shutil.py", line 266, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "D:\ku\sketchfab_download-master\bin\py\lib\shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'D:\ku\sketchfab_download-master\code\real-timelightdemo:rotatelighting(alt-drag)_temp'
err returnCode: 1
Press any key to continue . . .

@MiniKimmy
Copy link
Owner

MiniKimmy commented May 6, 2021

确实,网页上的名字带了一些符号(比如冒号:)创建不了文件夹。

代码已更新。然后用了你贴的链接ok了.
image
其余两个链接我另外试了也可以的。

MiniKimmy added a commit that referenced this issue May 6, 2021
@IWILLTAKEIT0
Copy link

感谢大佬测试!{膜拜.jpg}

@Qfather
Copy link
Author

Qfather commented May 9, 2021

BL导出的时候能不能默认选择场景对象,而不是默认选择对象
Snipaste_2021-05-09_10-33-48

@MiniKimmy
Copy link
Owner

MiniKimmy commented May 9, 2021

BL导出的时候能不能默认选择场景对象,而不是默认选择对象

Snipaste_2021-05-09_10-33-48

收到,可以的。
代码已提交#8

@MiniKimmy
Copy link
Owner

MiniKimmy commented May 10, 2021

大佬的工具运行的十分完美,但在下载学习的过程中出现了一些小瑕疵,可以帮忙解决下吗嘤嘤嘤~

https://sketchfab.com/3d-models/rem2-85426e99b93e45edb0bdb44dcd6ef3ad //没有贴图

https://sketchfab.com/3d-models/ar-tonelico-e6ebe6a6c57f441187bcca8e9e14b011 //UV缺失

https://sketchfab.com/3d-models/thiria-2d6117089e4443d7b5ca61aa61b41d2d //没有贴图

https://sketchfab.com/3d-models/--1e9cb6b98a5b4bc39f0e48ec0261000d //眼睛等UV缺失

https://sketchfab.com/3d-models/3d-fanart-jun-from-tenshi-no-3p-e263629d3a824aa18f49c28ddf2b2f14 //额头前的头发的贴图缺失

https://sketchfab.com/3d-models/mq-90-unit-04-61ac6f04827d4466bcc26a8b6184a837 //下载失败

https://sketchfab.com/3d-models/tokino-soraholo-live-summer-ver-175f1fb8810e4eb389dd17b7b1e0f58c //贴图缺失

https://sketchfab.com/3d-models/ludovica-from-tiger-tiger-drawn-in-oculus-quill-18bc726d276b448aa9520391fd1d441a //贴图缺失

感谢!

Reply:
1.贴图缺失问题,是由于网站的作者他也没有上传贴图,你可以点击"More model Infomation" 看到它的贴图数量,如果贴图不够就是作者没上传完整,因为上面显示有多少张就会下载多少张。

这是你给的其中一个例子

image


2.下载失败问题,这个我看看。

3.UV缺失是指什么,我没太懂这个意思,你可以截图具体描述一下。
眼睛UV 这个模型将3个眼睛放在同一个贴图里,可能3ds software不是都能绑上,它的source是blend,我用3dmax和maya都对不上。或者作者放的贴图有问题,你可以将3个眼睛隔离然后单独上材质。

@DOODKAHEIMU
Copy link

感谢大佬百忙之中回答我的问题

UV" 这里是指u,v纹理贴图坐标的简称(它和空间模型的X, Y, Z轴是类似的)。它定义了图片上每个点的位置的信息。

UV就是将图像上每一个点精确对应到模型物体的表面。在点与点之间的间隙位置由软件进行图像光滑插值处理。这就是所谓的UV贴图。

F9GYA)@N`3SL5PK47AV$A6
2RGQLZU8U5P{SOGB HX4QGN
比如这张图片里的头发UV是正常的 贴图在上面非常完美

}}NU6OC}DA25GKPQIL TX8R
X6IANVPHX ~J1K)LQXR@N{Y
这是缺失UV信息时UV编辑器里的情况

A${8~{~)VBVJBVY43W X1M2
这是当贴图贴在缺失UV信息的模型上的情况

模型地址 https://sketchfab.com/3d-models/--1e9cb6b98a5b4bc39f0e48ec0261000d

希望大佬有时间研究一下,感激不尽

@Qfather
Copy link
Author

Qfather commented May 11, 2021

Snipaste_2021-05-11_12-55-33
新版这个问题是什么情况呀

@Qfather
Copy link
Author

Qfather commented May 11, 2021

原来因为()的原因

@MiniKimmy
Copy link
Owner

MiniKimmy commented May 11, 2021

原来因为()的原因

你好,介意说一下 具体是什么原因和怎么解决了吗?

@DOODKAHEIMU
Copy link

大佬python和C那么厉害,java怎么样

@MiniKimmy
Copy link
Owner

大佬python和C那么厉害,java怎么样

我也不是很厉害,这个是我的hobby project,写其他语言也可以,java,c++,c#,go,lua,不过我都是初学者水平。

@Qfather
Copy link
Author

Qfather commented May 12, 2021

把()去掉就行了。笨办法

@Qfather
Copy link
Author

Qfather commented May 12, 2021

Snipaste_2021-05-12_18-43-24
好多的法线贴图都下载错误

@MiniKimmy
Copy link
Owner

Snipaste_2021-05-12_18-43-24

好多的法线贴图都下载错误

压缩包解压之后有资源吗,或者贴一下下载的网页地址?

@Qfather
Copy link
Author

Qfather commented May 13, 2021

@MiniKimmy
Copy link
Owner

https://sketchfab.com/3d-models/traveler-23c6cec9e7bb42298c7cfa9d7fa8c9be

贴图下载问题issue #9已修复。
另外,贴图下载失败可能网络不稳定,里面有列出所有的下载链接,同时也有记录失败的文件,所以如果有些图片的大小发现是0kb的,可以手动输入cmd里的打印的url到浏览器,然后在浏览器里直接下载就好了。
如果有特别多文件都下载失败,可以尝试换个网络重试。

@Qfather
Copy link
Author

Qfather commented May 15, 2021

谢谢大佬,三角面有方法转成四边面吗

@DOODKAHEIMU
Copy link

blender是我目前用过拓补四边面UV不乱的少数软件之一,Quad Remesher用过一段时间,尽管如此,拓补四边面的效果依旧十分不理想,看布线和编辑模型十分痛苦,期待大佬技术力改变世界

@vincendhy
Copy link

大佬 我下载的模型 每个都是没有贴图显示的
81PD({0P KNMNV K2DJ$_I0

@MiniKimmy
Copy link
Owner

大佬 我下载的模型 每个都是没有贴图显示的

81PD({0P KNMNV K2DJ$_I0

是没有,贴图没有绑到模型上,只是下载了贴图和模型。

@vincendhy
Copy link

大佬我下载的模型每个都是没有贴图显示的
81PD({0P KNMNV K2DJ $ _I0

是没有,贴图没有绑到模型上,只是下载了贴图和模型。

大佬怎么绑定到模型上啊

@MiniKimmy
Copy link
Owner

大佬我下载的模型每个都是没有贴图显示的

81PD({0P KNMNV K2DJ $ _I0

是没有,贴图没有绑到模型上,只是下载了贴图和模型。

大佬怎么绑定到模型上啊

这个你自己上网查一下就好了,很简单的

@Qfather
Copy link
Author

Qfather commented Jun 13, 2021

Snipaste_2021-06-13_15-15-59
现在模型好像又改了

@MiniKimmy
Copy link
Owner

Snipaste_2021-06-13_15-15-59

现在模型好像又改了

是的,不过将名字改了也还是不行。

  1. file.osgjs.gz -> file.binz
  2. model_file.bin.gz -> model_file.binz
    下载的osgjs文件还被sketchfab加密过了,所以之后这个工具也用不了QwQ

@Qfather
Copy link
Author

Qfather commented Jun 14, 2021

辛苦辛苦,谢谢大佬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants