WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 12-11-2016, 11:56 PM
Vaquero Vaquero is offline
Join Date: Nov 2015
Posts: 62
draw outline on objects?

Hey! I saw that there's a highlighter tool, but it depends on the user picking items by sending a ray cast. I'd like to highlight objects that get chosen by my script (randomly from a list of items), not by the user.
Is there a way using the highlighter tool or do I have to create a shader effect?
Reply With Quote
Old 12-13-2016, 03:53 PM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,467
Yes, the highlighter module has an outline object that you can add models to directly:

import viz
import viztask


environment = viz.addChild('sky_day.osgb')
soccerball = viz.addChild('soccerball.osgb',pos=[-0.5,1.8,2])
basketball = viz.addChild('basketball.osgb',pos=[0,1.8,2])
volleyball = viz.addChild('volleyball.osgb',pos=[0.5,1.8,2])
items = [soccerball,basketball,volleyball]

from tools import highlighter
outline = highlighter.Outline()

def outlineTask():
	while True:
		for item in items:
			yield viztask.waitKeyDown(' ')
viztask.schedule( outlineTask() )
Reply With Quote

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
Trouble picking text3d objects Salvar Vizard 4 12-01-2010 03:07 PM
Not drawing invisible objects sleiN13 Vizard 9 11-23-2010 09:27 AM
Semi-circle array containing target and distractor objects ptjt255 Vizard 3 08-04-2009 03:09 AM
Lightwave objects rotation problem hosier Vizard 6 02-13-2009 12:04 PM
Could not find plugin to load objects... halley Vizard 1 05-30-2006 11:01 AM

All times are GMT -7. The time now is 09:51 AM.

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