Author Topic: Odd looking displacement  (Read 4025 times)

2017-10-10, 09:57:10

Jpjapers

  • Active Users
  • **
  • Posts: 1654
    • View Profile
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
« Last Edit: 2017-10-10, 11:22:16 by jpjapers »

2017-10-10, 11:06:25
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
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?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2017-10-10, 11:22:04
Reply #2

Jpjapers

  • Active Users
  • **
  • Posts: 1654
    • View Profile
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.

2017-10-10, 14:38:19
Reply #3

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
That texture is fine and it renders fine too, at least in my test scene. Maybe your geometry is f***ed somehow?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-10-10, 14:54:13
Reply #4

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
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?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-10-11, 11:36:10
Reply #5

Jpjapers

  • Active Users
  • **
  • Posts: 1654
    • View Profile
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

2017-10-11, 11:36:35
Reply #6

Jpjapers

  • Active Users
  • **
  • Posts: 1654
    • View Profile
I wonder if its a scale issue.

2017-10-11, 11:49:21
Reply #7

Jpjapers

  • Active Users
  • **
  • Posts: 1654
    • View Profile
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)

2017-10-11, 11:57:48
Reply #8

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
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))?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-10-11, 12:06:44
Reply #9

Jpjapers

  • Active Users
  • **
  • Posts: 1654
    • View Profile
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.

2017-10-11, 12:13:54
Reply #10

Jpjapers

  • Active Users
  • **
  • Posts: 1654
    • View Profile
Can confirm coronabitmap takes an inordinate amount of time to calculate displacement. Max bitmap loader is pretty much instant. Corona takes about 15 seconds.

2017-10-11, 12:20:18
Reply #11

Jpjapers

  • Active Users
  • **
  • Posts: 1654
    • View Profile
Subdividing had an undesirable effect and the shading error still persists.

2017-10-17, 12:52:17
Reply #12

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
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.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2017-10-17, 12:59:25
Reply #13

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
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).
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2017-10-17, 13:24:10
Reply #14

sprayer

  • Active Users
  • **
  • Posts: 794
    • View Profile
resaving in photoshop solved this issue, it's something with file or what photoshop add color profile