WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 04-17-2012, 05:42 PM
Salvar Salvar is offline
Join Date: Nov 2010
Posts: 20
Can I make a moving clipping plane?

I'm setting up an experiment in Vizard, and I need to control how much of an object a participant can see during movement. The trick is that I don't want to block anything else but this particular 3dnode, so applying a global fog or clipping plane is out of the picture.

So I had the idea of applying a clipping plane to the node, and using a vizact ontimer event to update its coordinates according to where the viewpoint is a t the time. This is proving difficult.

I basically want a clipping plane that's the equivalent of a horse blinder on the right eye. One that blocks everything on your right side from view, and stays in that position as you move and rotate in the world. Is this possible?
Reply With Quote
Old 04-18-2012, 09:50 AM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849
Here is an example that applies a clip plane to a model and updates it every frame so that the plane is relative to the current viewpoint. Let me know if this isn't what you were asking for.
import viz

model = viz.add('gallery.ive')

import vizact

def UpdateClipPlane():

	mat = viz.MainView.getMatrix()

	p = viz.Plane()

Reply With Quote
Old 04-18-2012, 12:14 PM
Salvar Salvar is offline
Join Date: Nov 2010
Posts: 20
You are the man. This is absolutely perfect. Just what I was trying to do, except my attempt looks like a Rube Goldberg machine next to this solution. Thanks!

One last thing: Is there an easy way to offset the plane a little bit to the right?
Reply With Quote
Old 04-18-2012, 12:32 PM
Salvar Salvar is offline
Join Date: Nov 2010
Posts: 20
Hmm, thought I could edit posts here. Anyway, I tried to offset the plane by preTrans-ing it right after the preEuler, but it doesn't seem to be working.

Edit: Nevermind, got it. PreTrans-ing before Pre-Eulering did the trick.

Last edited by Salvar; 04-18-2012 at 12:41 PM.
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
Clipping Plane envisC Vizard 8 10-23-2012 12:36 PM
Tiling a texture on a plane FreakyT Vizard 2 04-27-2011 05:34 PM
Does the automatic clipping plane calculation work? Joran Vizard 4 07-10-2009 10:35 AM
I need help with the Far Clip Plane... k_iwan Vizard 3 03-13-2007 04:54 AM
Panning Textures across a plane. shivanangel Vizard 3 04-07-2006 08:45 AM

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

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