PDA

View Full Version : Transparency issues in Viz5?


performlabrit
05-14-2014, 05:35 AM
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).


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:

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()