Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: Jpjapers on 2017-10-10, 09:57:10

Title: Odd looking displacement
Post by: Jpjapers on 2017-10-10, 09:57:10
Im having an issue with displacement.
Its really rough and jagged for some reason. The map im using for displacement is a high res png file so i dont know why this is happening.
Ive tried setting the screen space units to 1px but it still looks jagged.

Thanks
J
Title: Re: Odd looking displacement
Post by: maru on 2017-10-10, 11:06:25
Does it looks like this in IR only, or also when rendered normally?
What is the expected look?
Can you share the scene, or at least the displacement map?
Title: Re: Odd looking displacement
Post by: Jpjapers on 2017-10-10, 11:22:04
Does it looks like this in IR only, or also when rendered normally?
What is the expected look?
Can you share the scene, or at least the displacement map?

Its in a normal render,
Disp map attached.
Title: Re: Odd looking displacement
Post by: romullus on 2017-10-10, 14:38:19
That texture is fine and it renders fine too, at least in my test scene. Maybe your geometry is f***ed somehow?
Title: Re: Odd looking displacement
Post by: romullus on 2017-10-10, 14:54:13
On the other hand, there must be something wrong with your png - with Corona bitmap it takes 10 times longer to calculate displacement than with native bitmap loader. Can i use your texture to report this behaviour on mantis, because i can't replicate that issue with my textures?
Title: Re: Odd looking displacement
Post by: Jpjapers on 2017-10-11, 11:36:10
Yeah sure no problem, I only just saw your message.
The geometry is literally a plane with three segments and i raised the middle poly up by 5mm
Title: Re: Odd looking displacement
Post by: Jpjapers on 2017-10-11, 11:36:35
I wonder if its a scale issue.
Title: Re: Odd looking displacement
Post by: Jpjapers on 2017-10-11, 11:49:21
Ive remade my geometry in a fresh scene, all seems to be fine now although the edges are a little jagged which is to be expected with displacement i guess. I have no displacement calculation problem like you have. Although i do have a weird shading issue where the middle strip of the displacement map renders strangely (see attached)
Title: Re: Odd looking displacement
Post by: romullus on 2017-10-11, 11:57:48
That shading error could be because adaptive displacement allocates very few triangles on completely flat surfaces. You can check that by assigning CoronaWire map to diffuse slot. Subdividing geometry before displacement could help to fight that.

I have no displacement calculation problem like you have.

That's strange, can you confirm that the same texture that you've attached few posts earlier does not increase geometry preparation times drastically if loaded through CoronaBitmap with default filtering settings (bulr - 1, interpolation - bilinear (faster))?
Title: Re: Odd looking displacement
Post by: Jpjapers on 2017-10-11, 12:06:44
That shading error could be because adaptive displacement allocates very few triangles on completely flat surfaces. You can check that by assigning CoronaWire map to diffuse slot. Subdividing geometry before displacement could help to fight that.

I have no displacement calculation problem like you have.

That's strange, can you confirm that the same texture that you've attached few posts earlier does not increase geometry preparation times drastically if loaded through CoronaBitmap with default filtering settings (bulr - 1, interpolation - bilinear (faster))?

Same texture but max bitmap loader. Ill test with Coronabitmap.
Title: Re: Odd looking displacement
Post by: Jpjapers on 2017-10-11, 12:13:54
Can confirm coronabitmap takes an inordinate amount of time to calculate displacement. Max bitmap loader is pretty much instant. Corona takes about 15 seconds.
Title: Re: Odd looking displacement
Post by: Jpjapers on 2017-10-11, 12:20:18
Subdividing had an undesirable effect and the shading error still persists.
Title: Re: Odd looking displacement
Post by: maru on 2017-10-17, 12:52:17
I think all of this is rather expected because of steep edges in the displacement map.
I used gaussian blur with 2px value in PS, and here is the result.
Title: Re: Odd looking displacement
Post by: maru on 2017-10-17, 12:59:25
Further investigation reveals why displacement calculations are so slow with CBitmap (but only if it's set to bilinear interpolation). I am not really sure why this is happening, since the white area of the bitmap seems to have 255 white everywhere when checked in PS. This is easy to fix using an output node (clip darkest and brightest areas).
Title: Re: Odd looking displacement
Post by: sprayer on 2017-10-17, 13:24:10
resaving in photoshop solved this issue, it's something with file or what photoshop add color profile