PDA

View Full Version : Vizard graphics window is black


arshbot
03-14-2017, 08:27 AM
Hey all, I'm new to vizard and trying to run this script

import viz
viz.setMultiSample(4)
viz.go()
viz.MainWindow.fov(60)
piazza=viz.addChild('mymodel.osgb')

And I get a black screen on the vizard window that pops up. The .osgb file is 249mb large and the fbx file that it originated from is 43.6mb. I'm not really sure what's going on here... any thoughts? The script is in the Desktop directory, which is where the .osgb file is as well.

Jeff
03-14-2017, 10:06 PM
It's possible the model is not scaled correctly for Vizard or not centered at the origin. Can you see the model if you load it in Inspector? What are the bounding box dimensions shown in the status bar at the bottom of the window? The values shown are in meters.

arshbot
03-20-2017, 07:53 AM
Turns out that it wasn't black! It was actually so dark that I couldn't see anything, thinking it was black. Adding these two lines to my main script solved the issue!

mylight = viz.addSpotLight(spread=180, pos=(10, 100, 0))
mylight.intensity(100)