Surface Bake Camera: Camera Tangent Space Buffer Render Errors

SA9R

New member
I was setting up an object with some more varied geometry to render its geometry to a normal map and uv map that to a lower resolution object.
The first image below shows the two pieces of geometry.
The second image shows the normal map generated and its uv mapping to the low resolution object.




image hosting

In the second image, there are olive-colored sections that did not render correctly to the camera tangent space for the normal map. And when it is the normal map is uv mapped to the low resolution object, there errors are easily visible.

Adjusting the Offset From Surface parameter in the Surface Bake Camera's property panel usually corrects this, but this time it makes no difference, whether set to 10mm or 10m, and both the Polygon Normal and Smoothed Normal settings for the Direction Reference parameter make no changes to the output either.

How would one correct the render errors in the camera tangent space buffer?
 
How would one correct the render errors in the camera tangent space buffer?
Try increasing the UV Border value first. This reduces the gaps between the UV islands. Since the render is simply expanded, this can of course also lead to artifacts. In addition, the extension must not extend into the neighboring UV island.

In the back of my mind I believe this is entered in pixels, but I could be wrong. :unsure:

ciao
Thomas
 
Increasing the UV Border value in the Surface Bake Camera options increased the problem; the render error area became larger. Negative values did not lessen the problem; they had no effect different from a zero value. The image below shows this:


mapbox polyline npm

I manually adjusted the UVs in Modeler, using the normal map as the background image, to cut out the render error areas. The method was tedious and the result is inaccurate, but it looks ok:



I think that this type of problem should not exist with an object as simple as a box. The manual adjustment has me feeling like a high-tech Aboriginal artisan. It does not seem ready for large production. Besides the manual UV adjustment makes it not accurate. Any other possible solutions besides manual UV adjustments?

@ Sensei Could you describe how your plug-in would fix the partially-working Surface Bake Camera in this case? The TrueArt plug-in has a UV Border parameter too, but I do not see how that would solve the problem if it has the same function as the current UV Border parameter in LW.
 
Last edited:
It worked fine with a flat, 2D piece of geometry... but not a box.

 
Last edited:
Increasing the UV Border value in the Surface Bake Camera options increased the problem; the render error area became larger. Negative values did not lessen the problem; they had no effect different from a zero value. The image below shows this:


mapbox polyline npm


I think that this type of problem should not exist with an object as simple as a box. The manual adjustment has me feeling like a high-tech Aboriginal artisan. It does not seem ready for large production. Besides the manual UV adjustment makes it not accurate. Any other possible solutions besides manual UV adjustments?
It's a bug in Lightwave. I tried many times to get them to fix it with example scenes and links to info to no avail.
Dev assigned did not understand, for whatever reason.
If on 2015.3 or lower, use Edge expand plugin to fix the edge padding issue. Turn off padding in the surface baking camera.
Edge Expand - walen.se
Direct link - https://docs.google.com/file/d/0B-2feV2NfYo6enVSOG40a2ZJTVk

I have put on render edges so you can see the padding, otherwise you would not see the expansion/padding transition (as it should be):

edge_expand_padding.JPG

As an alternative, you may wish to consider bly tools - LightWave Plugins and Tools which will bake with a user defined edge padding:

pb texture baker.JPG

Also, for normal map baking, there is xNormal which will do a good job of baking your normals with padding.
It also comes with a photoshop dilation filter, which will pad your renders, using the alpha channel as a guide.
Render with NO padding, save image out with alpha. In photoshop, add the alpha as a mask to the images base layer/group, apply mask to make image like in pic, apply dilation filter.
Before and after shown:

xnormal_dilation.JPG


Detailed info related to baking:
Texture Baking - polycount
 
Last edited:
I manually adjusted the UVs in Modeler, using the normal map as the background image, to cut out the render error areas. The method was tedious and the result is inaccurate, but it looks ok:



I think that this type of problem should not exist with an object as simple as a box. The manual adjustment has me feeling like a high-tech Aboriginal artisan. It does not seem ready for large production. Besides the manual UV adjustment makes it not accurate. Any other possible solutions besides manual UV adjustments?

Having a low poly version with hard 90 deg corners, baking a rounded high poly source model will not transfer the normals correctly at the corners. You need some angle there in the low poly to get the tangents right. See Texture Baking - polycount
 
@Chunder Will try that and post.

I just noticed that increasing the UV Border pixels did not correct the render error sections but allowed sections of correctly rendering normal map to be rendered that were not being rendered without the increased border pixels.
 
@Chunder Will try that and post.

I just noticed that increasing the UV Border pixels did not correct the render error sections but allowed sections of correctly rendering normal map to be rendered that were not being rendered without the increased border pixels.
Can you post the two objects to test them? I tested it with simple box objects and it works.

ciao
Thomas
 
Could you post screen shots of the simple box objects and the normal map renders?

Normal_bake_01.jpg

Normal_bake_02.jpg

The edges work perfectly. You can also see where the limits of normal maps are. The green-yellow areas (which also cause your errors) arise where no geometry is visible for the surface baking camera (the Z component, which is blue in the map, is missing). In my test, these are areas that cannot actually be visible in the normal map. You get other errors too. In my test, there were no problems with chamfered edges either.

It could be geometry errors (e.g. sometimes parts of the UV map of the lowpoly object are mirrored, which is not good for normal baking :)). So it would be interesting to look at your objects.

ciao
Thomas
 
Last edited:
@ Sensei Could you describe how your plug-in would fix the partially-working Surface Bake Camera in this case? The TrueArt plug-in has a UV Border parameter too, but I do not see how that would solve the problem if it has the same function as the current UV Border parameter in LW.
Batch Baking Camera is reproduction of Surface Baking Camera, with additional features (batch mode), and fixes presented on the video:
On the video I showed that the same object which has issues in SBC, has not them in BBC.

Batch Baking Camera does not use Surface Baking Camera.
 
Back
Top