PDA

View Full Version : Color


roobert
07-25-2014, 03:39 PM
Can I change the color of the models that add in vizard?
example.
The box.wrl has Vizard is red, if I want change color How I do?

model1=viz.add('box.wrl')
model1.CHANGECOLOR(green)

:confused::rolleyes:

Frank Verberne
07-26-2014, 01:19 AM
model1.color(viz.GREEN)
Would do the trick. You can also use RGB values for all the colors that you would like, see http://docs.worldviz.com/vizard/commands/node3d/color.htm.

roobert
07-26-2014, 08:04 AM
Frank Verberne.
not working your code or tell me the error

viz.go()
viz.setMultiSample(4)
viz.fov(60)
viz.clearcolor(viz.SKYBLUE)

edificio=viz.addChild('model/ID_1.dae',pos=[0,0,0])
edificio.color(viz.GREEN)

Result:
http://bit.ly/1mPIpCY

roobert
07-26-2014, 08:22 AM
This my result:
http://bit.ly/1mPIpCY

Frank Verberne
07-26-2014, 12:45 PM
The code should work for the box.wrl that comes with Vizard. I don't anything about your collada model, so perhaps an exporting issue? Check this knowledge base for more information about importing collada models in Vizard: http://kb.worldviz.com/articles/1413. The answer to your other scale question is also on that page.