# Using wrl data in Cycles

I'm importing .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.

• maybe if you could upload a representative .wrl I could provide a nicer answer. – zeffii Aug 12 '13 at 9:12
• I've tried the answer suggested by @zeffii but I could not get it to work. I'm attaching and example, which could be found here: s000.tinyupload.com/?file_id=03936112909451894934 – Mercury Aug 23 '13 at 16:26
• i've updated my answer. – zeffii Aug 23 '13 at 16:40

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.

### steps

1. Import the .wrl as normal

2. 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

3. Add an attribute node, and write 'Col' (without quotes) into it as in the picture.

4. Hook up the output of the Attribute node, to the colour input of the Diffuse BSDF node.

• Can you provide step by step instructions how to do it? – Mercury Aug 23 '13 at 16:44
• sure, give me a few minutes – zeffii Aug 23 '13 at 16:45