フィルターのクリア

Animate Color in Simulink 3D Animation

3 ビュー (過去 30 日間)
Tomas Gnevek
Tomas Gnevek 2011 年 4 月 1 日
Hi, I'm creating Robotic car painting station (Animation/Simulation), and I need to animate color change of car's body, but I can't check 'Color' node from VRML tree in VR Sink's parameters. Is it somehow possible to do that?
Thanks for answers.

回答 (3 件)

Jonathan Currie
Jonathan Currie 2011 年 5 月 5 日
Hi Tom, just came across the answer to this myself!
By default Simulink 3D cannot access a property without a name, which happens when you add a material. Simply open up the .wrl file and navigate to your shape:
appearance Appearance { material Material { }}
Noticing the material is currently empty, and without a name. Do the following to fix this:
appearance Appearance { material DEF LiqMat Material { }}
Where I have added a name LiqMat using DEF.
Best of luck!
  1 件のコメント
Yu Ang Tan
Yu Ang Tan 2011 年 10 月 7 日
It works! Thanks!

サインインしてコメントする。


Jonathan Currie
Jonathan Currie 2011 年 5 月 8 日
Note you can also change the name of a material within VRealm or Simulink's 3D Editor, in a similar way you can change transform names (click and wait).

Gianni
Gianni 2011 年 11 月 25 日
Sorry but for me does't work. Can you please tell me the error in my world? since I still can not select the box for the color because instead I have a black "x". I need to change the color of the last element "ContactForce" to see when is stick and when is slip. Thank you
#VRML V2.0 utf8
DEF Bar1 Transform {
children Shape {
geometry Cylinder {
height 1
}
appearance Appearance {
texture ImageTexture {
url "*sl3dlib/objects/Textures/General/Metal.jpg"
}
material Material {
diffuseColor 1 1 0.1
}
}
}
}
Viewpoint {
description ""
}
DEF Reel3 Transform {
children Shape {
geometry Sphere {
}
appearance Appearance {
texture ImageTexture {
url "*sl3dlib/objects/Textures/General/Brick_Small.jpg"
}
material Material {
}
}
}
}
DEF ContactForce Transform {
children [
DEF Shape Shape {
geometry Cylinder {
}
appearance DEF Apperance Appearance {
material DEF StickSlip Material {
shininess 0
diffuseColor 0.8 0.5 0.8
ambientIntensity 0
}
}
}
DEF SticSlip Color {
}
]
}

カテゴリ

Help Center および File ExchangeSimulation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by