@@ -3,41 +3,36 @@ title: Triplanar with Deep Parallax in Godot
33type : tech
44---
55
6- I don't think this is going to be that useful in most games. Triplanar mapping
7- is already expensive, and multiplying that by the samples for paralax occlusion
8- mapping is probably a bad idea .
6+ Triplanar mapping is already expensive, and multiplying that by the samples for
7+ paralax occlusion mapping is probably a bad idea. It was fun to implement this
8+ anyway, even if I don't use it in a game .
99
1010In my current WFC prototypes, I'm re-using models and rotating them. At some
1111point I'll need to handle also transforming the UVs based on the rotation of
12- the tiles' models, but for now triplanar can help me with look development.
12+ the tiles' models, but for now triplanar mapping is a quick way to get an idea
13+ of how things might look.
1314
14- I want to use heightmaps to add details without extra geometry. While modern
15- game engines and hardware can handle an insane number of triangles, my workflow
16- for creating models that tile perfectly cannot .
15+ I want to use heightmaps to add details without extra geometry. The concern is
16+ mostly on my workflow, not on performance. I'm simply too lazy to model that into
17+ my modules in a tileable way .
1718
1819The effect is turned up a bit to make it extra apparent int he sample. The floor
19- shouldn't be offset so strongly if you want to have a character walk on it.
20+ shouldn't be offset so strongly if you want to have a character walk on it without
21+ them appearing to levitate.
2022
2123## Heightmap with Deep Parallax
2224
2325{{<video "pom.webm">}}
2426
25- There is a ton of detail in the floor and walls. Some bricks/stones occlude
26- others. It's really awesome.
27-
2827## Normal Map Only
2928
3029{{<video "norm.webm">}}
3130
32- If performance does become and issue, using the normal map textures seems to be
33- good enough. This is using the simplest "swizzle" approach from Ben Golus's
31+ Using Ben Golus's basic "swizzle" from his
3432[ Normal Mapping for a Triplanar
3533Shader] ( https://bgolus.medium.com/normal-mapping-for-a-triplanar-shader-10bf39dca05a )
3634tutorial, and I think the results are just fine.
3735
38- Without this fix, you get very wrong normals. It's subtle in this sample scene
39- but areas in negative directions start looking dark in a confusing way.
40-
4136## The Shader
4237
4338Here's the code for those who are interested. It's mostly me gluing code from
0 commit comments