#How to use POM Shader Graph for more realistic

1 messages · Page 1 of 1 (latest)

bright halo
#

How to solve it... Idk

bright halo
#

How to use POM Shader Graph for more realistic

mellow epoch
#

You're not doing any vertex displacement here.

#

You need to modify the vertex position

bright halo
mellow epoch
#

Also share your height map

bright halo
#

If i turn on shaded wireframe

bright halo
mellow epoch
#

This doesn't seem like a height map to me

#

Or at least, it's not gonna produce the effect that you expect

#

The deeper parts need to be darker.

#

But it doesn't seem like it's applied to your mesh properly as well.
Possibly due to uv/tiling/offset or LOD settings.

#

I'd try removing these to make sure you don't mess them up in the material

#

And set the normal vector space to object.

#

Then try playing with the displacement multiply parameter(make sure all 3 vector components are set to the same value). Try setting it to 1-10 and see if there is any difference.

bright halo
mellow epoch
#

Not entirely sure what's going on with the cube. Perhaps it doesn't have enough vertices. Or the height texture is not applied to it.

bright halo
#

It's the same material with same textures

mellow epoch
mellow epoch
# bright halo If i turn on shaded wireframe

Looking at the wireframe here it does look pretty bad. If it was uniform/grid-like it would have been better, but if the toplogy is gonna be like that, you need more triangles.

bright halo
#

So, just find right triangle size?

mellow epoch
bright halo
#

But why if heightmap ok, it's so crooked

mellow epoch
bright halo
#

It's just getting smaller

mellow epoch
bright halo
mellow epoch
bright halo
mellow epoch
#

And get rid of this bullshit

#

Start simpler.

#

There are so many factors that could be breaking stuff

bright halo
#

Connected just DisplacementMultiply, and it's broked now, so this part is ok

mellow epoch
#

broked?

bright halo
#

Just changing texture position

mellow epoch
#

Changing how?

bright halo
#

Just texture, no mesh changing. If get closer it's disappeard

mellow epoch
#

Well, that doesn't sound correct, though it's hard to say without seeing it.

bright halo
#

If i get closer - 3rd image

mellow epoch
#

So it displaces the whole face? What does the wireframe look like?

#

What does the shader look like at this point?

bright halo
#

If i set 1,1,1 to version before

mellow epoch
# bright halo

What's does the shader look like at this point? What are the material settings at this point?

bright halo
mellow epoch
#

Again, set shape factor to 0

#

And share what the shader looks like.

bright halo
mellow epoch
#

This is not the shader.

bright halo
mellow epoch
#

The shader graph.

bright halo
mellow epoch
# bright halo

Connect the final displacement back, make sure that vector normal is set to object space, make sure the LOD is set to 0.

bright halo
#

For TessellationFactor Normal Vector and View Direction to object space too?

mellow epoch
bright halo
#

This to tessellation displacement

mellow epoch
#

Is the height map not assigned?

bright halo
#

Just normal vector * multiplier

mellow epoch
#

Well, that's not what I suggested.

#

I realized this I didn't attach this image earlier...

bright halo
#

1,1,1 here's

mellow epoch
#

Try making the triangle size smaller

bright halo
#

Already

mellow epoch
#

Then increase the tesselation factor to something like 30. And decrease displacement multiply to 0.2, so that it's not making such drastic changes.

bright halo
mellow epoch
#

Okay... Can you assign the height map to the albedo/base color as well? I want to see if the displacement is aligned with the heightmap.

bright halo
mellow epoch
#

Hmm... Doesn't seem to be aligned at all

bright halo
#

Yeah...

mellow epoch
#

Can you apply just the uv channel to the base color?

bright halo
mellow epoch
#

No no. I mean sample the texture with uv0

#

Disconnect the uv input on the base color texture sample

bright halo
mellow epoch
#

Hmm... Still does not align at all... Are you sure the same texture is applied to the hight map?

bright halo
mellow epoch
#

Okay.
I'm off to sleep now. Will try it out myself in the morning.

bright halo
#

Okay, good night

bright halo
#

Hi, new thoughts?

mellow epoch
#

Yes. So, basically, it's a combination of issues:

  • tesselation having a limit on the amount of triangles.
  • tesselation producing a non inoform grid topology.

You can see in the screenshots with max tesselation, there are many triangles that overlap crevices and vertices not aligning with where the displacement should have the most effect. Thinking about it, it's totally normal for tesselation, as it's based on triangles and not quads.

bright halo
#

I mean like bricks, that will complete each other on sides edges

#

Like this

#

Or this

mellow epoch
#

Yeah, not really. It doesn't seem like tessellation is good for this situation. It would be a kit easier to create a custom high poly mesh in blender instead.

bright halo
#

what about for cube, not the mesh

mellow epoch
#

Cube is a mesh

#

It's just a very simple one.

bright halo
#

i know

bright halo
solemn summit
#

The closest you'll get is indeed a tesselation shader, with a high tesselation factor (to have enough mesh density).
But with a simple cube mesh you'll probably end with holes in the corners because the geometry is pushed in two different directions.
You could make some more complex solutions to cover the holes there by warping the tesselation offset, but it might distording the UVs ...

The easiest workaround is to use a flat plane with tesselation for most of the wall, but a dedicated geometry to cover up the corners.

#

You can also use the less expensive POM effect in the pixel shader for the flat part.

mellow epoch
#

Yeah, to put it simply, there's not enough triangles for the topology of that heightmap. Here I've maxed the tessellation and changed the texture tiling to 0.2 and it looks okayish, but there is still an issue at the edges just like Remmy pointed out.
Besides, that much tesselation(6x the recommended max value), would probably kill performance entirely in a little bit more complicated scene.
If you want an image like the one you shared(#1403785533007597568 message), the best approach would be to make a custom mesh for it. No one does it via tessellation. It's simply an overkill for something that can be achieved so easily with other means.