Jump to content

Unwrap render / baking shows artifacts


Recommended Posts

Hello all,

i recently investigated in rendering lightmaps in Houdini. I liked the mantra -u option, but, after some testing, came across some limitations:

When the surface is being deformed (I am not using displacement) to a certain extent, black spots become visible, similiar to dicing errors in normal renders. However, changing the dicing option in the geometry has no effect. If I render everything with flat geometry there are no errors. I have vertex UV attributes with no overlapping UVs.

I have attached an example hip file as I have totally ran out of ideas how to fix this.

You can disable the mountain SOPs and the render should be without artifacts. I suggest this could have something to do with the camera, but I do not know.

I would be very greatful if somebody could shed some light on this - I am clearly doing something wrong here.

Thanks

Johann

bake_lighting.hipnc

post-2910-1233924217_thumb.jpg

post-2910-1233924233_thumb.jpg

Edited by jwoelper
Link to comment
Share on other sites

To quote myself, I found out that these artifacts are dependent on the current perspective camera.

If I look at the scene loosely from the top (in the direction of the negative y-axis) the artifacts disappear. If I tilt the view, they appear again. Should'nt the render be independent of the scene camera? At least, I did specify /obj/cam1 as camera in the mantra output node...

Could this be a bug?

(I am still under 9.1.244 here, will test this with 9.5.x)

Cheers

Johann

Hello all,

i recently investigated in rendering lightmaps in Houdini. I liked the mantra -u option, but, after some testing, came across some limitations:

When the surface is being deformed (I am not using displacement) to a certain extent, black spots become visible, similiar to dicing errors in normal renders. However, changing the dicing option in the geometry has no effect. If I render everything with flat geometry there are no errors. I have vertex UV attributes with no overlapping UVs.

I have attached an example hip file as I have totally ran out of ideas how to fix this.

You can disable the mountain SOPs and the render should be without artifacts. I suggest this could have something to do with the camera, but I do not know.

I would be very greatful if somebody could shed some light on this - I am clearly doing something wrong here.

Thanks

Johann

Link to comment
Share on other sites

To quote myself, I found out that these artifacts are dependent on the current perspective camera.

If I look at the scene loosely from the top (in the direction of the negative y-axis) the artifacts disappear. If I tilt the view, they appear again. Should'nt the render be independent of the scene camera? At least, I did specify /obj/cam1 as camera in the mantra output node...

Could this be a bug?

(I am still under 9.1.244 here, will test this with 9.5.x)

Cheers

Johann

I think the issue might be that in your shader, there's a "frontface()" call. This flips the normal so that it's pointing toward the camera.

Which means that the "front" of the surface will be shaded (not the back) - the part of the surface that's visible to the camera.

When unwrapping, the frontface() function can "flip" the normal to be pointing the wrong way.

So, as the position/orientation/view of the camera changes, the black patches would also change (since different parts would be front-facing).

I think the easiest solution would be to change the shader so that the frontface call is eliminated.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...