#1
|
|||
|
|||
Screen Size and Scaling
Hi,
I have two questions regarding screen size and scaling of objects. Here I have attached two images (one original texture and one screen shot of the texture placed in two orientations). I have also annotated the screen shot for clarification. I have two issues,
Code:
import viz viz.window.setSize([760, 600]) viz.go() TextureArrow = viz.addTexture('Bank, Task\Arrow, Original.png') DispArrow1 = viz.addTexQuad(viz.SCREEN, viz.MainScene, 500) DispArrow1.setScale([600.0 / 780, 780.0 / 780, 1]) DispArrow1.setPosition([0.7, 0.7, 0]) DispArrow1.setEuler([0, 0, 90], mode = viz.ABSOLUTE) DispArrow1.texture(TextureArrow) DispArrow2 = viz.addTexQuad(viz.SCREEN, viz.MainScene, 500) DispArrow2.setScale([600.0 / 780, 780.0 / 780, 1]) DispArrow2.setPosition([0.5, 0.3, 0]) DispArrow2.setEuler([0, 0, 0], mode = viz.ABSOLUTE) DispArrow2.texture(TextureArrow) Greetings, |
#2
|
|||
|
|||
I would recommend adding the arrow to the viz.ORTHO layer, instead of viz.SCREEN. The SCREEN layer works in normalized (0-1) units, which is what causes the aspect ratio distortions. The ORTHO layer works in pixel units, which preserves the objects aspect ratio.
|
#3
|
|||
|
|||
Quote:
Cheers |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Scaling Portions of a CAL3D Model | shivanangel | Vizard | 2 | 07-26-2012 01:17 AM |
automatic scaling | rlh001 | Vizard | 5 | 06-18-2012 10:31 AM |