2
$\begingroup$

I've imported an .OBJ file to my scene and it looks good in viewport, but when I try to render with F12 it's completely black.

Clearing custom split normals data (in object data panel) removes black rendering issue, but also completely destroys the shading in viewport and render.

Is there a way to somehow retain the viewport like shading in render?

$\endgroup$
5
  • $\begingroup$ Can you upload screenshots/a .blend file to Blend Exchange? $\endgroup$
    – Shady Puck
    Commented Jul 2, 2016 at 12:50
  • 1
    $\begingroup$ Mesh has quite bad topology. I don't think it's possible to make the object smooth without retopologizing, like here. $\endgroup$
    – Mr Zak
    Commented Jul 2, 2016 at 15:44
  • $\begingroup$ The object is super smooth in viewport (because of CUSTOM split normals), but the problem is that for some reason those normals don't carry on to the rendered view. $\endgroup$ Commented Jul 2, 2016 at 16:40
  • $\begingroup$ I could retopologize but that model is actually only tiny fraction of my scene and it would take months from me to retopologize all. So I'm looking for another solution. Thanks for helping though! :) $\endgroup$ Commented Jul 2, 2016 at 18:45
  • $\begingroup$ I believe the sole purpose of those custom splitted normals are to avoid any retopology:( $\endgroup$ Commented Jul 2, 2016 at 18:50

2 Answers 2

4
$\begingroup$

You simply imported the mesh, and that is it. You have no lights in your scene. You (kind of) need a light to see your object. You also could use an hdr, but that is just complicating things unnecessarily.

For just a simple test render, or so you can see your object, a three point light setup will work (and make Gleb Alexandrov cringe).


You also need to turn off Auto Smooth for your object. There is something about the bad mesh (probably has to do with the normals) that is making auto smooth break.
Auto Smooth is found in the mesh tab of the properties window.
Auto Smooth setting

After the two changes I listed above, I rendered out your object like this.
rendered result

$\endgroup$
6
  • $\begingroup$ Disabling auto smooth is no option as it uses those custom split normals which make the shading work in viewport. $\endgroup$ Commented Jul 2, 2016 at 15:27
  • $\begingroup$ Also without any lights it should still render gray not black as the horizon is default gray. $\endgroup$ Commented Jul 2, 2016 at 15:28
  • $\begingroup$ @user27158 the black rendering is because of the auto smooth. $\endgroup$
    – David
    Commented Jul 2, 2016 at 15:29
  • $\begingroup$ Is there a way to somehow retain the viewport like shading in render? $\endgroup$ Commented Jul 2, 2016 at 15:33
  • $\begingroup$ @user27158 I have not used split normals, let along from an import. I do not know how to correctly display imported split normals. $\endgroup$
    – David
    Commented Jul 2, 2016 at 15:40
0
$\begingroup$

I don't know much about normals in Blender, but they look pretty weird in your file. Here's a section of your model, with a regular grid for comparison.
Normals
On yours, the vertex normals (dark blue) and face normals (light blue) are all pointing in, but the vertex-per-face normals (magenta) are facing out. On the grid, they're all pointing in the same direction (inside/outside-wise).

I don't know enough to say that it's wrong (I wouldn't have even posted this as an answer, but I couldn't figure out another way to attach the image). But it looks inconsistent.

$\endgroup$
3
  • $\begingroup$ the mesh on the left looks like it has duplicate faces, because it's impossible to have something like that.. $\endgroup$
    – user2816
    Commented Jul 2, 2016 at 17:54
  • $\begingroup$ No, they're not duplicate faces. If I select one and hide it, there's nothing behind it. Also, I deleted all of the faces except for 8. The number of faces, edges and vertices is exactly what it should be. The original mesh did have 390 duplicate vertices (out of ~1400), but removing them didn't change anything. $\endgroup$
    – Jabberwock
    Commented Jul 2, 2016 at 18:21
  • 1
    $\begingroup$ how can a vertex normal go both ways ? they should also follow the same direction like the face normal if they are planar but never the opposite. i'll download the file later because this is weird like you said $\endgroup$
    – user2816
    Commented Jul 2, 2016 at 18:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .