![]() |
|
#6
|
|||
|
|||
|
Yes, you will need to use the generateEffects command on that model. Here's an example:
Code:
import viz
import vizfx
import vizcam
import vizshape
viz.setMultiSample(4)
viz.go()
viz.clearcolor(viz.SLATE)
# Disable head light
viz.MainView.getHeadLight().disable()
# Add a directional light pointing down
light = vizfx.addDirectionalLight(euler=(0,90,0), color=[0.2,0.2,0.2])
shape = vizshape.addPyramid(base=(0.4,0.4),height=0.4)
composer = vizfx.getComposer()
shape.generateEffects(composer=composer)
cam = vizcam.PivotNavigate(distance=3.5)
cam.centerNode(shape)
code = '''
Effect {
Type Highlight
Shader {
BEGIN FinalColor
gl_FragColor.rgb += vec3(0.7, 0.0, 0.0);
END
}
}
'''
effect = viz.addEffect(code)
shape.apply(effect)
|
| Tags |
| effects, object, post process, shader |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Crosshatch Post-Processing Effect give away | Vaquero | Vizard | 0 | 08-03-2016 10:48 PM |
| anaglyph effect at front view of cave | g.vannan | Vizard | 1 | 02-03-2015 06:29 AM |
| retrieve Object names | Geoffrey | Vizard | 11 | 12-11-2009 05:26 AM |
| importing a single WRL with many objects. | giancamati | Vizard | 3 | 12-18-2006 02:13 PM |
| rotate to object | jargon | Vizard | 1 | 08-08-2005 01:20 PM |