WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-07-2009, 09:04 AM
Joran Joran is offline
Member
 
Join Date: Jun 2006
Posts: 38
Send a message via Yahoo to Joran
Does the automatic clipping plane calculation work?

Hello,

Does this command work?

Code:
window.clip(viz.AUTO_COMPUTE)
I have tried it, but when I print the clipping planes of the window (in the onUpdate) they do not seem to be automatically updated.

Greetings, Joran.
Reply With Quote
  #2  
Old 07-09-2009, 12:59 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Yes, it works. The problem is that when automatic clip plane computation is enabled, the window will return static values for near/far, since the actual clip planes values are not known until culling is performed.
Reply With Quote
  #3  
Old 07-10-2009, 12:19 AM
Joran Joran is offline
Member
 
Join Date: Jun 2006
Posts: 38
Send a message via Yahoo to Joran
Hello,

I would already be happy to know the values of the previous render step.

But the other thing is that I don't see it working. In my application I still see the z-fighting when automatic clip calculation is turned on, while it disappears if I calculate the clipping planes manually. But maybe I have some object in my scene that is way of the rest of the model that influences the automatic clipping plane calculation. I will investigate further.

Greetings, Joran.
Reply With Quote
  #4  
Old 07-10-2009, 08:01 AM
Joran Joran is offline
Member
 
Join Date: Jun 2006
Posts: 38
Send a message via Yahoo to Joran
Lightbulb

Hello,

I have made a sample script that shows the problem (And I think I may have found a bug).

Code:
import viz

viz.go()

boxbig = viz.add('box.wrl', scale=(2000, 1, 2000))
boxsmall = boxbig.copy()
boxsmall.setScale(100, 1, 100)
boxsmall.setPosition(0, 0.001, 0)
boxsmall.color(viz.GREEN)

viz.MainView.setEuler(0, 87, 0)
viz.MainView.setPosition(0, 3000, 0)
boxsmall.addAction(vizact.spin(0, 1, 0, 20))

#texquad = viz.addTexQuad(viz.ORTHO)
#texquad.setScale(100, 100)
texquad = viz.addTexQuad(viz.SCREEN)

vizact.onkeydown(' ', texquad.visible, viz.TOGGLE)
It looks like when I add something to viz.SCREEN (or viz.ORTHO) that this will be used when calculating the clipping planes. In the example script when you run it, you should see a small green square that z-fights with the red square. When you press the spacebar, all is fine again, since this removes the texture quad from viz.ORTHO or viz.SCREEN.

What do you think? Have I found something? I am still using Vizard 3.12.0004 and not 3.14.0004.

And it looks like that the automatic computing of the clipping planes is on by default.

Greetings, Joran.
Reply With Quote
  #5  
Old 07-10-2009, 10:35 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Thanks for the sample script. This looks like a bug in the OSG library. I have back ported a fix from the current version of OSG to our version and it seems to resolve the issue. I will email you the modified file so you don't have to wait for the next release.
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
I need help with the Far Clip Plane... k_iwan Vizard 3 03-13-2007 04:54 AM


All times are GMT -7. The time now is 05:14 PM.


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