2

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?

G. Ishikawa
  • 43
  • 1
  • 5
  • Can you upload screenshots/a .blend file to Blend Exchange? – Shady Puck Jul 02 '16 at 12:50
  • 1
    Mesh has quite bad topology. I don't think it's possible to make the object smooth without retopologizing, like here. – Mr Zak Jul 02 '16 at 15:44
  • 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. – G. Ishikawa Jul 02 '16 at 16:40
  • 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! :) – G. Ishikawa Jul 02 '16 at 18:45
  • I believe the sole purpose of those custom splitted normals are to avoid any retopology:( – G. Ishikawa Jul 02 '16 at 18:50

2 Answers2

4

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

David
  • 49,291
  • 38
  • 159
  • 317
0

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.

Jabberwock
  • 883
  • 10
  • 21
  • the mesh on the left looks like it has duplicate faces, because it's impossible to have something like that.. –  Jul 02 '16 at 17:54
  • 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. – Jabberwock Jul 02 '16 at 18:21
  • 1
    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 –  Jul 02 '16 at 18:26