WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-28-2017, 06:51 AM
JohnSenior JohnSenior is offline
Member
 
Join Date: Apr 2017
Posts: 4
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
Reply With Quote
  #2  
Old 04-29-2017, 01:05 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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)
There's a night version of the sky you could swap in as well:

Code:
piazza.visible(viz.OFF,node='pz_skydome-GEODE')
viz.addChild('sky_night.osgb')
Reply With Quote
  #3  
Old 05-08-2017, 01:23 PM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
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.
Reply With Quote
  #4  
Old 05-09-2017, 11:20 AM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
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!

Reply With Quote
  #5  
Old 05-19-2017, 03:06 AM
JohnSenior JohnSenior is offline
Member
 
Join Date: Apr 2017
Posts: 4
Wow, thats awesome, thanks so much, Veleno!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing objects in scene Van Vizard 2 12-02-2016 02:04 AM
Changing scenes with proximity sensors BSUGeek Vizard 1 03-24-2015 01:10 AM
Changing parent without changing absolute global position? The SundanceKid Vizard 2 05-23-2014 02:43 PM
Get all Assets / Scene Root? shivanangel Vizard 0 03-26-2014 12:13 PM
Copying Scene? Brett Lindberg Vizard 0 08-28-2009 11:56 PM


All times are GMT -7. The time now is 05:14 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC