#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

#povray and #python 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.

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

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

#python #povray

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

#python #povray

#python #povray

Finally managed to add some grass!

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

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.

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

#python #povray


@jacek is the code available somewhere?

@lioh for 3d rendering I use povray raycaster (which is free) I'll get around to open sourceing the python code that generates povray input files. I'll try to not forget to ping you once it is done.

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!