PyVista:一种用于Python的三维数据可视化工具
技术背景
三维可视化是一项在工业领域中非常重要的技术,而Python中最热门的可视化工具matplotlib和plotly,更加倾向于在数据领域的可视化,用于展现数据的结果。类似的还有百度的pyechart也相对美观,但是这些毕竟都是在数据层面的可视化,对于工业领域,比如一个地形,一个三维的期间等等,用这些工具来做可视化效果非常的不佳,因此我找到了pyvista这个工具,简单摸索了一下给大家做个引荐。
安装pyvista
因为pyvista及其依赖都是一些python库,这就使得我们可以用pip直接简单的安装,这里放几个可能用到的依赖的安装流程:
(base) dechin@ubuntu2004:~/projects$ python3 -m pip install vtk==9.0.20210612.dev0
Collecting vtk==9.0.20210612.dev0
Downloading vtk-9.0.20210612.dev0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (80.9 MB)
|████████████████████████████████| 80.9 MB 3.7 MB/s
Requirement already satisfied: wslink>=0.1.3 in /home/dechin/anaconda3/lib/python3.8/site-packages (from vtk==9.0.20210612.dev0) (0.2.0)
Requirement already satisfied: Twisted>=17.5.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from vtk==9.0.20210612.dev0) (21.2.0)
Requirement already satisfied: matplotlib>=2.0.0 in /home/dechin/.local/lib/python3.8/site-packages (from vtk==9.0.20210612.dev0) (3.3.4)
Requirement already satisfied: autobahn>=17.7.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from vtk==9.0.20210612.dev0) (21.3.1)
Requirement already satisfied: cryptography>=3.4.6 in /home/dechin/anaconda3/lib/python3.8/site-packages (from autobahn>=17.7.1->vtk==9.0.20210612.dev0) (3.4.7)
Requirement already satisfied: txaio>=21.2.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from autobahn>=17.7.1->vtk==9.0.20210612.dev0) (21.2.1)
Requirement already satisfied: hyperlink>=21.0.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from autobahn>=17.7.1->vtk==9.0.20210612.dev0) (21.0.0)
Requirement already satisfied: cffi>=1.12 in /home/dechin/anaconda3/lib/python3.8/site-packages (from cryptography>=3.4.6->autobahn>=17.7.1->vtk==9.0.20210612.dev0) (1.14.5)
Requirement already satisfied: pycparser in /home/dechin/anaconda3/lib/python3.8/site-packages (from cffi>=1.12->cryptography>=3.4.6->autobahn>=17.7.1->vtk==9.0.20210612.dev0) (2.20)
Requirement already satisfied: idna>=2.5 in /home/dechin/.local/lib/python3.8/site-packages (from hyperlink>=21.0.0->autobahn>=17.7.1->vtk==9.0.20210612.dev0) (2.10)
Requirement already satisfied: python-dateutil>=2.1 in /home/dechin/.local/lib/python3.8/site-packages (from matplotlib>=2.0.0->vtk==9.0.20210612.dev0) (2.8.1)
Requirement already satisfied: pillow>=6.2.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from matplotlib>=2.0.0->vtk==9.0.20210612.dev0) (8.2.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/dechin/.local/lib/python3.8/site-packages (from matplotlib>=2.0.0->vtk==9.0.20210612.dev0) (1.3.1)
Requirement already satisfied: numpy>=1.15 in /home/dechin/anaconda3/lib/python3.8/site-packages (from matplotlib>=2.0.0->vtk==9.0.20210612.dev0) (1.20.2)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /home/dechin/.local/lib/python3.8/site-packages (from matplotlib>=2.0.0->vtk==9.0.20210612.dev0) (2.4.7)
Requirement already satisfied: cycler>=0.10 in /home/dechin/.local/lib/python3.8/site-packages (from matplotlib>=2.0.0->vtk==9.0.20210612.dev0) (0.10.0)
Requirement already satisfied: six in /home/dechin/.local/lib/python3.8/site-packages (from cycler>=0.10->matplotlib>=2.0.0->vtk==9.0.20210612.dev0) (1.16.0)
Requirement already satisfied: zope.interface>=4.4.2 in /home/dechin/anaconda3/lib/python3.8/site-packages (from Twisted>=17.5.0->vtk==9.0.20210612.dev0) (5.4.0)
Requirement already satisfied: attrs>=19.2.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from Twisted>=17.5.0->vtk==9.0.20210612.dev0) (21.2.0)
Requirement already satisfied: constantly>=15.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from Twisted>=17.5.0->vtk==9.0.20210612.dev0) (15.1.0)
Requirement already satisfied: Automat>=0.8.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from Twisted>=17.5.0->vtk==9.0.20210612.dev0) (20.2.0)
Requirement already satisfied: incremental>=16.10.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from Twisted>=17.5.0->vtk==9.0.20210612.dev0) (21.3.0)
Requirement already satisfied: setuptools in /home/dechin/anaconda3/lib/python3.8/site-packages (from zope.interface>=4.4.2->Twisted>=17.5.0->vtk==9.0.20210612.dev0) (52.0.0.post20210125)
Installing collected packages: vtk
Attempting uninstall: vtk
Found existing installation: vtk 9.0.2
Uninstalling vtk-9.0.2:
Successfully uninstalled vtk-9.0.2
Successfully installed vtk-9.0.20210612.dev0
安装pyvista的时候最好加上一个国内的镜像源,否则有可能出现网络问题,其他的包不需要加镜像源:
(base) dechin@ubuntu2004:~/projects$ python3 -m pip install pyvista --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple
Looking in indexes: https://repo.huaweicloud.com/repository/pypi/simple
Collecting pyvista
Downloading https://repo.huaweicloud.com/repository/pypi/packages/ec/00/292dc2f14247d74098806dcb9e1bb0c416b936c145ca9ab4e940b6f90d4f/pyvista-0.31.3-py3-none-any.whl (1.3 MB)
|████████████████████████████████| 1.3 MB 2.7 MB/s
Requirement already satisfied: imageio in /home/dechin/anaconda3/lib/python3.8/site-packages (from pyvista) (2.9.0)
Requirement already satisfied: numpy in /home/dechin/anaconda3/lib/python3.8/site-packages (from pyvista) (1.20.2)
Requirement already satisfied: pillow in /home/dechin/anaconda3/lib/python3.8/site-packages (from pyvista) (8.2.0)
Collecting scooby>=0.5.1
Downloading https://repo.huaweicloud.com/repository/pypi/packages/1b/99/db6d34bdc3f060d631f524c2f0fc4b1919cd3bf734c905fc1b25eb847ac2/scooby-0.5.7-py3-none-any.whl (13 kB)
Collecting transforms3d==0.3.1
Downloading https://repo.huaweicloud.com/repository/pypi/packages/b5/f7/e85809168a548a854d7c1331560c27b4f5381698d29c12e57759192b2bc1/transforms3d-0.3.1.tar.gz (62 kB)
|████████████████████████████████| 62 kB 2.2 MB/s
Requirement already satisfied: vtk in /home/dechin/anaconda3/lib/python3.8/site-packages (from pyvista) (9.0.20210612.dev0)
Requirement already satisfied: appdirs in /home/dechin/anaconda3/lib/python3.8/site-packages (from pyvista) (1.4.4)
Collecting meshio<5.0,>=4.0.3
Downloading https://repo.huaweicloud.com/repository/pypi/packages/bb/36/02702cfc5fdf19e6477ea2a78cac4a774a8da4c2cf9557f3ddfb33c74192/meshio-4.4.6-py3-none-any.whl (158 kB)
|████████████████████████████████| 158 kB 2.7 MB/s
Requirement already satisfied: autobahn>=17.7.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from vtk->pyvista) (21.3.1)
Requirement already satisfied: wslink>=0.1.3 in /home/dechin/anaconda3/lib/python3.8/site-packages (from vtk->pyvista) (0.2.0)
Requirement already satisfied: matplotlib>=2.0.0 in /home/dechin/.local/lib/python3.8/site-packages (from vtk->pyvista) (3.3.4)
Requirement already satisfied: Twisted>=17.5.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from vtk->pyvista) (21.2.0)
Requirement already satisfied: txaio>=21.2.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from autobahn>=17.7.1->vtk->pyvista) (21.2.1)
Requirement already satisfied: cryptography>=3.4.6 in /home/dechin/anaconda3/lib/python3.8/site-packages (from autobahn>=17.7.1->vtk->pyvista) (3.4.7)
Requirement already satisfied: hyperlink>=21.0.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from autobahn>=17.7.1->vtk->pyvista) (21.0.0)
Requirement already satisfied: cffi>=1.12 in /home/dechin/anaconda3/lib/python3.8/site-packages (from cryptography>=3.4.6->autobahn>=17.7.1->vtk->pyvista) (1.14.5)
Requirement already satisfied: pycparser in /home/dechin/anaconda3/lib/python3.8/site-packages (from cffi>=1.12->cryptography>=3.4.6->autobahn>=17.7.1->vtk->pyvista) (2.20)
Requirement already satisfied: idna>=2.5 in /home/dechin/.local/lib/python3.8/site-packages (from hyperlink>=21.0.0->autobahn>=17.7.1->vtk->pyvista) (2.10)
Requirement already satisfied: python-dateutil>=2.1 in /home/dechin/.local/lib/python3.8/site-packages (from matplotlib>=2.0.0->vtk->pyvista) (2.8.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /home/dechin/.local/lib/python3.8/site-packages (from matplotlib>=2.0.0->vtk->pyvista) (2.4.7)
Requirement already satisfied: cycler>=0.10 in /home/dechin/.local/lib/python3.8/site-packages (from matplotlib>=2.0.0->vtk->pyvista) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/dechin/.local/lib/python3.8/site-packages (from matplotlib>=2.0.0->vtk->pyvista) (1.3.1)
Requirement already satisfied: six in /home/dechin/.local/lib/python3.8/site-packages (from cycler>=0.10->matplotlib>=2.0.0->vtk->pyvista) (1.16.0)
Requirement already satisfied: zope.interface>=4.4.2 in /home/dechin/anaconda3/lib/python3.8/site-packages (from Twisted>=17.5.0->vtk->pyvista) (5.4.0)
Requirement already satisfied: attrs>=19.2.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from Twisted>=17.5.0->vtk->pyvista) (21.2.0)
Requirement already satisfied: constantly>=15.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from Twisted>=17.5.0->vtk->pyvista) (15.1.0)
Requirement already satisfied: Automat>=0.8.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from Twisted>=17.5.0->vtk->pyvista) (20.2.0)
Requirement already satisfied: incremental>=16.10.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from Twisted>=17.5.0->vtk->pyvista) (21.3.0)
Requirement already satisfied: setuptools in /home/dechin/anaconda3/lib/python3.8/site-packages (from zope.interface>=4.4.2->Twisted>=17.5.0->vtk->pyvista) (52.0.0.post20210125)
Building wheels for collected packages: transforms3d
Building wheel for transforms3d (setup.py) ... done
Created wheel for transforms3d: filename=transforms3d-0.3.1-py3-none-any.whl size=59373 sha256=56293f06c7932f3c12d57476773220d4219d8a978257f84bf56f4a8be8cccb2b
Stored in directory: /home/dechin/.cache/pip/wheels/45/80/2d/22eb03277c315a020a6fdb617cc1232ef4ddc04dc2f00b8a22
Successfully built transforms3d
Installing collected packages: transforms3d, scooby, meshio, pyvista
Successfully installed meshio-4.4.6 pyvista-0.31.3 scooby-0.5.7 transforms3d-0.3.1
另外还有这个三维可交互面板绘制的插件:
(base) dechin@ubuntu2004:~/projects$ python3 -m pip install ipygany
Collecting ipygany
Using cached ipygany-0.5.0-py2.py3-none-any.whl (2.9 MB)
Requirement already satisfied: numpy in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipygany) (1.20.2)
Requirement already satisfied: traittypes in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipygany) (0.2.1)
Requirement already satisfied: ipywidgets>=7.6.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipygany) (7.6.3)
Requirement already satisfied: ipython>=4.0.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipywidgets>=7.6.0->ipygany) (7.22.0)
Requirement already satisfied: ipykernel>=4.5.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipywidgets>=7.6.0->ipygany) (5.3.4)
Requirement already satisfied: widgetsnbextension~=3.5.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipywidgets>=7.6.0->ipygany) (3.5.1)
Requirement already satisfied: jupyterlab-widgets>=1.0.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipywidgets>=7.6.0->ipygany) (1.0.0)
Requirement already satisfied: traitlets>=4.3.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipywidgets>=7.6.0->ipygany) (5.0.5)
Requirement already satisfied: nbformat>=4.2.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipywidgets>=7.6.0->ipygany) (5.1.3)
Requirement already satisfied: jupyter-client in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.0->ipygany) (6.1.12)
Requirement already satisfied: tornado>=4.2 in /home/dechin/.local/lib/python3.8/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.6.0->ipygany) (6.1)
Requirement already satisfied: backcall in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.0->ipygany) (0.2.0)
Requirement already satisfied: pygments in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.0->ipygany) (2.9.0)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.0->ipygany) (3.0.17)
Requirement already satisfied: decorator in /home/dechin/.local/lib/python3.8/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.0->ipygany) (4.4.2)
Requirement already satisfied: pexpect>4.3 in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.0->ipygany) (4.8.0)
Requirement already satisfied: jedi>=0.16 in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.0->ipygany) (0.17.2)
Requirement already satisfied: setuptools>=18.5 in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.0->ipygany) (52.0.0.post20210125)
Requirement already satisfied: pickleshare in /home/dechin/anaconda3/lib/python3.8/site-packages (from ipython>=4.0.0->ipywidgets>=7.6.0->ipygany) (0.7.5)
Requirement already satisfied: parso<0.8.0,>=0.7.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from jedi>=0.16->ipython>=4.0.0->ipywidgets>=7.6.0->ipygany) (0.7.0)
Requirement already satisfied: jupyter-core in /home/dechin/anaconda3/lib/python3.8/site-packages (from nbformat>=4.2.0->ipywidgets>=7.6.0->ipygany) (4.7.1)
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /home/dechin/anaconda3/lib/python3.8/site-packages (from nbformat>=4.2.0->ipywidgets>=7.6.0->ipygany) (3.2.0)
Requirement already satisfied: ipython-genutils in /home/dechin/anaconda3/lib/python3.8/site-packages (from nbformat>=4.2.0->ipywidgets>=7.6.0->ipygany) (0.2.0)
Requirement already satisfied: six>=1.11.0 in /home/dechin/.local/lib/python3.8/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets>=7.6.0->ipygany) (1.16.0)
Requirement already satisfied: pyrsistent>=0.14.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets>=7.6.0->ipygany) (0.17.3)
Requirement already satisfied: attrs>=17.4.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets>=7.6.0->ipygany) (21.2.0)
Requirement already satisfied: ptyprocess>=0.5 in /home/dechin/anaconda3/lib/python3.8/site-packages (from pexpect>4.3->ipython>=4.0.0->ipywidgets>=7.6.0->ipygany) (0.7.0)
Requirement already satisfied: wcwidth in /home/dechin/anaconda3/lib/python3.8/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython>=4.0.0->ipywidgets>=7.6.0->ipygany) (0.2.5)
Requirement already satisfied: notebook>=4.4.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (6.4.0)
Requirement already satisfied: pyzmq>=17 in /home/dechin/anaconda3/lib/python3.8/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (20.0.0)
Requirement already satisfied: Send2Trash>=1.5.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (1.5.0)
Requirement already satisfied: terminado>=0.8.3 in /home/dechin/anaconda3/lib/python3.8/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (0.9.4)
Requirement already satisfied: argon2-cffi in /home/dechin/anaconda3/lib/python3.8/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (20.1.0)
Requirement already satisfied: nbconvert in /home/dechin/anaconda3/lib/python3.8/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (6.1.0)
Requirement already satisfied: jinja2 in /home/dechin/anaconda3/lib/python3.8/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (3.0.1)
Requirement already satisfied: prometheus-client in /home/dechin/anaconda3/lib/python3.8/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (0.11.0)
Requirement already satisfied: python-dateutil>=2.1 in /home/dechin/.local/lib/python3.8/site-packages (from jupyter-client->ipykernel>=4.5.1->ipywidgets>=7.6.0->ipygany) (2.8.1)
Requirement already satisfied: cffi>=1.0.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (1.14.5)
Requirement already satisfied: pycparser in /home/dechin/anaconda3/lib/python3.8/site-packages (from cffi>=1.0.0->argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (2.20)
Requirement already satisfied: MarkupSafe>=2.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from jinja2->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (2.0.1)
Requirement already satisfied: entrypoints>=0.2.2 in /home/dechin/anaconda3/lib/python3.8/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (0.3)
Requirement already satisfied: pandocfilters>=1.4.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (1.4.3)
Requirement already satisfied: testpath in /home/dechin/anaconda3/lib/python3.8/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (0.5.0)
Requirement already satisfied: nbclient<0.6.0,>=0.5.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (0.5.3)
Requirement already satisfied: jupyterlab-pygments in /home/dechin/anaconda3/lib/python3.8/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (0.1.2)
Requirement already satisfied: mistune<2,>=0.8.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (0.8.4)
Requirement already satisfied: defusedxml in /home/dechin/anaconda3/lib/python3.8/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (0.7.1)
Requirement already satisfied: bleach in /home/dechin/anaconda3/lib/python3.8/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (3.3.0)
Requirement already satisfied: nest-asyncio in /home/dechin/anaconda3/lib/python3.8/site-packages (from nbclient<0.6.0,>=0.5.0->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (1.5.1)
Requirement already satisfied: async-generator in /home/dechin/anaconda3/lib/python3.8/site-packages (from nbclient<0.6.0,>=0.5.0->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (1.10)
Requirement already satisfied: webencodings in /home/dechin/anaconda3/lib/python3.8/site-packages (from bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (0.5.1)
Requirement already satisfied: packaging in /home/dechin/anaconda3/lib/python3.8/site-packages (from bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (20.9)
Requirement already satisfied: pyparsing>=2.0.2 in /home/dechin/.local/lib/python3.8/site-packages (from packaging->bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.6.0->ipygany) (2.4.7)
Installing collected packages: ipygany
Successfully installed ipygany-0.5.0
以及一个基于pyqt的一个弹出式绘图插件:
(base) dechin@ubuntu2004:~/projects$ python3 -m pip install pyvistaqt
Collecting pyvistaqt
Downloading pyvistaqt-0.5.0-py3-none-any.whl (162 kB)
|████████████████████████████████| 162 kB 1.1 MB/s
Requirement already satisfied: QtPy>=1.9.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from pyvistaqt) (1.9.0)
Requirement already satisfied: pyvista>=0.25.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from pyvistaqt) (0.31.3)
Requirement already satisfied: pillow in /home/dechin/anaconda3/lib/python3.8/site-packages (from pyvista>=0.25.0->pyvistaqt) (8.2.0)
Requirement already satisfied: meshio<5.0,>=4.0.3 in /home/dechin/anaconda3/lib/python3.8/site-packages (from pyvista>=0.25.0->pyvistaqt) (4.4.6)
Requirement already satisfied: scooby>=0.5.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from pyvista>=0.25.0->pyvistaqt) (0.5.7)
Requirement already satisfied: imageio in /home/dechin/anaconda3/lib/python3.8/site-packages (from pyvista>=0.25.0->pyvistaqt) (2.9.0)
Requirement already satisfied: appdirs in /home/dechin/anaconda3/lib/python3.8/site-packages (from pyvista>=0.25.0->pyvistaqt) (1.4.4)
Requirement already satisfied: numpy in /home/dechin/anaconda3/lib/python3.8/site-packages (from pyvista>=0.25.0->pyvistaqt) (1.20.2)
Requirement already satisfied: vtk in /home/dechin/anaconda3/lib/python3.8/site-packages (from pyvista>=0.25.0->pyvistaqt) (9.0.20210612.dev0)
Requirement already satisfied: transforms3d==0.3.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from pyvista>=0.25.0->pyvistaqt) (0.3.1)
Requirement already satisfied: autobahn>=17.7.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from vtk->pyvista>=0.25.0->pyvistaqt) (21.3.1)
Requirement already satisfied: Twisted>=17.5.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from vtk->pyvista>=0.25.0->pyvistaqt) (21.2.0)
Requirement already satisfied: matplotlib>=2.0.0 in /home/dechin/.local/lib/python3.8/site-packages (from vtk->pyvista>=0.25.0->pyvistaqt) (3.3.4)
Requirement already satisfied: wslink>=0.1.3 in /home/dechin/anaconda3/lib/python3.8/site-packages (from vtk->pyvista>=0.25.0->pyvistaqt) (0.2.0)
Requirement already satisfied: hyperlink>=21.0.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from autobahn>=17.7.1->vtk->pyvista>=0.25.0->pyvistaqt) (21.0.0)
Requirement already satisfied: cryptography>=3.4.6 in /home/dechin/anaconda3/lib/python3.8/site-packages (from autobahn>=17.7.1->vtk->pyvista>=0.25.0->pyvistaqt) (3.4.7)
Requirement already satisfied: txaio>=21.2.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from autobahn>=17.7.1->vtk->pyvista>=0.25.0->pyvistaqt) (21.2.1)
Requirement already satisfied: cffi>=1.12 in /home/dechin/anaconda3/lib/python3.8/site-packages (from cryptography>=3.4.6->autobahn>=17.7.1->vtk->pyvista>=0.25.0->pyvistaqt) (1.14.5)
Requirement already satisfied: pycparser in /home/dechin/anaconda3/lib/python3.8/site-packages (from cffi>=1.12->cryptography>=3.4.6->autobahn>=17.7.1->vtk->pyvista>=0.25.0->pyvistaqt) (2.20)
Requirement already satisfied: idna>=2.5 in /home/dechin/.local/lib/python3.8/site-packages (from hyperlink>=21.0.0->autobahn>=17.7.1->vtk->pyvista>=0.25.0->pyvistaqt) (2.10)
Requirement already satisfied: python-dateutil>=2.1 in /home/dechin/.local/lib/python3.8/site-packages (from matplotlib>=2.0.0->vtk->pyvista>=0.25.0->pyvistaqt) (2.8.1)
Requirement already satisfied: cycler>=0.10 in /home/dechin/.local/lib/python3.8/site-packages (from matplotlib>=2.0.0->vtk->pyvista>=0.25.0->pyvistaqt) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/dechin/.local/lib/python3.8/site-packages (from matplotlib>=2.0.0->vtk->pyvista>=0.25.0->pyvistaqt) (1.3.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /home/dechin/.local/lib/python3.8/site-packages (from matplotlib>=2.0.0->vtk->pyvista>=0.25.0->pyvistaqt) (2.4.7)
Requirement already satisfied: six in /home/dechin/.local/lib/python3.8/site-packages (from cycler>=0.10->matplotlib>=2.0.0->vtk->pyvista>=0.25.0->pyvistaqt) (1.16.0)
Requirement already satisfied: Automat>=0.8.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from Twisted>=17.5.0->vtk->pyvista>=0.25.0->pyvistaqt) (20.2.0)
Requirement already satisfied: attrs>=19.2.0 in /home/dechin/anaconda3/lib/python3.8/site-packages (from Twisted>=17.5.0->vtk->pyvista>=0.25.0->pyvistaqt) (21.2.0)
Requirement already satisfied: constantly>=15.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from Twisted>=17.5.0->vtk->pyvista>=0.25.0->pyvistaqt) (15.1.0)
Requirement already satisfied: zope.interface>=4.4.2 in /home/dechin/anaconda3/lib/python3.8/site-packages (from Twisted>=17.5.0->vtk->pyvista>=0.25.0->pyvistaqt) (5.4.0)
Requirement already satisfied: incremental>=16.10.1 in /home/dechin/anaconda3/lib/python3.8/site-packages (from Twisted>=17.5.0->vtk->pyvista>=0.25.0->pyvistaqt) (21.3.0)
Requirement already satisfied: setuptools in /home/dechin/anaconda3/lib/python3.8/site-packages (from zope.interface>=4.4.2->Twisted>=17.5.0->vtk->pyvista>=0.25.0->pyvistaqt) (52.0.0.post20210125)
Installing collected packages: pyvistaqt
Successfully installed pyvistaqt-0.5.0
到这里为止,我们所需要的插件就基本上安装完成了。
案例测试
到这里为止我们就可以看下这个库的运行效果。
画单个球体
首先执行一个画球的简单案例,这里一般都是在jupyter notebook上实现的,pyvista对于jupyter notebook有较好的支持。
import pyvista as pv
sphere = pv.Sphere()
sphere.plot(jupyter_backend='static')
运行的效果如下:
pyvistaqt案例
这里是一个官方提供的弹出式窗口的绘图方案:
from threading import Thread
import time
import numpy as np
import pyvista as pv
import pyvistaqt as pvqt
from pyvista import examples
globe = examples.load_globe()
globe.point_arrays['scalars'] = np.random.rand(globe.n_points)
globe.set_active_scalars('scalars')
plotter = pvqt.BackgroundPlotter()
plotter.add_mesh(globe, lighting=False, show_edges=True, texture=True, scalars='scalars')
plotter.view_isometric()
# shrink globe in the background
def shrink():
for i in range(50):
globe.points *= 0.95
# Update scalars
globe.point_arrays['scalars'] = np.random.rand(globe.n_points)
time.sleep(0.5)
thread = Thread(target=shrink)
thread.start()
执行后会弹出一个pyqt的窗口如下所示:
这个图其实是一个动态图,但是qt的这个方案似乎不能在界面上直接导出gif,这一点比较可惜。不过在pyvista的接口文档中,其实是包含导出gif视频和mp4视频的,相关接口可以参考:GIF生成示例和MP4生成示例这两个案例。
多模块可视化
在pyvista里面可以用MultiBlock将相关的模块都集成起来,比如这个案例中集成了两个球体,其实使用的方法也很简单,就是把创建的对象归纳到一个列表中:
import pyvista as pv
sphere1 = pv.Sphere(radius=0.1, center=(0, 0, 0))
sphere2 = pv.Sphere(radius=0.1, center=(0, 0, 1))
data = [sphere1,sphere2]
blocks = pv.MultiBlock(data)
blocks.plot(jupyter_backend='static',show_axes=1)
生成的结果如下图所示:
需要注意的是,因为这里都还是静态图片,三维的视角不可以调整,因此如果坐标设置不当的话,有可能导致两个球体的视角刚好重合,看起来就只有一个球体。
多模块可视化耗时
基于上述的MultiBlock,我们可以很方便的生成一大堆的数据,但是这里可视化的速率也是我们不得不考虑的一个因素,所以这里我们尝试一个1000个球体的可视化,并输出时间:
import pyvista as pv
import numpy as np
import time
start_time=time.time()
data = [pv.Sphere(radius=0.01, center=(np.random.random(), np.random.random(), np.random.random())) for i in range(1000)]
blocks = pv.MultiBlock(data)
blocks.plot(jupyter_backend='static',show_axes=1)
end_time=time.time()
print ('The time cost of ploting {} spheres is: {}s'.format(len(data),end_time-start_time))
生成的结果如下:
经过过程统计,耗时将近10s。
The time cost of ploting 1000 spheres is: 9.896512746810913s
这其实是一个比较慢的速度,让人有点担忧啊,对于一些几十万的体系,那可视化时间不得冲一天去了,这还不包含中间的时间戳。
动态画板
这里要用到我们之前安装的一个插件ipygany,可以在jupyter notebook中显示出来一个动态的画板,这样我们就可以用鼠标去拖动这个三维图,可以看不同的视角,如下是一个简单的单球体案例:
import pyvista as pv
sphere = pv.Sphere()
plotter = pv.Plotter(notebook=True)
plotter.add_mesh(sphere)
plotter.show(jupyter_backend='ipygany')
可视化效果图大概这样,只有在jupyter notebook中才能看到效果:
最后补充一个自己写的简单案例,可以在面板上画两个不同位置的三维球,使用方法是直接将两个对象加起来,这个就是python中一些魔法函数的优势了,非常的人性化:
import pyvista as pv
plotter = pv.Plotter(notebook=True)
plotter.add_mesh(pv.Sphere(radius=0.3,center=(0,0,0))+pv.Sphere(radius=0.3,center=(0,0,1)))
plotter.show(jupyter_backend='ipygany')
可视化的效果大概如下:
那么到这里,需要将的基本用例就介绍完成,后续更多的功能,大家可以自行探索。
总结概要
本文通过对pyvista这一相对“冷门”的python三维可视化工具的摸索,总结了安装与基本的使用示例,包括单模块、多模块、静态图、动态画板、gif和mp4视频的导出等。总体来说pyvista是一款渲染效果很棒的可视化软件,但是性能相对来说没有那么可观,对于规模不大的体系还是一个非常好用的工具,推荐使用。
版权声明
本文首发链接为:https://www.cnblogs.com/dechinphy/p/pyvista.html
作者ID:DechinPhy
更多原著文章请参考:https://www.cnblogs.com/dechinphy/
打赏专用链接:https://www.cnblogs.com/dechinphy/gallery/image/379634.html
腾讯云专栏同步:https://cloud.tencent.com/developer/column/91958
推荐阅读
-
35 岁实现财务*,腾讯程序员手握2300万提前退休?-1000万房产、1000万腾讯股票、加上300万的现金,一共2300万的财产。有网友算了一笔账,假设1000万的房产用于自住,剩下1300万资产按照平均税后20-50万不等进行计算,大约花上26-60年左右的时间才能赚到这笔钱。也就是说,普通人可能奋斗一辈子,才能赚到这笔钱。在很多人还在为中年危机而惶惶不可终日的时候,有的人的35岁,就已经安全着陆,试问哪个打工人不羡慕?但问题是有这样财富积累必然有像样的实力做靠山。没有人可以不劳而获。 看到这里,肯定有人说,那么对于普通人来说,卷可能真就成了唯一的出路。但是卷也有轻松的卷,“偷懒”的卷法,对于程序员而言,刨除掉一时无法改掉的开会传统占用的大部分时间,如何把有限的时间和精力放在真正重要的架构设计、需求设计上,而不是重复的造*,编码、改bug、手动测试。因此在科技改变生活的今天,学会使用AI工具成为程序员们的必备技能。 以全栈式全自动的软件开发工具飞算SoFlu软件机器人为例,作为全球首款面向微服务架构设计和最佳实践的软件机器人,SoFlu软件机器人改变了原来手工编码的作业模式,通过可视化拖拽方式以及参数配置就能实现等同于编写复杂代码的业务逻辑,在设计业务逻辑时就完成了微服务应用开发,做到“业务即图,图即代码”,实现“软件开发,十倍提效”。 而作为飞算SoFlu软件机器人的一个重要组成部分,FuncGPT(慧函数)支持所有类型函数创建。通过自然语言描述Java函数需求,实时生成高质量、高可读性的Java函数代码。生成代码可直接复制到IDEA,或一键导入Java全自动开发工具函数库。 FuncGPT(慧函数)具有五大核心能力: ● 自然语言:通过自然语言即可生成函数,降低软件开发门槛。 ● 秒级函数开发:全自动秒级开发函数,秒级完成,效率千倍提升。 ● 一站式函数开发应用:函数生成即可直接应用,效率、安全有保障。 ● 质量可靠:生成的函数代码符合业界规范、具备良好的可读性,符合最优解。 ● 灵活生成:可以根据开发人员的具体需求生成并支持调整和修改。 以“将文件流转换为File对象”这个需求为例,以下是FuncGPT(慧函数)秒级生成的代码: / 类名:FileConverter // 函数名:convertStreamToFile // 函数功能:将文件流转换为File对象 // POM依赖包:无 import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; public class FileConverter { /** * 将文件流转换为File对象 * @param inputStream 文件流 * @param filePath 文件路径 * @param fileName 文件名 * @return 转换后的File对象 * @throws IOException 如果发生I/O异常 */ public static File convertStreamToFile(InputStream inputStream, String filePath, String fileName) throws IOException { File file = new File(filePath + File.separator + fileName); // 创建File对象 try (FileOutputStream outputStream = new FileOutputStream(file)) { // 创建文件输出流 byte buffer = new byte[1024]; int bytesRead; while ((bytesRead = inputStream.read(buffer)) != -1) { // 从文件流读取数据并写入文件 outputStream.write(buffer, 0, bytesRead); } } return file; // 返回转换后的File对象 } } // 函数示例 // 将文件流转换为File对象示例 // 入参:inputStream,文件流 // 入参:filePath,文件路径 // 入参:fileName,文件名 // 出参:file,转换后的File对象 // 调用示例: // InputStream inputStream = new FileInputStream("example.txt"); // String filePath = "C:\\Users\\User\\Documents"; // String fileName = "example.txt"; // File file = FileConverter.convertStreamToFile(inputStream, filePath, fileName); // System.out.println(file.getAbsolutePath); // 输出结果:例如,将文件流转换为File对象后,文件的绝对路径为:C:\Users\User\Documents\example.txt // 则输出结果为:C:\Users\User\Documents\example.txt 通过分析,不难发现以上代码:
-
[姿势估计] 实践记录:使用 Dlib 和 mediapipe 进行人脸姿势估计 - 本文重点介绍方法 2):方法 1:基于深度学习的方法:。 基于深度学习的方法:基于深度学习的方法利用深度学习模型,如卷积神经网络(CNN)或递归神经网络(RNN),直接从人脸图像中学习姿势估计。这些方法能够学习更复杂的特征表征,并在大规模数据集上取得优异的性能。方法二:基于二维校准信息估计三维姿态信息(计算机视觉 PnP 问题)。 特征点定位:人脸姿态估计的第一步是通过特征点定位来检测和定位人脸的关键点,如眼睛、鼻子和嘴巴。这些关键点提供了人脸的局部结构信息,可用于后续的姿势估计。 旋转表示:常见的旋转表示方法包括欧拉角和旋转矩阵。欧拉角通过三个旋转角度(通常是俯仰、偏航和滚动)描述头部的旋转姿态。旋转矩阵是一个 3x3 矩阵,表示头部从一个坐标系到另一个坐标系的变换。 三维模型重建:根据特征点的定位结果,三维人脸模型可用于姿势估计。通过将人脸的二维图像映射到三维模型上,可以估算出人脸的旋转和平移信息。这就需要建立人脸的三维模型,然后通过优化方法将模型与特征点对齐,从而获得姿势估计结果。 特征点定位 特征点定位是用于检测人脸关键部位的五官基础部分,还有其他更多的特征点表示方法,大家可以参考我上一篇文章中介绍的特征点检测方案实践:人脸校正二次定位操作来解决人脸校正的问题,客户在检测关键点的代码上略有修改,坐标转换部分客户见上图 def get_face_info(image). img_copy = image.copy image.flags.writeable = False image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) results = face_detection.process(image) # 在图像上绘制人脸检测注释。 image.flags.writeable = True image = cv2.cvtColor(image, cv2.COLOR_RGB2BGR) box_info, facial = None, None if results.detections: for detection in results. for detection in results.detections: mp_drawing.Drawing.detection = 无 mp_drawing.draw_detection(image, detection) 面部 = detection.location_data.relative_keypoints 返回面部 在上述代码中,返回的数据是五官(6 个关键点的坐标),这是用 mediapipe 库实现的,下面我们可以尝试用另一个库:dlib 来实现。 使用 dlib 使用 Dlib 库在 Python 中实现人脸关键点检测的步骤如下: 确保已安装 Dlib 库,可使用以下命令: pip install dlib 导入必要的库: 加载 Dlib 的人脸检测器和关键点检测器模型: 读取图像并将其灰度化: 使用人脸检测器检测图像中的人脸: 对检测到的人脸进行遍历,并使用关键点检测器检测人脸关键点: 显示绘制了关键点的图像: 以下代码将参数 landmarks_part 添加到要返回的关键点坐标中。
-
旷视天元开源图像比对工具 MegSpot,助力图像算法研发 - 1.多样化图像比对:可提供叠加比对、拖拽比对等多种比对方式,支持缩放、移动等同步操作,并可生成 GIF 保存比对结果。2. 2.专业呈现:支持像素级图像查看、图像直方图、RGB 查看;支持预览亮度、对比度、饱和度、灰度等指标。3. 视频对比:Cognizant Megapixel 可提供多种图像对比方法,如拖放对比等。 3.视频对比:除了支持视屏的所有图像对比功能外,CCTV MegSpot 还支持同步回放、回放暂停和快进、回放速度设置等功能。 4.跨平台支持:CCTV MegSpot 提供对 Mac、Linux 和 Windows 系统的跨平台支持,借助 Electron 框架,可以低成本完成跨平台应用的开发,并保证各平台体验的一致性。 此外,央视网MegSpot支持跨平台自动更新和数据持久化,确保用户体验的连续性,并支持中、英、日三种语言:MegSpot为大尺寸图像文件的对比提供了本地解决方案。 MegSpot 是一种用于比较大型图像文件的本地解决方案。
-
用于数据分析和可视化的 Python Crawl 丁香人才网络数据
-
41 个下载免费 3D 模型的最佳网站-使用说明:使用权限可能因型号而异。因此,在下载文件之前,请仔细检查每个下载页面上的许可证和使用权限。 17. Clara.io Clara.io 是一个创建 3D 内容的全球平台,也是一个培养新 3D 艺术家的社区。Clara.io 提供+100,000个免费的3D模型,包括OBJ,Blend,STL,FBX,DAE,Babylon.JS,Three.JS格式,用于 Clara.io,Unity 3D,Blender,Sketchup,Cinema 4D,3DS Max和Maya。 使用说明:免费,标准和专业帐户仅供个人使用,如果您需要将 clara.io 用于商业用途,请与销售团队联系。 18. 3DExport 3DExport是一个市场,您可以在其中购买和销售用于CG项目的3D模型,3D打印模型和纹理。它提供15 +不同的3D格式供下载,如3DS MAX(.max),Cinema4D(.c4d),Maya(.mb,.ma),Lightwave(.lwo),Softimage(.xsi),Wavefront OBJ(.obj),Autodesk FBX(.fbx)等。它还提供15种不同的语言! 使用说明:免费下载仅供个人和非商业用途。 19. 3D Warehouse 3D Warehouse是一个开放的库,允许用户共享和下载SketchUp 3D模型,用于建筑,设计,施工和娱乐!任何人都可以免费制作,修改和重新上传内容到3D仓库,您可以找到任何您能想到的东西,如家具,电子产品,室内产品等。 使用说明:3D Warehouse中的所有模型都是免费的,因此任何人都可以下载文件以用于SketchUp甚至其他软件,如AutoCAD,Revit和ArchiCAD。 20. CadNav.com CadNav是CGI平面设计师和CAD / CAM / CAE工程师的在线3D模型库,我们提供超过50000 +免费3D模型和CAD模型下载。在CadNav网站上,您可以下载高质量的多边形网格3D模型,3D CAD实体对象,纹理,Vray材料,3D作品,CAD图纸等。 使用说明:免费下载仅供个人和非商业用途。 21. All3dfree.net 就像网站名称一样,它提供免费的3D模型,还包括Vray材料,CAD块,2d和3d纹理集合,无需注册即可免费下载。它是不断更新的,因此您可以查找或请求3DS,MAX,C4D,skp,OBJ,FBX,MTL等格式的模型。 使用说明:所有资源均不允许用于商业用途,否则您将承担责任。 22. Hum3D 自2005年以来,Hum3D帮助来自3多个国家的80D艺术家节省3D建模时间,并制作逼真的3D模型,用于电影,视频游戏,AR应用程序和可视化。所有模型均由首席3D艺术家进行验证,他们检查其是否符合专业要求和最新的3D建模标准。 使用说明:免费下载仅供个人和非商业用途。 23. Artist-3D.com 艺术家-3D 库存的免费 3D 模型下载按通用类别排序。它为人体解剖学、汽车、家具、火箭、卫星等模型提供 AutoDesk 3DS Max 格式。您还可以在浏览他们的网站时找到教程和类似类型的建模。 使用说明:使用权限可能因型号而异。因此,在下载文件之前,请仔细检查每个下载页面上的许可证和使用权限。 24. Free the models 就像本网站的标题一样,它为3d应用程序和3d游戏引擎提供免费的内容模型。您可以为您的任何项目找到许多有趣且有用的模型!它提供3ds,wavefront,bryce,poser,lightwave,md2和unity3d格式的模型。还有一个很棒的纹理集合,可以在您最喜欢的建模和渲染程序中使用。 使用说明:您从这里下载的所有内容都可以免费使用,除非它不能包含在另一个免费的网络或CD收藏中,也不能单独出售。否则,您可以在商业游戏,3D应用程序或渲染作品中使用它。您不必提供信用,但如果您这样做,那就太好了。 25. Resources.blogscopia 本网站由一家名为Scopia的公司创建。他们制作3D图像和视频,您可以找到许多为CGI工作的信息架构设计的模型,所有这些都可以在现实生活中使用。您可以免费下载它们,但是,如果您想一次下载它们,您可以支付 3 到 9 欧元。 使用说明:您可以免费下载模型部分的所有文件。每个压缩文件都包含您也可以在此处找到的许可证。基本上,您可以对文件执行任何操作。唯一的限制是不归属于Scopia的重新分发。 26.ambientCG 1000+公共领域PBR材料适合所有人!环境CG是使用许多不同的方法和资产类型创建的,例如照片纹理(PBR),贴花(PBR),图集(PBR),照片纹理(普通),物质存档(SBSAR),雕刻画笔,3D模型和地形。您可以在所有项目中*使用它们! 使用说明:在 ambientCG 上提供下载的所有 PBR 材料、画笔、照片和 3D 模型均根据知识共享 CC0 1.0 通用许可提供。您可以复制、修改、分发和执行作品,即使是出于商业目的,也无需征得许可。信用将不胜感激。 不要满足于平庸的大理石纹理 - 立即使用我们的免费PBR大理石纹理升级您的3D设计。 27.Pixar One Twenty Eight 这是一个提供官方动画行业经典纹理的网站:皮克斯,创建于 1993 年,该纹理库包括 128 个重复纹理,现在免费提供。 它包含您来到的纹理,包括砖块和动物毛皮。肯定会有一些你可以使用的东西。 使用说明:皮克斯动画工作室的《Pixar One Twenty Eight》根据知识共享署名4.0国际许可协议进行许可。即使出于商业目的,您也可以重新混合、调整和构建您的作品,只要您以相同的条款对新创作进行信用和许可。 访问数以千计的免费纹理并提升您的设计游戏 - 立即开始下载! 28. 3DXO 即使有近 620 个免费贴纸可供下载,3DXO 也不是最大的资源,但它的内容非常有用,不需要注册。无论是简单的墙壁或地板,还是一些奇怪的小东西,您都需要的纹理都可以在此网站上看到。 使用说明:使用权限可能因型号而异。因此,在下载文件之前,请仔细检查每个下载页面上的许可证和使用权限。 29. 3DModelsCC0 3DModelsCC0 与其他产品的不同之处在于它包含超过 250+ 个高质量 3D 模型,并且本网站上的所有内容都是免费的,完全是公共领域!使用我们的模型时无需信用或归属! 使用说明:为每个人提供完全免费的公共领域内容。 30.Sketch up texture club Sketchup Texture Club是一个非营利性的教育和信息门户网站,由3D社区的图像促进协会管理,特别强调面向学生和建筑和室内设计专业人士的可视化和渲染技术,以及所有正在学习3D可视化的人。 使用说明:您无需支付版税或使用费。纹理可以免费下载和使用。不允许将纹理作为竞争产品出售或重新分发,即使图像被修改也是如此。 31. FlippedNormals FlippedNormal 是一个提供计算机图形和 3D 资产的市场,您可以找到许多用于雕刻、建模、纹理、概念艺术、3D 模型、游戏资产或课程的高级资产! 使用说明:使用权限可能因型号而异。因此,在下载文件之前,请仔细检查每个下载页面上的许可证和使用权限。 32. NASA 3D NASA 3D网站是一个在线门户,提供与太空和各种NASA任务相关的大量三维模型和模拟。该网站是用户友好的,并提供有关每个型号的详细信息。该网站允许用户探索和下载几种不同格式的模型,包括 OBJ、STL 和 FBX,只需单击下载按钮即可。 使用说明: 要下载模型,只需单击模型页面上的下载按钮并选择所需的格式。 33. 3DAGOGO (Astroprint) 3DAGOGO 是一个提供广泛 3D 模型的网站,包括角色、车辆和建筑物。3DAGOGO 的独特功能之一是它专注于适合 3D 打印的模型,使其成为希望创建物理原型或模型的设计师的绝佳资源。要使用 3DAGOGO,设计师只需在网站上搜索他们正在寻找的模型类型,然后下载 STL 格式的文件。 使用说明: 要使用 3DAGOGO,只需搜索所需的 3D 模型类型并下载 STL 格式的文件。根据需要自定义模型,并确保在将其用于商业目的之前检查使用权限。 34. FreeCAD FreeCAD是一款了不起的3D建模软件,可让您在计算机上创建令人难以置信的3D设计。该软件可免费下载和使用,它提供了广泛的工具和功能,可用于创建用于各种目的的3D模型。 该网站易于浏览,您可以找到开始使用FreeCAD的所有必要信息。此外,该网站还提供一系列教程和指南,可帮助您了解 3D 建模的来龙去脉。 使用说明: 要下载模型,请访问网站并从库中选择所需的模型。该网站还提供了一系列使用该软件的教程和指南。 35. Pinshape Pinshape是一个提供一系列3D打印模型的网站。网站上提供的型号质量很高,因此您可以确保您的最终印刷产品看起来很棒。该网站提供了广泛的模型,包括从家居用品到小雕像和珠宝的所有物品。 但这还不是Pinshape所能提供的全部!该网站还允许用户上传和共享自己的3D模型。这意味着您不仅可以下载出色的模型,还可以通过分享自己的设计为社区做出贡献。此外,Pinshape 提供了一系列自定义选项,因此您可以调整和调整模型以满足您的特定需求。 使用说明: 要下载模型,请在网站上创建一个帐户,搜索所需的模型,然后单击下载按钮。该网站还为每种型号提供了一系列定制选项。 36.Yeggi Yeggi 提供了大量免费的 3D 模型,您可以下载各种格式的模型,例如 STL、OBJ 和 FBX。该网站易于使用,您可以按关键字、类别或特定网站搜索模型。 Yeggi 对于任何寻找 3D 模型的人来说都是一个很好的资源。它提供了大量的模型集合,从日常物品到复杂的机械,以及介于两者之间的一切。该网站的收藏量在不断增长,每天都有新的型号增加。 使用说明: 要下载模型,请在网站上搜索所需的模型,然后单击下载按钮。该网站还提供指向托管模型的原始网站的链接。 37. Open3DModel 来自开放3D模型的图像 Open3DModel具有各种类别的模型,包括建筑,车辆和角色。无论您需要建筑物,汽车还是人的3D模型,都可以在此网站上找到。 该网站易于浏览,您可以按类别或关键字搜索模型。每个模型都附带预览图像和详细信息,例如文件格式、大小和多边形数量。此信息可以帮助您选择适合您需求的模型。 使用说明: 要下载模型,请访问网站,从库中选择所需的模型,然后单击下载按钮。 使用最好的 3D 资产管理工具简化您的 3D 制作流程。立即试用它们,将您的 3D 项目提升到一个新的水平! 38. 3DExport 对于那些为其 3D 设计项目寻找 3D 模型、纹理和其他资源的人来说,该平台是一个很好的资源。该网站有大量模型可供选择,包括 3D 打印对象、游戏资产等。用户可以按类别、文件格式或价格范围浏览,以找到适合其项目的完美资源。此外,3DExport 还提供一系列教程和其他 3D 资源,以帮助用户提高技能并创建更令人印象深刻的设计。 使用说明: 要使用 3DExport,只需创建一个帐户并浏览可用型号。您可以按类别、格式和价格进行搜索,以找到所需的型号。找到喜欢的模型后,只需下载它并开始在您的项目中使用它。 39.Blend Swap Blend Swap是一个社区驱动的市场,提供与Blender软件兼容的各种免费3D模型。该平台允许用户共享和下载模型、纹理和其他资产,以便在他们的项目中使用。 使用说明: 创建免费帐户后,您可以浏览社区上传的大量3D模型。当您找到要使用的一个时,只需下载它并将其导入您选择的 3D 软件即可。 40. 3DShook 3DShook 是一个高级 3D 模型市场,提供一系列用于建筑、游戏等各个行业的高质量模型。该平台提供基于订阅的模型,具有不同的定价计划,允许用户访问一系列模型。 使用说明: 注册免费帐户后,只需浏览3D模型库,选择您喜欢的模型,然后以您需要的格式下载它们。 41. Smithsonian X 3D 史密森尼 X 3D 对于正在寻找历史文物和文物的高质量 3D 模型的设计师来说,这是一个独特的资源。该平台提供了大量3D模型,这些模型是根据史密森尼博物馆和研究中心中的真实物体扫描创建的。 使用说明:
-
PyVista:一种用于Python的三维数据可视化工具