Worked on performance, so I can add more grass (or in future more objects).

Here is the writeup of changes: blog.askesis.pl/post/2020/09/p .

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.

Show thread

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"[1] 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.

Show thread

Another entry about landscape generator.

Reworked some code, to allow me to easily randomize colors, without ugly hacks I used last time.

Choose another (still randomly/computer generated palette).

Results are better but still suck :/

Will need to read into color theory (maybe just globally allow much less dark colors?).

Or maybe the "grass" is just bad. Need to think.

Also python is starting to be the bottleneck :/ (generating 100k of objects and printing them to a file).

Show thread

Added colors.

Spent part of day tearing out color map code from color brewer and seaborn code, and then integrated it with the lanscape generators.

Below landscapes are done using divergent colormaps from color brewer. Will need to do something better next time.

Show thread

Finally managed to add some grass!

Colors are not yet randomized, will work on this next.

Show thread

Another weird debug geometry, it's somewhat soothing (the yellow balls not the spikes) so I'll leave yellow balls somewhere.

Show thread

Still trying to figure out how to add foliage.

In the meantime I have added sun.

Problem is that if sun is visible currently is rather boring as it lacks shadows.

Also I could probably add some texture to the "height field" (i.e. ground).

Show thread

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++. . .

Show thread

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.

Show thread

and fun continues.

1. First image is randomly generated height-map.
2. Second is rendered landscape, featuring debug markers (namely red ball and yellow translucent cylinder)

The above was generated by python script executing povray thingy.

Show thread

fun continues:

It's the same as previously but:

1. Povray file is generated from script, that works on python objects;
2. Heightfield is not created in Gimp but generated from 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

So povray is seriously fun, well documented thing.

If you want introduction to 3d programming, povray is probably the way to go.

It's the same image as previously, but now I understand the coordinate system, and to prove it I put spheres in the corners of the height field.

I'm starting to think that all 3d API's are garbage (or ta least their documentation is garbage).

Or rather --- trying to do hobby project that something interesting with 3d is super-hard with exisitng 3d API.

However there is povray, a raytracer that is not younger than me, which is super easy, has super clean documenation, it's own DSL for describing the scene.

Doing the below took me 3 minutes (using the tutorial). And I'm a way further than in any other API's after couple of hours each.

Polish politics 

We had presidential debate. Or rather: two simultaneous debates each presenting a single candidate in the run-off election.

Candidates couldn't agree on whether to have a debate on National TV or in Commercial one.

Below is the screenshot (stolen from Facebook) showing two debates.

Beat that Trump! Beat that!

Polish politics 

The message below shows fake "Twitter" conversation between: Fascist presidential candidate, and two right wing candidates that went into second round of elections:

Bosak (Fascist one): "I shitted my pants XD lol"
Trzaskowski (right wing neoliberal one): "What a coincidence! I also shitted my pants, so much in common"
Duda (right wing catholic radical one): "Mee to! Me To! Moreover I also peed my pants".

This is a fake screenshot, but it is also very true.

Polish pol 

So polish alt-right tried to pass the law that says:

"So everybody would be young and rich and Minister Emilewicz would have a helicopter she would to throw money off from every time she needs".

Monument Valley 2 (a very nice, tranquil light puzzle game) is free in play store. You might want to check it.

Polish far right 

This is far-right (yet mainstream-ish) polish portal.

The title says: "8th of March. Prayer day for victims of feminism".

Then: "Did celebrating 8th of March help any woman? Sure not! It's better to pray for the victims of feminism, one of most harmful ideologies.

Then you get list of prayer topic:

- for woman that were taught to lose pride of their womanhood;
- for women that were taught to "self-realize" instead giving themselves to others.

There is a lot more.

To jeszcze po Polsku: takie coś znalazłem.

Nawet nie wiem jak to skomentować.

This is probably untranslatable. "Ekogroszek" translated as: "ECO PEAS" is this worst quality coal (that won't be bought by the power plants) people use to heat their homes.

This one is "patriotically branded", named: "PATRIOT PLUS" with tagline: "Energy from polish land".

It's also branded in white red colors, like polish flag.

Show more
Mastodon for Tech Folks

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!