WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Picture quality drop (https://forum.worldviz.com/showthread.php?t=5315)

Goof 03-18-2015 11:02 AM

Picture quality drop
 
I've made what can be described as a slideshow type of application in Vizard. I did this by displaying images as a texture on a texture quad and keeping the mainview stationary so the user only sees an image in front of them.

However, displaying these images (jpg) causes a noticeable drop in the quality of the picture (as in, they come out looking slightly blurry compared to the original image).

Is there any way to display 2d images and keep the original quality?

Thanks!

Jeff 03-20-2015 10:53 PM

By default, textures are resized to a power of two. You can use the texture.hint command with the viz.ALLOW_NPOT_TEXTURE_HINT flag to allow non-power-of-two textures if supported by your graphics card. Also, make sure to scale the texture quad to match the aspect ration of the texture:

Code:

import viz
viz.go()

#Print maximum 2D texture dimension supported by GPU driver
print viz.getOption('gl.max_texture_size')

quad = viz.addTexQuad(pos=[0,1.8,3])
#Picture has aspect ration of 1.333 so scale quad to match
quad.setScale([1.333,1,1])

texture = viz.addTexture('image.JPG')
texture.hint(viz.ALLOW_NPOT_TEXTURE_HINT)
quad.texture(texture)


Goof 03-23-2015 11:03 AM

Thanks for the help Jeff. The problem still arises when I use images with dimensions in powers of two (to avoid Vizard rescaling the image) and when I use pictures with an aspect ratio of 1 (to avoid scaling on the texture quad).

It seems like the blurriness is caused by the image being scaled somewhere along the line but I cannot figure out where. If it helps any, I'm using Vizard 3.0.

Jeff 03-24-2015 09:33 PM

What are the dimensions of the original image? What is the output shown in the vizard interactive window? What kind of graphics card do you have?


All times are GMT -7. The time now is 12:29 AM.

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