#1
|
|||
|
|||
perspective rendering
Hi,
is it possible to automatically scale the size of on-the-fly objects to convey depth impression? I have created a ground plane consisting of points, but Vizard applies the same pointsize to each point, independent of the distance to the observer. Best, Thomas |
#2
|
|||
|
|||
Hi,
If you want the points to be scaled by distance then try using a billboarded quad instead of On-The-Fly objects. Here is some code: Code:
quad = viz.add(viz.TEXQUAD) quad.billboard() quad.scale(0.2,0.2,0.2) #Need to scale it only once quad.translate(x,y,z) #Position the quad If you plan on using a lot of points then this might not be the most effiecient solution. If this is the case, then there is an alternative solution which requires a plugin. However, try this method first and let me know if it is sufficient. |
#3
|
|||
|
|||
Thanks for your suggestion. Your solution worked fine, however, given that I need 2000-3000 points, the animation was somewhat slowed down. Do you think the plugin could handle that?
|
#4
|
|||
|
|||
Quote:
|
#5
|
|||
|
|||
They are all dynamic - from frame to frame, some points will be redrawn at random locations, whereas others will be slightly displaced along the z-axis.
|
#6
|
|||
|
|||
Hi,
I've attached a zip file which contains a plugin and sample script on how to use it. The points should have some form of perspective rendering on them. |
#7
|
|||
|
|||
Hi,
thank you so much - the plug-in works fine. I have, however, observed that the speed with which the points change position depends on how far backwards you move the viewpoint. I guess my limited knowledge of Vizard prevents me from understanding this - is there a way to get around it? |
#8
|
|||
|
|||
Hi,
The example code that changes the position of the points uses the actual elapsed time to calculate the new position, so it shouldn't be framerate dependent. Press the F4 key to display the framerate of you simulation in the upper left corner of the window. It should usually be around 60 fps. When you move further back does the framerate drop? |
#9
|
|||
|
|||
Yes, the closer I move the viewpoint towards the dots, the lower the framerate. Could that have anything to do with my graphics card (ATI FireGL V3200)?
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|