• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

AO gets weird artefacts on edges

Community Beginner ,
May 26, 2023 May 26, 2023

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:

Nitroleum_0-1685165471413.png

 

Which is strange as I can convert Normals abosultely fine from that same height map which is 16bit grayscale png:

front_height.png

 

Any ideas how to fix that? Thanks a lot in advance!

 

 

 

TOPICS
How to

Views

208

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 28, 2023 May 28, 2023

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.

...

Votes

Translate

Translate
Community Expert ,
May 27, 2023 May 27, 2023

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

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 27, 2023 May 27, 2023

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..

Nitroleum_0-1685191199656.png

Is there a way hoq to fight it? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 27, 2023 May 27, 2023

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 27, 2023 May 27, 2023

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? 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 28, 2023 May 28, 2023

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

2023-05-28_11-58-36.jpg

 

Dave

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 30, 2023 May 30, 2023

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 30, 2023 May 30, 2023

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 30, 2023 May 30, 2023

Copy link to clipboard

Copied

oh transformation 2d changes resolution too? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 30, 2023 May 30, 2023

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 30, 2023 May 30, 2023

Copy link to clipboard

Copied

ye i know but can you change resolution from transformation 2d?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 30, 2023 May 30, 2023

Copy link to clipboard

Copied

LATEST

As I said in last post, any node can inherit or change pixel size, including transform 2D.

Dave

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines