public:t-vien-10-3:lab_2_materials
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
public:t-vien-10-3:lab_2_materials [2010/09/16 10:11] – created hannes | public:t-vien-10-3:lab_2_materials [2024/04/29 13:33] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 151: | Line 151: | ||
ambient_source = AmbientLight(' | ambient_source = AmbientLight(' | ||
ambient_source.setColor(Vec4(1, | ambient_source.setColor(Vec4(1, | ||
- | ambientnp = root.attachNewNode(ambient_source.upcastToPandaNode()) | + | ambientnp = root.attachNewNode(ambient_source) |
root.setLight(ambientnp) | root.setLight(ambientnp) | ||
# Set up a spotlight for localized illumination | # Set up a spotlight for localized illumination | ||
Line 158: | Line 158: | ||
spot_source = Spotlight(' | spot_source = Spotlight(' | ||
spot_source.setColor(Vec4(1, | spot_source.setColor(Vec4(1, | ||
- | spot_source.setAttenuation(Vec3(0, | ||
## spot_source.showFrustum() # Uncomment for great debug information | ## spot_source.showFrustum() # Uncomment for great debug information | ||
spot_source.setLens(lens) | spot_source.setLens(lens) | ||
- | spotnp = root.attachNewNode(spot_source.upcastToLensNode()) | + | spotnp = root.attachNewNode(spot_source) |
spotnp.setPos(Vec3(1, | spotnp.setPos(Vec3(1, | ||
spotnp.setHpr(0, | spotnp.setHpr(0, |
/var/www/cadia.ru.is/wiki/data/attic/public/t-vien-10-3/lab_2_materials.1284631866.txt.gz · Last modified: 2024/04/29 13:33 (external edit)