WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-18-2015, 11:02 AM
Goof Goof is offline
Member
 
Join Date: Nov 2014
Posts: 9
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!
Reply With Quote
  #2  
Old 03-20-2015, 10:53 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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)
Reply With Quote
  #3  
Old 03-23-2015, 11:03 AM
Goof Goof is offline
Member
 
Join Date: Nov 2014
Posts: 9
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.
Reply With Quote
  #4  
Old 03-24-2015, 09:33 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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?
Reply With Quote
Reply


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
How to take a picture from the camera s7912081990 Vizard 2 11-01-2012 08:32 PM
Higher Quality Models apanza Vizard 1 01-23-2012 11:21 AM
use wii to drag and drop objects in vizard amith Vizard 0 12-29-2011 07:50 AM
Picture in overlay menu? GiudiceLab Vizard 0 11-05-2009 11:31 AM
Object animation using a picture? Elittdogg Vizard 2 09-10-2007 08:12 AM


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


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