当我尝试使用巨型球体在 Threejs 中创建天空盒时,天空盒中的黑色球体形成

问题描述

我正在尝试制作一个球形天空盒,因为我认为它最适合我正在制作的空间场景。我遇到了两个问题:

  1. 我可以让天空盒工作,但由于某种原因,我制作的巨大球体中出现了一个球体。我不认为它是一个真正的 Object3D 球体,我感觉它是某种图形故障。

  2. 如果我使球体太大(例如半径为 1800),它就会消失并停止工作。如果我把它的边设置为三边。双边,我可以缩小场景,仍然可以看到它的球体外侧,但里面,无论是双面还是背面,1800或更大时都看不见

from selenium import webdriver
from bs4 import BeautifulSoup
import pandas as pd
import time 

# pip install selenium
# apt-get update # to update ubuntu to correctly run apt install
# apt install chromium-chromedriver
# cp /usr/lib/chromium-browser/chromedriver /usr/bin
# use command above if you code on google colab

options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')

site = 'https://www.haremaltin.com/altin-fiyatlari'

wd = webdriver.Chrome('chromedriver',options=options)

wd.get(site)

time.sleep(5) # give chrome 5 seconds to load the page 

html = wd.page_source

df = pd.read_html(html)

gold = df[1][2][15] # table 1,column 2,row 15,the value I want
gold = int((float(gold))*1000)
# it was a float and even more float value that I got,something like 
# 3.252,000,so I tried to convert it into int so code above the 
# solution that I found

这是它的外观图片:

彩色球是正确的,内部的黑色球体看起来不正确。如果我放大到足够的场景,黑球会缩小并变得越来越小,直到它完全消失,但我必须将场景放大得太远,如果我尝试这样做,我的任何东西都不会显示出来黑球走开

如果有帮助,我正在使用 PerspectiveCamera,并且正在使用 OrbitControls 探索场景

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)