#1
|
|||
|
|||
Is it possible to have make my shapes have black borders?
I have a series of shapes either added from a 3ds file or generated. Can I have them display a black line over each of their wirelines? (a black contour)?
|
#2
|
|||
|
|||
Here is a sample script showing how to draw a black line over the wireframe of a model:
Code:
import viz import vizact viz.go() viz.clearcolor(viz.GRAY) frag_black = """ void main() { gl_FragColor = vec4(0,0,0,1); } """ shader_black = viz.addShader(frag=frag_black) def addWireOutline(node): node.wire = model.clone(parent=node) node.wire.polyMode(viz.POLY_WIRE,op=viz.OP_OVERRIDE|viz.OP_ROOT) node.wire.zoffset(op=viz.OP_OVERRIDE|viz.OP_ROOT) node.wire.apply(shader_black,op=viz.OP_OVERRIDE|viz.OP_ROOT) model = viz.addChild('ball.wrl',pos=(0,1.8,2)) addWireOutline(model) model.addAction(vizact.spin(0,1,0,90)) vizact.onkeydown(' ',model.wire.visible,viz.TOGGLE) |
#3
|
|||
|
|||
Thank you very much.
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Show Physics Shapes | bloswald | Vizard | 3 | 04-07-2010 03:16 PM |
How to make screen black? | Josh | Vizard | 1 | 04-02-2010 12:30 PM |
How to make character animation sequence | wchoi | Vizard | 3 | 01-22-2010 08:35 AM |
cinematic fade to black? | billjarrold | Vizard | 4 | 12-23-2009 11:09 AM |
black outs | enkeli | Vizard | 4 | 05-09-2006 12:05 PM |