0
$\begingroup$

I am trying to create a label mask for these objects: Image Labels

I am rendering models of the objects in Blender, but the problem is the lighting. I tried using a point lamp or a hemi lamp, but both give shadows, so that the cubes actually look 3D, which makes sense. I tried deleting the light source but then my cubes are just all black, which also makes sense, but is not what I need.

enter image description here

How can I render my cubes to have only one color for every side?

EDIT: @martins answer solves my problem with the different colors, but now the edges are blurry. How could I fix that?

enter image description here

$\endgroup$
  • $\begingroup$ have you tried with an Emission node instead of a Diffuse? $\endgroup$ – moonboots Aug 31 '18 at 13:11
  • $\begingroup$ I'm totally new to blender and don't know what that is, I can try it but do you mean to apply it to a light source or the the cube materials? $\endgroup$ – Hakaishin Aug 31 '18 at 13:14
  • $\begingroup$ Awesome this nearly solves my problem, now I only need to make the pixels between the cubes only one or the other color. But I'm not sure how to phrase this question $\endgroup$ – Hakaishin Aug 31 '18 at 13:20
  • $\begingroup$ Anti-aliasing is a good thing for masks. Actually I would recommend rendering only red green and blue (RGB(1,0,0), RGB(0,1,0) and RGB(0,0,1)) colors so you can use RGB channels as anti-aliased masks. $\endgroup$ – Martynas Žiemys Aug 31 '18 at 14:59
  • $\begingroup$ It might be a good thing for masks, but I'm not sure the neural network I'm trying to use can handle that. But thank you for the term, now I can try to find out how to turn off antialliasing $\endgroup$ – Hakaishin Aug 31 '18 at 15:06
1
$\begingroup$

You can use emission shaders in Cycles:

Emission Shaders

or shadless material in Blender Render:

Shadeless

$\endgroup$
  • $\begingroup$ I used the emission property with success, but the edges are still blurred and not sharp like I need them, I will make an edit with a screenshot it's the easiest. Thank you for your edit and answer :) $\endgroup$ – Hakaishin Aug 31 '18 at 13:31
  • $\begingroup$ It's not a property, its a shader. Shaders have properties. Emission shader in Cycles has color property and strength property. Terminology is very important here as words that are synonyms in natural language may mean completely different things in 3d. It pays off to make an effort to use the terminology correctly. $\endgroup$ – Martynas Žiemys Aug 31 '18 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.