Animate Color in Simulink 3D Animation

1 visualización (últimos 30 días)
Tomas Gnevek
Tomas Gnevek el 1 de Abr. de 2011
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.

Respuestas (3)

Jonathan Currie
Jonathan Currie el 5 de Mayo de 2011
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 el 8 de Mayo de 2011
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 el 25 de Nov. de 2011
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 {
}
]
}

Categorías

Más información sobre Animation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by