Bump area VERY narrow

Started by Dune, October 27, 2019, 03:26:33 am

Previous topic - Next topic

Matt

Different renders have different ways of handling this. There isn't one "correct" way to do it, but there are ways, and I plan to implement one of these soon.
Just because milk is white doesn't mean that clouds are made of milk.

KyL

I did a bit of research on the subject and I realized I wasn't aware of how common this problem is in rendering. I found a paper explaining the reason and implementation for a fix and it all makes sense now.

For the curious out here: http://www.aconty.com/pdf/bump-terminator-nvidia2019.pdf

Matt

October 27, 2019, 08:43:04 pm #17 Last Edit: October 27, 2019, 08:53:13 pm by Matt
Yeah, that's one of the papers I have in my notes. The other one is this: https://www.yiningkarlli.com/projects/shadowterminator.html

I plan to try out both of these. But I think the faceted appearance is a separate issue.
Just because milk is white doesn't mean that clouds are made of milk.

Dune

Interesting find, KyL, thanks for that! And thanks for diving into this, Matt. I hope you can resolve the issue (and not only in PT). As said the model was quite dense in polys, even more so than my usual models, and I have to rely on bumping them.

WAS

Why do we keep saying bump mapping? Terragen has no Bump Mapping / Normal Mapping. It's only displacement. Real dispalcement. Bump / Normals is simulating displacement through normal shadows / and normal highlights.

bobbystahr

Quote from: WAS on October 28, 2019, 12:45:27 pmWhy do we keep saying bump mapping? Terragen has no Bump Mapping / Normal Mapping. It's only displacement. Real dispalcement. Bump / Normals is simulating displacement through normal shadows / and normal highlights.
Uh, not true...TG, on imported objects, only Bump Maps not displaces Jordan.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

WAS

Quote from: bobbystahr on October 28, 2019, 02:28:34 pm
Quote from: WAS on October 28, 2019, 12:45:27 pmWhy do we keep saying bump mapping? Terragen has no Bump Mapping / Normal Mapping. It's only displacement. Real dispalcement. Bump / Normals is simulating displacement through normal shadows / and normal highlights.
Uh, not true...TG, on imported objects, only Bump Maps not displaces Jordan.

Bump Mapping / Normal Mapping is a way to simulate displacement via lighting. It doesn't modify the shape in any way. There is no displacement. This is clearly displacement, and just that.

With that said, Terragen has never been able to read Normal Maps to even achieve this, Bobby.

This is why I showed the technique to convert bump maps to displacement via software that does read the normal mapping.

Hannes

October 29, 2019, 01:47:16 pm #22 Last Edit: October 29, 2019, 02:01:15 pm by Hannes
No, Jordan. By default TG uses bump for imported objects (although you plug a shader into the "displacement" slot). If you want real displacement on objects, you have to set the render method to "force displacement".
But maybe you mean the displacement on the terrain?

Hannes

Ugly example. The first image uses bump mapping, the second one displacement. Absolutely the same settings, except the render method.

WAS

October 29, 2019, 02:21:18 pm #24 Last Edit: October 29, 2019, 02:45:03 pm by WAS
Ugh. Come on, Hannes...

You can clearly see the geometry is altered because it's not actually normal mapping / bump mapping...

This has been a looooooong asked for feature of Terragen and hasn't been implemented as far as I know. Providing TG a normal map will not give you accurate bump results, it's not RGB channels. They need to be converted from 360 lighting.

https://planetside.co.uk/forums/index.php/topic,17559.msg170385.html#msg170385

Again, bump / normal mapping is trick of light. It's very fake. Which may be why Matt hasn't implemented it.

And a Bump Map is a Normal Map, so if there is no normal mapping, there is no bump mapping. There is displacement. And if you're trying to use a Normal for displacement, it should inherently be converted to Depth / Displacement Mapping.

Which brings us back to
Quote from: WASWhy do we keep saying bump mapping?

WAS

Here's an example of using a normal/bump as displacement vs using the same normal converted to displacement. We're using Fabric31 from cc0textures: https://cc0textures.com/view.php?tex=Fabric31

I probably should have increased size but I wanted you to see what happens with a normal map repeating and trying to be read by Terragen with ray tracing.

Not only is the result simply wrong, we get artifacting because channels read on the seams of the normal are not read correctly.

Not only this, but the normal map renders twice as long as the converted map which finishes rendering before the first, normal mapped one.

WAS

Another example with the texture zoomed... which one is jagged, and trying to interpret the bump from mixed channeled colours, and which is smooth and carpety....

Matt

October 29, 2019, 04:54:22 pm #27 Last Edit: October 29, 2019, 04:58:04 pm by Matt
Jordan,

From the Wikipedia page on bump mapping: "There are two primary methods to perform bump mapping. The first uses a height map for simulating the surface displacement yielding the modified normal. This is the method invented by Blinn[2] and is usually what is referred to as bump mapping unless specified."

Terragen uses the kind of bump mapping described above in situations where it can't use displacement. Hannes was demonstrating that the left sphere uses bump mapping by showing that it is different from the right sphere which uses displacement. He did this to show that Terragen does bump mapping.

Also from the Wikipedia page: "The other method is to specify a normal map which contains the modified normal for each point on the surface directly. Since the normal is specified directly instead of derived from a height map this method usually leads to more predictable results. This makes it easier for artists to work with, making it the most common method of bump mapping today.[3]"

This second method (normal mapping) is not supported by Terragen 4.4 but will be in future.
Just because milk is white doesn't mean that clouds are made of milk.

WAS

October 29, 2019, 05:00:31 pm #28 Last Edit: October 29, 2019, 05:14:45 pm by WAS
Both methods very clearly describe the same end results, not effecting geometry, by simulating the lighting via normals. Both results yield the same non-edited geometry (the sphere is still smooth as well as the casted shadow)

In TG it's creating displacement, which is seen along the object, and in the shadows.

Which results in weird looking objects it seems, especially with light interaction. At which point does this become displacement, and not simulated bumpiness of light? The height map method says it's used to get the normals, for the lighting. Not using it for actual physical displacement.

You can clearly see in my examples, one has a hard time with TG's lighitng, and one is smooth more correct. I imagine because instead of simulating lighting, it's just displacement with actual object lighting. The other is proper displacement for TG to handle (smooth one). It's a ray traced TGO sphere.

Matt

Quote from: WAS on October 29, 2019, 05:00:31 pmBoth methods very clearly describe the same end results, not effecting geometry, by simulating the lighting via normals. Both results yield the same non-edited geometry (the sphere is still smooth as well as the casted shadow)

Yes.

QuoteIn TG it's creating displacement, which is seen along the object, and in the shadows.

If you see the silhouette of the object change, this is displacement. In Terragen that will happen with displaceable objects. That was Hannes's sphere on the right. But Hannes's sphere on the left was just bump mapping.

QuoteWhich results in weird looking objects it seems, especially with light interaction.

Yeah, that is the main problem with bump mapping.

QuoteAt which point does this become displacement, and not simulated bumpiness of light? The height map method says it's used to get the normals, for the lighting. Not using it for actual physical displacement.

Correct, bump mapping just changes the normals for lighting. This is what Hannes's left sphere shows.
Just because milk is white doesn't mean that clouds are made of milk.