Open lfz opened 9 months ago
Hi @lfz !
Can you provide example? I'm not sure about what auto-rotate function and rendering are you talking. Please share some code or screens to clarify that. Thanks!
these two videos:
https://www.youtube.com/watch?v=zCeQ_ZXy_Ps
https://www.youtube.com/watch?v=9evYSq3ieVs
besides, how to make a video/gif like this?
I used offscreen rendering aka headless browser: https://github.com/K3D-tools/K3D-jupyter/blob/main/examples/headless.ipynb
K3D have no auto-rotate function but that is feature that we can discuss. But we can animate camera: https://github.com/K3D-tools/K3D-jupyter/blob/main/examples/Camera_interactive_demo.ipynb
Hi,
I had some issues with running the headless.ipynb
example, but managed to resolve them on my own.
I was getting the error AttributeError: 'NoneType' object has no attribute 'split'
I needed to modify get_headless_driver
as ChromeDriverManager().install()
was giving me the error.
Following Stackoverflow comment from JeffC, he pointed out: "as of Selenium 4.6+, Selenium now has a driver manager built in so you no longer need ChromeDriverManager()"
The new working code looks like this:
def get_headless_driver(no_headless=False):
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument("--no-sandbox")
options.add_argument("--disable-crash-reporter")
if not no_headless:
options.add_argument("--headless")
return webdriver.Chrome(options=options)
Result/Output:
@GregorKobsik great sugesstion. I will change a code after testing. Thanks!
Hi, I really like the offscreen rendering effect. the color, shadow looks really great. And I cannot tune this effect on the online version. Besides, the online version does not have the auto-rotate function.
I am wondering how to
thank you !