WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-25-2010, 02:44 PM
kopper kopper is offline
Member
 
Join Date: Apr 2010
Posts: 18
Thanks Masaki, it now works as expected.

I have another similar issue, but now it's with the projector extension. I'm using projected textures to emulate a spotlight in my application. It's not a realistic spotlight, but just a texture shaped like a torus that is semitransparent on the edges and has a transparent hole in the center.

It is used to define a guiding path for the user to follow with the eyes, and I did not use the spotlight lighting effect because it would be much more complex as I would've to tessellate the geometry faces, etc.

Anyway, this projected texture, I link it to the mainview position, and change it's orientation (pitch and yaw) in an animation path to be followed by the user.

Here is the code used for the creation of the spotlight and animation path:
Code:
import projector
spotlight = projector.add(viz.add('spotlight.png'))

spotlight.setEuler([15,0,90])

#State the geometry that can have the shadow cast upon them
spotlight.affect(model)

spotlight.setPosition(initial_pos)

spotlight_path = viz.addAnimationPath()

eulers = [[24.11, -4.72, 0.00], [12.95, -16.99, 0.00], ...]
times  = [0.07, 1.14, ...]

for x in enumerate(eulers):
	#Add the control point to the animation path
	#at the new time
	cp = viz.addControlPoint()
	cp.setEuler(eulers[x])
	spotlight_path.add(cp,times[x])

viz.link(spotlight_path, spotlight)

...

spotlight_path.play()

What I couldn't find a way to do was to apply the same offset that is applied to the HUD, now to the projected texture.

Attached is an image of the projected spotlight, with the two views. The idea is to have the spotlight (which is a projected texture) illuminating the same geometry in both images.

I hope that the explanation was clear enough.

Thank you for your help!

Regis
Attached Thumbnails
Click image for larger version

Name:	vizard-20101025-173322582.JPG
Views:	2514
Size:	645.3 KB
ID:	398  
Reply With Quote
  #2  
Old 10-29-2010, 07:05 AM
kopper kopper is offline
Member
 
Join Date: Apr 2010
Posts: 18
Hi,

Does anybody have any suggestion on how to achieve the above? Or perhaps an alternative to the projected textures to produce similar results, yet supporting stereo?

Thanks,

Regis
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


All times are GMT -7. The time now is 11:01 PM.


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