Copy link to clipboard
Copied
Hi, I'm trying to get an AO from my height map using AO (HBAO) node and it works fine except for the fact that on edges I'm getting this weird artefacting:
Which is strange as I can convert Normals abosultely fine from that same height map which is 16bit grayscale png:
Any ideas how to fix that? Thanks a lot in advance!
An alternative :
I notice your map is 2048 x 2048
So what you could try is :
Add a transform 2D node set to absolute at twice the resolution i.e. 4096 x 4096. Set the transform to /2 and offset to X 0.5 and Y -0.5 . That puts the original image in the lower left quarter
Follow that by a mirror greyscale X axis 0.5 This makes the new larger image tile horizontally (it already tiles vertically)
Then HBAO
Then a transform node set to absolute 2048 x 2048 (same as original image) and offset x -0.
...Copy link to clipboard
Copied
It is caused by the abrupt changes in height between the left/right edges on your height map. Your heightmap tiles perfectly top to bottom but not left to right.
Dave
Copy link to clipboard
Copied
Hi Dave thanks for clearing this up! I see, indeed after switching off tiling in both H and V directions I now got rid of those artefacts but have pixel-wide white lined on the edges instead..
Is there a way hoq to fight it?
Copy link to clipboard
Copied
The ideal way would be to start with a heightmap that tiles seamlessly both horizontally and vertically. That way you can leave tiling on in HBAO and let it do its thing. For some reason your heightmap tiles vertically without seams but not horizontally.
An alternative, if the heightmap cannot be made to tile seamlessly, would be to use the pixel processor to fill in the white edges from HBAO based on sampling adjacent pixels.
Dave
Copy link to clipboard
Copied
Yeah they don't tile horizontally because this height map is part of 4 different height maps so unfortunately I can't make it tileable in that direction.
Thanks for the advice, however I'm not too good with Pixel Processor, and don't even know how to sample those near-the-edge pixels and copy them in needed directions as you're suggesting. Is it possible to do it with some node(s) involved?
Copy link to clipboard
Copied
An alternative :
I notice your map is 2048 x 2048
So what you could try is :
Add a transform 2D node set to absolute at twice the resolution i.e. 4096 x 4096. Set the transform to /2 and offset to X 0.5 and Y -0.5 . That puts the original image in the lower left quarter
Follow that by a mirror greyscale X axis 0.5 This makes the new larger image tile horizontally (it already tiles vertically)
Then HBAO
Then a transform node set to absolute 2048 x 2048 (same as original image) and offset x -0.25 Y 0.25 that takes the output image from the lower left quarter
Dave
Copy link to clipboard
Copied
This sounds great I just have doubts that it will still be seamaless enough with those other 3 maps I have (this height map is part of 4 different height maps). But I will give it a try definitely, thanks a lot Dave!
Copy link to clipboard
Copied
As a final step you could combine the three maps in Photoshop and use the spot healing brush on the joins, before splitting them again.
Dave
Copy link to clipboard
Copied
oh transformation 2d changes resolution too?
Copy link to clipboard
Copied
@samuel_the_hamster Nodes can be set to inherit their pixel size from the parent graph, or from their input, or to an absolute setting which can be directly input
Dave
Copy link to clipboard
Copied
ye i know but can you change resolution from transformation 2d?
Copy link to clipboard
Copied
As I said in last post, any node can inherit or change pixel size, including transform 2D.
Dave