Author Topic: question to Matt about vector displacement  (Read 690 times)

Offline digitalguru

  • Member
  • *
  • Posts: 181
question to Matt about vector displacement
« on: July 15, 2016, 03:24:35 PM »
Hi Matt,

I wanted to render out a vector displacement map for the terrain for the tutorial I'd been making.

I had two Otrthographic cameras setup, one that covered the whole terrain - 8000 ortho width and another to sample a smaller region at 500 ortho width.

The 8000 version looks good, but the smaller region vector map is very aliased when using for displacement in Maya

65762-0

tried a few options, moving the camera closer to terrain, higher detail (4!), and various resolutions (up to 8k)

widening the ortho width and it gets better

I know the OpenExr output is 16bit and the aliasing is worse on smoother areas of the terrain (where you'd need 32bit float to sample gradient) but is there a limit on how small an area you can sample with the Displacement shader to vector?


Offline Matt

  • Planetside Staff
  • *
  • Posts: 2821
  • I'm the crazy one
Re: question to Matt about vector displacement
« Reply #1 on: July 16, 2016, 12:17:29 AM »
If there's a limit to how small you can go, I'm not sure what that would be. I'm surprised that there's stepping from the 16-bit EXR map. Can you load it into Nuke and see whether there's stepping in the raw data? It might be a Maya displacement problem.

Are you exporting displacement values 1:1, i.e. 1 metre of displacement = 1 in the EXR?

Matt
« Last Edit: July 16, 2016, 12:19:47 AM by Matt »
Just because milk is white doesn't mean that clouds are made of milk.

Offline digitalguru

  • Member
  • *
  • Posts: 181
Re: question to Matt about vector displacement
« Reply #2 on: July 16, 2016, 10:29:58 AM »
Hi Matt,

Yes, I can see the stepping very clearly in Nuke - see attached:
65783-0

(graded it a bit to clamp the values into an image)

Tried it both in Anrold and loading as displacement map in Mudbox - the effect is the same.

Dsiplacement value are always 1:1 - I never need to play with that, just make the plane to be displaced the same size as the region rendered out of TG.

I exported a .ter file of the same area using Heightfield generate and converted it into a 32bit with TerraConv and it looks ok compared to the VDM, which is probably the way to go in 90% of cases, but of course then you lose the advantage of vector displacements.
Terraconv:
65785-1

VDM:
65787-2

JUst thinking laterally, is there a way I could scale up a small region to a larger size temporarily just to export the VDM? i.e if I had a region  I liked 500 ortho width square - expand it out to say 10000 just to export a vector map?
« Last Edit: July 16, 2016, 10:36:21 AM by digitalguru »

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 11683
  • Holy snagging ducks!
Re: question to Matt about vector displacement
« Reply #3 on: August 10, 2017, 12:36:42 AM »
Try this with the new 32 bit EXR output when you get a chance...

- Oshyan

Offline digitalguru

  • Member
  • *
  • Posts: 181
Re: question to Matt about vector displacement
« Reply #4 on: August 10, 2017, 09:23:55 PM »
hey Oshyan,

Thanks for the info, that's great news, though I must confess I haven't bitten the bullet yet and upgraded to Terragen 4...

I guess the 32bit Exr ouput also applies to Render elements? Would be an advantage in some of the geometric elements like depth world position etc?

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 11683
  • Holy snagging ducks!
Re: question to Matt about vector displacement
« Reply #5 on: August 11, 2017, 06:53:11 PM »
Yes, precisely, 32 bit render elements and that can be helpful for depth, etc.

- Oshyan