File: skybox.py

package info (click to toggle)
vedo 2025.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,404 kB
  • sloc: python: 64,792; javascript: 1,932; xml: 437; sh: 139; makefile: 6
file content (15 lines) | stat: -rw-r--r-- 474 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""Embed a mesh into a skybox environment
Mesh lighting is by Physically Based Rendering (PBR)"""
from vedo import *

msh = Mesh(dataurl+"man.vtk").rotate_x(-90)

# Use physically based rendering (PBR):
msh.c("white").lighting(metallicity=1, roughness=0.05)

# Specify a skybox environment from a HDR file
# (more skybox example HDR files at https://polyhaven.com/hdris)
cubemap_path = download(dataurl+"kloppenheim_06_4k.hdr")

show(msh, __doc__, bg=cubemap_path).close()