WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Color (https://forum.worldviz.com/showthread.php?t=5112)

roobert 07-25-2014 03:39 PM

Color
 
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

Code:

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/comm...de3d/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.


All times are GMT -7. The time now is 09:27 PM.

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