
Shan, Shui: Procedurally generated Chinese landscape painting - tomato2juice
https://github.com/LingDong-/shan-shui-inf
======
cossatot
The author has a lot of interesting projects on his page:
[https://lingdong.works/](https://lingdong.works/) though I haven't checked
all of them out (I have no desire to watch anyone's face decay).

As a geologist, I happen to think that all landscapes are procedurally
generated, though it is in general a slower generation process than the
computer simulations. Nonetheless I remain fascinated by both the Earth and
computational representations of it, and I really enjoy looking at simulations
and art depicting landscapes, envisioning what tectonic and erosional
processes could have produced the scene.

~~~
inetsee
Thank you for posting this. I might not have discovered his other works page
without your comment.

One odd thing happened as I was trying to see the software in action. When I
clicked on the link to show the software in action
[https://lingdong-.github.io/shan-shui-inf/](https://lingdong-.github.io/shan-
shui-inf/) I got a security warning from Firefox. The alternative link
[https://shan-shui-inf.glitch.me/](https://shan-shui-inf.glitch.me/) did not
produce an error. I don't know why.

~~~
aspenmayer
It has something to do with Cloudflare, DNS, and/or Github.io links
specifically, if I remember correctly. I read about it around a week or so ago
on HN IIRC. May also involve Google Domains; likely some kind of edge-case bug
combined with Google blocking some domains, and Cloudflare not allowing
certain DNS settings for some domains or plans, if I'm reading between the
lines correctly. Welcome any and all corrections to this info.

I think this is the thread:

[https://news.ycombinator.com/item?id=23417046](https://news.ycombinator.com/item?id=23417046)

------
zxcvbn4038
Really awesome! Author has a sense of humor - saw a "Pizza Hut" buried deep in
the mountains, see it in the code also. Wish there was some comments in the
code.

~~~
sneeuwpopsneeuw
yhea i was also interested to sea how he did the outlining effect. I made
something tile this once in OpenGL. But that took a lot of code to create. So
yhea magic code with many magic numbers.

~~~
zxcvbn4038
I've been trying to understand how it works, it looks like a lot of the math
deals more with rotation and scaling. It appears there is a function for every
object variation, and it looks like each one sets its own color, so I think
you could change the colors of individual objects to see what they actually
render. The object placement is too perfect, I'm betting the individual
objects have a number of predefined places where other object would naturally
be in relation, and then the the presence or variation of the object is
randomized - and all the more impressive if something that simple yields such
great results. I could just watch this scroll by for hours - nice alternative
to watching fish tank videos while coding.

~~~
capableweb
> The object placement is too perfect

Does not seem too perfect to me. I frequently came across the tiny trees
placed in the water near the shore and also on the rock formations, something
I have yet to have seen in the real world.

~~~
zxcvbn4038
It’s actually very common - trees will take root in the slightest crack or
depression, can even cause large boulders to split over over time. Load up
duck duck go and do an image search for “trees in rocks” and there are plenty
of examples.

------
dheera
Would be awesome to get this on a wall inside an eInk display and a wooden
frame. Kind of like a real watercolor painting but moving very slowly.

------
CGamesPlay
I'd love to see if this could be implemented with parallax scrolling. Then it
would make a great background for a procedural platformer type game.

------
julianeon
That's incredible.

I'm not a guy who gets mad at the inevitable, but I can't help but think the
robots are coming for the visual artists and illustrators, fast.

Set your clock because this is 2020, and 2030 will look much different.

~~~
codezero
I think this is true for (at least) one reason: robots can iterate a lot
faster. Content generation is a human bottleneck.

~~~
glaberficken
[prediction] As robots improve to produce better and more art, the value of
authentic human art will rise.

It will not matter if you can't tell the difference. The knowledge that a
human produced it will be enough.

~~~
codezero
That's a curious thought. I would actually go the other way. Imagine if some
AI art systems were truly better than others, and became exclusive? How fun!

------
nthnclrk
This reminds of the Internet, particularly pre-social media, when it was
interesting and people had personal sites and weird projects.

~~~
maxwelljoslyn
Take heart, nthnclrk. That side of the Web is not dead.

There are loads of people out there running wacky personal websites on every
subject you can imagine. Mine[1], for instance, holds poetry, Chinese
translations, a videogame, and an open call for Star Wars fan art.

If you want the real motherlode, go read Kicks Condor's "Href Hunt." [2] That
drongo collects and catalogs people's personal websites, so you've got a whole
evening of digital feasting ahead of you.

[1] [https://www.maxwelljoslyn.com](https://www.maxwelljoslyn.com)

[2]
[https://www.kickscondor.com/hrefhunt/](https://www.kickscondor.com/hrefhunt/)

------
tartoran
The author has a vimeo page
([https://vimeo.com/321658453#at=1](https://vimeo.com/321658453#at=1))

And the first one, the doodle rig caught my attention. One draws a being, a
skeleton is inferred and animation is also inferred. That’s pretty cool

------
etaioinshrdlu
I almost forgot you could generate images without neural nets!

------
somishere
Great project, especially the svg aspect! On a fairly wide aside, it also gave
me major nostalgia hit for Tiki Tiki Tembo, a book I haven't thought about
since it was read to me as a very young kid .. also apparently a great example
of cultural appropriation and reinforced negative stereotypes in print (though
I'd argue it also engendered a deep awe for Chinese culture in a lot of kids,
myself included).

------
eatbitseveryday
This would be pretty sweet if it could encode a few "hidden" objects, like a
"Where's Waldo" type of image, but maybe with "Where's Xi" or "Where's the
Emperor". Then one could generate a large set of new content which would also
be fun to comb through as a game.

~~~
rahimnathwani
[https://github.com/LingDong-/shan-shui-
inf/search?q=pizza&un...](https://github.com/LingDong-/shan-shui-
inf/search?q=pizza&unscoped_q=pizza)

------
mango7283
Are those actually high tension power lines in the generated landscapes or are
those supposed to represent a pagoda... ( Not sure if always appears but it's
there in the one I generated...)

------
serjester
For a senior in college this is incredibly impressive!

------
gaoryrt
the author got many other brilliant repos: [https://github.com/wenyan-
lang/wenyan](https://github.com/wenyan-lang/wenyan)
[https://github.com/LingDong-/qiji-font](https://github.com/LingDong-/qiji-
font)

------
heyitsguay
Amazing! I wonder if there is any space for performance optimizations to
enable the initial scroll rate to continue indefinitely?

~~~
CGamesPlay
Not sure, but the intuitive way to do this would be tiling, BUT since the
generation is SVG, it would need overlapping tiles that are then rasterized
and cropped to hide the line endings.

------
beeforpork
The translation of the name is likely:

{Mountain, Water} _

------
gus_massa
Nice project.

It is strange that all the code is in index.html. I was expecting something
like mountains.js, trees.js ...

It is also strange to see power towers in the drawings. Why did you add them?
(I guess there s an interesting story in this detail.)

~~~
madhadron
> It is strange that all the code is in index.html. I was expecting something
> like mountains.js, trees.js ...

Why? It's about 4000 lines of JavaScript, which is manageable usable in any
editor, and it makes it completely self contained. What would be gained by
splitting it up into multiple files?

~~~
Pfhreak
Readability, separation of concerns, extensibility, easier merging of pull
requests, improved testability, modularity, and less mixing of html and
Javascript in a single file.

~~~
ResidentSleeper
All of these are often of little concern to artists, who prefer to get in the
flow of actually getting stuff done. Organizing your project is fun and all,
but there's A TON value in eliminating context switches and shortening your
iteration loop. Source: I participate in game jams.

Obviously, it would be nice to follow this up with refactoring, but you could
also spend this time on another project, of which the author has many (and
likely thanks to this "fire and forget" attitude).

