Animate Color in Simulink 3D Animation
조회 수: 1 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (3개)
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!
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).
댓글 수: 0
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 {
}
]
}
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Animation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!