.wrl data from matlab that I would like to display. When I'm using the Blender render, I can see the colors as I wanted ( the object already has a material when imported). But when I switch to cycles render (since it produces "nicer" results), my colors disappear.
is there is away to use the cycles render with the imported colors? or how can I make the render look like the cycles render, when sing the blender.
The material provided by your importer may need a small adjustment to display the 'vertex_colors' layer when you switch over to Cycles Render engine.
Ideally you should be able to import the .wrl while already in Cycles Render engine and let the importer set up the material correctly -- but at present this is not the case.
A solution is to add an
Attribute Node to the Cycles material Node Tree and write
Col into the name field. This won't display properly in texture mode, you must set the viewport shading to Rendered, or currently you will only see black.
- Import the .wrl as normal
Create a node material for the object,
2a. With the object selected, open a Node Editor
2b. set the Node Tree view type to Material
2c. Tick the box labelled Use Nodes
Add an attribute node, and write 'Col' (without quotes) into it as in the picture.
- Hook up the output of the Attribute node, to the colour input of the Diffuse BSDF node.