Animate Color in Simulink 3D Animation

3 次查看(过去 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.

回答(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!

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 CenterFile Exchange 中查找有关 Simulation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by