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.
-
$\begingroup$ maybe if you could upload a representative .wrl I could provide a nicer answer. $\endgroup$– zeffiiAug 12, 2013 at 9:12
-
$\begingroup$ 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 $\endgroup$– MercuryAug 23, 2013 at 16:26
-
$\begingroup$ i've updated my answer. $\endgroup$– zeffiiAug 23, 2013 at 16:40
1 Answer
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
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 NodesAdd 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.
-
$\begingroup$ Can you provide step by step instructions how to do it? $\endgroup$– MercuryAug 23, 2013 at 16:44
-