PDA

View Full Version : Vizard avatar textures have blurred edges


lklab
11-22-2015, 12:55 PM
I am trying to make an animated tree. Right now if I export as osgb, the textures come out sharp pixel to pixel. This is what I want. But when exporting it with cal 3d as an avatar, the textures are blurred. This is a problem because I want my edges to be sharp but this is causing a blurry haze to appear around my textures.

Anyone know whats wrong?

Thank you!

Veleno
12-02-2015, 03:49 PM
Hi Iklab,
I may be able to help you here.
Can you start by uploading a couple screenshots of the issue you're seeing? It isn't clear from the text.

lklab
12-06-2015, 02:34 PM
http://forum.worldviz.com/attachment.php?attachmentid=736&stc=1&d=1449441156 This is the weird effect I'm getting.

http://forum.worldviz.com/attachment.php?attachmentid=737&stc=1&d=1449441164 close up

http://forum.worldviz.com/attachment.php?attachmentid=738&stc=1&d=1449441169 this is the osgb that looks sharp.

Veleno
12-11-2015, 01:33 PM
Hi lklab,
Unfortunately avatar materials do not currently support exporting unfiltered textures like you are using in your scene. You may be able to turn it on manually through code.

The checkerboard effect you are looking at is an artifact of multisampling alpha - a technique that prevents draw order artifacts. Normally this shouldn't be on in your model unless you've explicitly turned on GL_SAMPLE_ALPHA_TO_COVERAGE_ARB, but it's possible that it's being set by your graphics card.

For references, this is how you would normally turn it on, with higher sampling giving smoother results.

import viz

viz.setMultiSample(4)
#higher values increase quality but decrease framerate.
#usually set between 2 and 16

viz.go()

transModel = viz.add('model.IVE') #add a model, call it tranModel

GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = 0x809E
transModel.disable(viz.BLEND)
transModel.enable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB)

viz.clearcolor(viz.GRAY)