WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-29-2010, 01:31 PM
c4am95 c4am95 is offline
Member
 
Join Date: Mar 2010
Posts: 16
Title Screen

For some reason I've had some trouble doing something that should be fairly easy. Before rendering the world, I want a really simple title screen to pop up, eg a colored screen with some text. When the user is ready, eg some key is pressed, that screen disappears and the world begins rendering. I'm new to vizard (and haven't done a ton of graphics), so I don't know what the best way to do this is. So...let's talk about it huh? Please?
Reply With Quote
  #2  
Old 03-29-2010, 02:59 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
If you want a simple title screen you can set the background color and add some text to the screen. When the user hits a key you can remove the text and render the world.
Code:
import viz
viz.go()

gallery = viz.add('gallery.ive')
gallery.visible(viz.OFF)

viz.clearcolor(viz.SKYBLUE)
text = viz.addText('Title Screen', parent = viz.SCREEN)
text.setPosition(0.3,0.5)

def showWorld():
	
	gallery.visible(viz.ON)
	text.remove()
	viz.clearcolor(viz.BLACK)
	
vizact.onkeydown(' ',showWorld)
If you wanted to show an image for the title sceen the following knowledge base article describes how to replace the background color with an image.

http://kb.worldviz.com/articles/813
Reply With Quote
  #3  
Old 03-30-2010, 12:05 PM
c4am95 c4am95 is offline
Member
 
Join Date: Mar 2010
Posts: 16
thanks for your reply. i'm assuming that "gallery" is an environment model or something right? so basically this code would set the visibility of everything in the world off initially, and upon user input turn the visibility of those objects back on? so you would have to do this for every single world object? if so, i was kind of looking for a solution that avoided that. i just thought perhaps there was a way to disable all world rendering that didn't disable 2d text rendering. if not, though, this method isn't tough.
Reply With Quote
  #4  
Old 03-30-2010, 12:30 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
If you want to hide the entire scene then you can use the following code:
Code:
viz.MainScene.visible(0,viz.WORLD) #Hide all objects in world
.
.
.
viz.MainScene.visible(1,viz.WORLD) #Unhide all objects in world
Reply With Quote
  #5  
Old 04-08-2010, 01:24 PM
c4am95 c4am95 is offline
Member
 
Join Date: Mar 2010
Posts: 16
thanks for your help. that'll work. i didn't know about multiple scenes so now i understand much better.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
split screen honey006 Vizard 3 05-21-2009 09:57 AM
Remove the credits on the run screen Saz Vizard 1 11-21-2008 09:01 AM
screen image erchrastil Vizard 8 06-27-2008 11:45 AM
position of html-file on screen active_world Vizard 1 05-16-2008 07:24 PM
accessing screen buffer hotspur1 Vizard 3 08-22-2003 03:31 PM


All times are GMT -7. The time now is 10:29 AM.


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