Putting the two shaders together.
In most of his trees, Nagai consistently uses 4 easily distinguishable stippling layers:

  • dark (almost black) silhouette layer, for parts that are completely in shadow.
  • dark green layer for partially occluded/shadowed parts
  • lighter green layer for lit parts
  • some warm color layer for flowers/fruit.

So I tried to replicate that by layering the stippling shader. Density of dots is driven by Lambertian illumination. Eeach layer can remap the Lambert term differently to get different dot density falloff. I tweaked this manually aiming to match the appearance of original illustrations.

Size and offset of dots can also be adjusted per layer to make the whole thing less uniform.

    xyz That looks fantastic! I love the style that your approach produces! 😍

    @MikeCL Thanks, glad you like it 🙂

    Tuning the shader further... The main visual problem was that stipple dots were abruptly popping in and out of existence when camera moved around. This was kind of unpleasant to look at. I had to mitigate it by introducing gradual dot scaling when a dot is still on the "dark side" of the shadow terminator. The closer it gets to the terminator the bigger it is, reaching full size right when it crosses to the light side. This introduces smaller dots that are not really seen in the reference illustration but it was a cost of making it look decent in motion.

    To get a bit of clumping I added simple normal alteration calculation driven by Godot's cellular noise texture. A poor man's normal map 🙂 Natural looking clumps and branch rhythms from the reference are way out of shader's (and my) capabilities, so this will have to do.

    Michael33 Thanks!

    I think I'm done with the shader for this iteration. It could be further improved but I'm leaving that for some other time. The final thing I added is the trunk. I initially planned to make it a separate object but why complicate when it can be squeezed into the same billboard with two lines of shader code. It could also be normal mapped but I figured the plain silhouette fits the overall style better.

    The last thing to do is test how this all looks en masse by applying it to multimesh instance and create a whole bunch of them. I just need to decide which parameters will be the best candidates to vary per instance. Stay tuned... 🙂

    After all this astonishing job is stupid for me to say... I have observed there is a glitch in the shadow, just where the trunk finds the floor. I assume you already know 🙂

    • xyz replied to this.

      d2clon Thanks! There's quite a few glitches as this is a work in progress, but the thing you mentioned is caused simply by the approximative nature of billboards - they are just texture mapped planes that turn towards the camera or a light source when rendering the shadow map. The latter actually causes this artefact. It could be remedied in several ways but I won't go into it in this limited scope project.

      I've set up instanced rendering. Still no real scripted parametrization. The existing randomization is done "automatically" by blindly varying some properties using billboard's world position as a seed for rng in the shader itself. I also added some atmospherics for the presentation value 🙂

        This thread looks to me like watching a magician in a performance show. I am like >8O

        • xyz replied to this.

          xyz Looks amazing! I would love to see a character running around in that environment. Or perhaps like a camera flyby. Fantastic work! 🤩

          • xyz replied to this.

            d2clon This thread looks to me like watching a magician in a performance show. I am like >8O

            Ha ha! Thanks! Enjoy the show 😉

            MikeCL Looks amazing! I would love to see a character running around in that environment. Or perhaps like a camera flyby. Fantastic work! 🤩

            Thank you! I'll put a quick video up shortly. Until then here's another still image with a bit different ambience.

            Okay. I parametrized the shader so billboards can receive per instance parameters. Here's the list of parameters:

            • size (width/height)
            • crown shape (upper vs lower circle ratio)
            • trunk height
            • trunk width
            • flower density
            • noise normal map frequency
            • noise normal map strength
            • and light/dark/flower color variation from gradient texture

            There's potential for more but I must adhere to my anti-feature-creep policy 🙂

            I also added some silhouette scraggling to somewhat mask out ugly stippling artefacts near the contour.

            And last but not least - some classical trigonometric sway. It's computationally cheap and good looking, so why not have some. Each dot sways with its own period shift and the whole composite is additionally waved as a whole.

            Here are some videos to show it all in motion. The quality/resolution is not the best, it's just a quick preview.

            With this I officially announce the project finished!
            For the time being 🙂

              Before you announce the finish, please, make a video with a more slow step pace, and with more pauses to appreciate the view. Maybe with a very slow rotation around. At a speed that we can appreciate each tree and the wavy movement of the leaves.

              • xyz replied to this.

                xyz
                Nice! It kinda looks like a modern take on retro graphics (e.g., TES2: Daggerfall era), when billboard sprites was all you had for 3D

                • xyz replied to this.

                  xyz Looks even better in motion! I'm super impressed! 🙌😍

                  Would be really cool to see an entire game with this kind of art style.

                  • xyz replied to this.

                    xyz Very strong project! In general, your works on procedural generation are extremely valuable. 🧑‍🔬

                    • xyz replied to this.

                      d2clon Before you announce the finish, please, make a video with a more slow step pace, and with more pauses to appreciate the view. Maybe with a very slow rotation around. At a speed that we can appreciate each tree and the wavy movement of the leaves.

                      Slower video coming in the next post 🙂

                      LoipesMas Nice! It kinda looks like a modern take on retro graphics (e.g., TES2: Daggerfall era), when billboard sprites was all you had for 3D

                      Thanks! Yeah the retro feel is something I was aiming at. That reference illustration is right from the 80s. I'm generally not a big fan of billboards but I think they work well here.

                      MikeCL Looks even better in motion! I'm super impressed! 🙌😍
                      Would be really cool to see an entire game with this kind of art style.

                      Thank you! I'm open to gameplay suggestions 🙂

                      Tomcat Very strong project! In general, your works on procedural generation are extremely valuable. 🧑‍🔬

                      Thanks! Glad you find them valuable.

                      Righty. By popular demand 😉 here's a video with slower movement which btw also makes billboarding artifacts more noticeable 🙁



                      I really have to conclude the project now. It's been more than a week 😃
                      Although I do have a few improvement ideas, I won't let them tempt me 😹

                        Yeah, this is much more enjoyable for me. It is really hypnotizing 🙂... Would be great if a demo would be published in Itchio or something. And the code is available 🙂. I also understand you want to take a break from the project 😉

                        • xyz replied to this.

                          that's great ! it make me think of Eyvind Earle artwork as well

                          • xyz replied to this.

                            d2clon Yeah, this is much more enjoyable for me. It is really hypnotizing 🙂... Would be great if a demo would be published in Itchio or something. And the code is available 🙂. I also understand you want to take a break from the project 😉

                            Not sure it's publishing worthy. The shader is not optimized at all yet. It was meant just as a quick over the weekend prototyping project. I tend to do such mini projects when I want to try some stuff out.

                            UlricL that's great ! it make me think of Eyvind Earle artwork as well

                            Yeah, it has a dash of Earle's vibe. I'm familiar with his landscapes.