WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Transparency issues in Viz5? (https://forum.worldviz.com/showthread.php?t=5040)

performlabrit 05-14-2014 05:35 AM

Transparency issues in Viz5?
 
Here is a snippet of code that produces different results in Viz4 and Viz5.

It works correctly in Viz4, producing a semi-opaque green box with 1 red side. In Viz5, it produces a black box (no transparency).

Quote:

self.standingBox = vizshape.addBox( boxSizeInfo,alpha = 0.7,color=viz.GREEN,splitFaces = True,back=True)
self.standingBox.disable(viz.CULL_FACE)

Jeff 05-16-2014 08:29 AM

Can you post a working example that shows the issue? I think some of your code is not showing up properly because of using the quote tags. Try using the code tags instead.

I'm not exactly sure what the issue you are seeing is. In Vizard 5, I've noticed if the alpha is set when creating the box the face set to red afterwards does not have the same alpha value as the rest of the box. To workaround this you can set the alpha later in the code:

Code:

import viz
import vizshape
import vizcam

viz.go()

standingBox = vizshape.addBox(size=[1,1,1],color=viz.GREEN,splitFaces = True,back=True)
standingBox.disable(viz.CULL_FACE)
standingBox.color(1,0,0,node='back')
standingBox.alpha(0.6)

vizcam.PivotNavigate()



All times are GMT -7. The time now is 01:47 AM.

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