#povray fun continues:
It's the same as previously but:
1. Povray file is generated from #python script, that works on python objects;
2. Heightfield is not created in Gimp but generated from #numpy array.
3. I saved 10 seconds of my life by generating spheres using for loop.
The end goal is to re-create something that renders landscapes similar to: @wildflowersbot
I spent most of the day debugging coordinate issues (now I know that they were coordinate issues).
I managed to solve it only when I created a debug geometry attached below.
Basically highest spike is where camera **should** be, and red cylinder is where camera is placed.
When they mismatched I knew what was wrong.
Some more debugging.
I want to add some plants, and there are some blockers:
1) I'm a fuckin undirected perfectionst and got blocked by "modelling a curve of a blade of grass";
2) I need to see how much of the geometry I need to fill with grass objects, and I have no idea how much is that;
3) Python is **sloow** geometry with a million of objects took more time preparing pov file tan rendering.
4) Having million objects (spheres) in povray eats 30% of my ram, so probably is an upper limit of what I can do without paying for cloud machine.
Anyhow here are some weird geometries with marker spheres that show distances.
Conclusions are that:
1) I need to put a lot of objects to fill the scene;
2) Objects need to be as simple as possible;
3) Ram will be a problem;
4) If I manage to do something iteresting I'll need to rewrite Python part to C++. . .
Good thing: it looks **better**, also I have improved performance (by doing the dumbest thing: using multiprocessing).
Bad thing is: povray files exploded from ~10mb to ~80mb.
Key was to use "ambient" property for "grass". Previously grass was darker that it should be as it was illuminated from the random direction. Now ambient lightning means that they are magically always illuminated.
 Here is the reference to the property: http://www.povray.org/documentation/3.7.0/r3_4.html#r3_4_6_3_1
Worked on performance, so I can add more grass (or in future more objects).
Here is the writeup of changes: https://blog.askesis.pl/post/2020/09/povraygen-diary-for-2020-09-04-and-03.html .
I'll work on something else than grass next :)
I have also somewhat widened (and randomized) the base of the blade of grass. I might revert that change though.
This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!