#1
|
|||
|
|||
Changing a 3d scene from daytime to nighttime?
Dear forum members,
I tried my best on my own, but i got to admit I am lost right now. I am trying to change a 3d scene (e.g. the "piazza") from daytime to nighttime. Is there a way to change the lighting accordingly just using Vizard? My basic idea was to turn off all existing lights an place a few new point lights in the locations of the streetlamps of "piazza". I tried to edit the lighting directly in the osgb.-file using Vizard inspector, but I was not able to turn off the light simulating the sunlight. Is it possible to make these changes within Vizard/Vizard Inspector, or do I have to use 3ds Max for this? Apologies, if these question are basic knowledge, but I couldnt find solutions online either. Best, John |
#2
|
|||
|
|||
The piazza was created in 3ds Max with lighting baked into the model. One way to create a scene that has both day and night is to have two versions of the same model, each with it's own baked lighting.
To darken the piazza in Vizard you could try blending in a black texture as described here or use a post process effect: Code:
import viz viz.go() piazza = viz.addChild('piazza.osgb') import vizfx.postprocess from vizfx.postprocess.color import ExposureEffect effect = ExposureEffect(-2) vizfx.postprocess.addEffect(effect) Code:
piazza.visible(viz.OFF,node='pz_skydome-GEODE') viz.addChild('sky_night.osgb') |
#3
|
|||
|
|||
Hi John,
The lighting & shadows in the Piazza scene is baked into static maps, so it's not possible to relight it the way you're intending unless the lightmaps are removed. I checked the file in Inspector, and they're all on texture unit 1. To get rid of them, you'd loop through all the objects in the scene with python and clear the texture unit. Jeff may be able to advise on that part. |
#4
|
|||
|
|||
Hi again John,
I exported a version with all the lightmaps stripped out with realtime shadows coming from a directional light instead. You can get that here: piazza_20170509_nolightmaps.zip (34mb) Feel free to play around with it as you like! |
#5
|
|||
|
|||
Wow, thats awesome, thanks so much, Veleno!
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Changing objects in scene | Van | Vizard | 2 | 12-02-2016 03:04 AM |
Changing scenes with proximity sensors | BSUGeek | Vizard | 1 | 03-24-2015 02:10 AM |
Changing parent without changing absolute global position? | The SundanceKid | Vizard | 2 | 05-23-2014 03:43 PM |
Get all Assets / Scene Root? | shivanangel | Vizard | 0 | 03-26-2014 01:13 PM |
Copying Scene? | Brett Lindberg | Vizard | 0 | 08-29-2009 12:56 AM |