Darrell Kuykendall
Darrell Kuykendall

Reputation: 21

Wavefront (OBJ) Surface Rendering Issue

I have some Wavefront (OBJ) files that I've created for molecular simulations. All models in the file were created exactly the same way. However, some of them have an odd transparency (best word I can find to describe it) to them when opened in some editors (motionVFXs mObject and some versions of Maya, for example). I've poured through docs and forums and can't find an answer. If I export the .obj as .dae (or convert the original .obj any number of ways), the problem persists. Am I missing something simple?

You can see this in the screenshot:

img

Both the blue model and the big white model should be rendering the same (except for color) as, as far as I can tell, all settings are identical. Any help is greatly appreciated!

I posted links to the original files in the comments (I don't have 10 rep, yet).

Upvotes: 2

Views: 127

Answers (1)

kartikg3
kartikg3

Reputation: 2620

The normals for the second blob is reversed. This causes renderers and viewports to interpret the blob as being "inside-out".

All you have to do to fix it is:

  1. Import it into Maya
  2. Select the blob
  3. Switch to "Polygons" menu-set.
  4. In the menu, select Normals -> Reverse Normals.
  5. Export the obj again.

If you are curious to actually see the normals, select the blob and in the menu click Display -> Polygons -> Show Face Normals. Do the same to turn it off again.

[Edit by Spektre] Yes you're right the normals are reversed for one model

Here screenshot from my obj loader (without materials) with normals rendered (the green lines):

example

One model is OK (normals pointing out) and the second is wrong (the lines are not visible instead just dots) messing with the rendering. If you cant fix it you can also turn off face culling (but that affects performance a bit)

Upvotes: 1

Related Questions