Commit Graph

136 Commits

Author SHA1 Message Date
Sascha L. Teichmann
f658d12641 Use github.com/bamiaux/rez instead of github.com/nfnt/resize for resampling the pyramid tiles. It is much faster but needs some testing. 2015-12-25 22:07:54 +01:00
Sascha L. Teichmann
6ae5936de9 Be more verbose if image decoding failed. 2015-08-24 10:58:46 +02:00
Sascha L. Teichmann
08031f1dcd Do more boundary checks in block decoding. 2015-08-24 10:45:28 +02:00
Sascha L. Teichmann
011cd0e4f4 Be more defensive in decoding node id table in blocks. 2015-08-23 22:48:54 +02:00
Sascha L. Teichmann
c4c35dc10d Use a sync.Pool to recycle the zlib readers. Speeds up the decoding of database blocks significantly. 2015-08-08 16:01:23 +02:00
Sascha L. Teichmann
ab1a86384b Reset zlib reader instead of re-opening it before reading meta data from block. Speeds up decoding of blocks significantly. Using a sync.Pool will seed it up even more. 2015-08-08 13:00:12 +02:00
Sascha L. Teichmann
e606e2700f Fixes #14. mtseeder and mtwebmapper now have command line flags -ymin=block and -ymax=block to limit the y range of mapping. Defaults to full range. 2015-07-27 19:03:47 +02:00
Sascha L. Teichmann
62a53dc26b Unified handling of printing versions of programs (--version). Setting version to 0.5 2015-07-26 22:04:16 +02:00
Sascha L. Teichmann
7f82d482f5 More header updates. 2015-07-26 16:44:51 +02:00
Sascha L. Teichmann
f6e5eb8510 Moved ordering of two int64 to common/math. 2015-07-26 16:40:50 +02:00
Sascha L. Teichmann
becf017edc Small cleanup. Moved min to common/math. 2015-07-26 12:32:59 +02:00
Sascha L. Teichmann
e1eb03813f Add a -transparent-dim=percent flag to set the extra dimming of transparent materials each depth meter. 2015-07-26 11:55:38 +02:00
Sascha L. Teichmann
93d4aedffa Fixed non-interleaved sqlite support. 2015-07-23 16:20:42 +02:00
Sascha L. Teichmann
e8e4d6afeb Cache empty tiles to speed up seeding. Enforce Go 1.4 for the ability to compress better. 2015-07-22 01:11:14 +02:00
Sascha L. Teichmann
8b4f4b1401 Merged. 2015-07-21 23:38:18 +02:00
Sascha L. Teichmann
39df42b675 Removed another use of fmt.Printf. 2015-07-21 23:35:10 +02:00
Sascha L. Teichmann
fb2b03a14a Fix reciever naming in coverage 3d. 2015-07-21 22:09:28 +02:00
Sascha L. Teichmann
1921b8211b Some little experiment with a coverage index to speed up spatial queries if backend has no Z order support. 2015-07-21 22:01:10 +02:00
Sascha L. Teichmann
80113b885f Fix for issue #10. Set transparency level of pixels based on the alpha channel of colors.txt. 2015-07-20 14:56:41 +02:00
Sascha L. Teichmann
ecd599e44d Terminate all log.Printf with a new line. 2015-07-20 14:19:41 +02:00
Sascha L. Teichmann
91a50a4622 Log missing colors only once to make log output less spammy. 2015-07-20 14:01:01 +02:00
Sascha L. Teichmann
232feaa435 Dont store air only information in decoded block. This can be found out pretty easy by analysing the other fields if needed. 2015-07-20 13:27:46 +02:00
Sascha L. Teichmann
b66c7fdff3 Redis client: Pulled micro optimisation over from server when constructing bulk strings. 2015-06-28 14:41:07 +02:00
Sascha L. Teichmann
2d00eb9567 Simplifications when decoding blocks from database to save some memory allocations. 2015-06-21 22:47:06 +02:00
Sascha L. Teichmann
1baf9f9dee Silence a few golint warnings. 2015-05-27 18:13:39 +02:00
Sascha L. Teichmann
787fc959d0 Removed some dead code. 2015-05-01 14:04:23 +02:00
Sascha L. Teichmann
cf9cbe7087 Fixed hill shading for transparent structures a bit. Still not optimal. 2014-10-28 11:53:18 +01:00
Sascha L. Teichmann
121a046eee Increase base transparency from 45% to 50%. 2014-10-27 21:42:09 +01:00
Sascha L. Teichmann
f3ed470d57 Set transparency attenuation to %45 + 2%/m. 2014-10-26 23:53:58 +01:00
Sascha L. Teichmann
f5d84f0b7b Only use the transparent image generation if there where any transparent blocks. 2014-10-26 22:36:57 +01:00
Sascha L. Teichmann
b8bae923ec Prevent stopping depth scanning too early when handling transparent nodes. 2014-10-26 20:39:53 +01:00
Sascha L. Teichmann
8452a26fcd Render transparent tiles if command line flag is set. 2014-10-26 18:36:47 +01:00
Sascha L. Teichmann
2aa9ee0e24 Collect more statistics about number of solid and transparent blocks and print them in mttilemapper. 2014-10-26 17:09:23 +01:00
Sascha L. Teichmann
99ff99a8f4 Added cascading transparent annuation algorithm based on spans. 2014-10-26 11:01:36 +01:00
Sascha L. Teichmann
eaa3949b10 Added a flag to decoded block to check if it contains any transparent colors. Useful to establish a fast path in transparent rendering if it does not. 2014-10-25 11:20:51 +02:00
Sascha L. Teichmann
4f49d114c6 span buffers: Simplified code by throwing away cases that cannot happen. Extended unit tests with more pattern to check. 2014-10-21 18:03:27 +02:00
Sascha L. Teichmann
269e63ea59 span buffer test now passes. Code ist still too complicated. 2014-10-21 17:41:19 +02:00
Sascha L. Teichmann
e744390503 Repaired old unit tests. Added unit test for span buffers ... which currently fails. :-/ 2014-10-21 16:11:20 +02:00
Sascha L. Teichmann
a82d20f14b Complete code of insert into span buffer. Looks complicated and needs testing. 2014-10-21 12:08:01 +02:00
Sascha L. Teichmann
d880983abc merged 2014-10-21 01:11:37 +02:00
Sascha L. Teichmann
1a087d127c Started implementing span buffers to handle transparency spans in right Y order. 2014-10-21 01:09:50 +02:00
Sascha L. Teichmann
c03d382ca6 Pass pointer to Colors struct around which makes it easier to eg. find transparent colors. 2014-10-19 21:05:38 +02:00
Sascha L. Teichmann
8b42446acc Do not render air only blocks. Nice performance speed up! :-) 2014-10-19 17:15:33 +02:00
Sascha L. Teichmann
1c530a2ce7 Sort transparent colors from colors.txt to front of lookup table. Makes it easier
to determine if a color index corresponds to a transparent color.
2014-10-19 11:43:53 +02:00
Sascha L. Teichmann
c428756beb mtwebmapper: First version of pyramid tile updater. Needs testing. 2014-09-21 17:30:19 +02:00
Sascha L. Teichmann
216f641fa3 mtwebmapper: Move BaseTileCreator to common. TODO: Make mtseeder use it, too. 2014-09-20 15:21:01 +02:00
Sascha L. Teichmann
400a65f563 mtredisalize: Add infrastructure to send backend store changes to separate daemons. 2014-09-17 09:51:34 +02:00
Sascha L. Teichmann
a468741a24 Moved PNG loading to common. 2014-09-16 01:13:12 +02:00
Sascha L. Teichmann
90bfc225b8 When generating shaded tiles draw to pix buffer directly instead of calling Set() for each pixel. Set resize filter for generating pyramid tiles to Lanczos3 because of better visual results. 2014-09-16 00:08:31 +02:00
Sascha L. Teichmann
f762154b05 Made tile renderer resetable to reduce the memory for render more than one tile. 2014-09-14 14:57:49 +02:00
Sascha L. Teichmann
3a0b922a9e Implemented a greedy search algorithm to figure out the block regions with are not fully covered after a rendering step. 2014-09-14 11:41:25 +02:00
Sascha L. Teichmann
9106d71363 Moved image saving to common. 2014-09-14 00:31:28 +02:00
Sascha L. Teichmann
5319e113bf Moved color parsing to common. 2014-09-14 00:02:04 +02:00
Sascha L. Teichmann
560afae6c4 Moved redis client from tilemapper to common. 2014-09-13 19:18:12 +02:00
Sascha L. Teichmann
b445cfb33a Moved bloch decoding and rendering from tilemapper to common. 2014-09-12 20:22:34 +02:00
Sascha L. Teichmann
223d11df0b Render blocks through a ring buffer which is a binary heap ordered by descending y coords. This establisches a stream of partial y ordered blocks to reduce the the over all overdraw. Speeds up rendering about 25%. 2014-09-12 12:37:27 +02:00
Sascha L. Teichmann
eb9cfb9959 Clip coordinates in interleaved spatial queries to world boundaries. 2014-09-07 21:36:59 +02:00
Sascha L. Teichmann
13bb251f35 Moved all the block producer/consumer interfaces to common. 2014-09-07 16:12:18 +02:00
Sascha L. Teichmann
d75fe4f102 Moved Block as type to common structures. 2014-09-07 15:57:25 +02:00
Sascha L. Teichmann
cbc5ed0c6c Small cosmetics. 2014-09-07 11:15:14 +02:00
Sascha L. Teichmann
f83efba3cf Temporarly converting components to uint16 in interleving is not needed because we are only interested in the bit patterns which are the same as in the signed representation. 2014-09-07 11:07:49 +02:00
Sascha L. Teichmann
8d4f73429f Eliminated the stupid offset bug in interleaving. Hail to to the unit test. 2014-09-07 10:46:51 +02:00
Sascha L. Teichmann
45ec5ccd3e Simplified unit test for BigMin. 2014-09-07 10:12:39 +02:00
Sascha L. Teichmann
a8c2a4c55d Simplified code. Add/substract min value when interleaving. BigMin still broken. 2014-09-07 09:58:09 +02:00
Sascha L. Teichmann
6e958e4ff6 Be more clever in testing BigMin. This shows that the interleaving code has shift all values to be positive, so it's broken atm. :-/ 2014-09-07 00:18:28 +02:00
Sascha L. Teichmann
abaef4936c BigMin unit test now passes. 2014-09-06 23:34:05 +02:00
Sascha L. Teichmann
f75e1015af Some code cleanup in unit test for bit version of BigMin. Test is still failing. 2014-09-06 20:38:49 +02:00
Sascha L. Teichmann
234b487077 Made unit tests for common/coords compiling again. Fixed NaivBigMin. Added bit based BigMin + unit test, which is still failing. 2014-09-06 19:54:53 +02:00
Sascha L. Teichmann
85741f3b0e Simplified code for naiv BigMin implementation. 2014-09-01 18:44:56 +02:00
Sascha L. Teichmann
c096b8bbf1 Simplified code of non interleaved spatial query in LevelDB backend. 2014-09-01 18:39:42 +02:00
Sascha L. Teichmann
77a35e7096 Fixed endless loop bug in LevelDB interleaved spatial query. Simplified code. 2014-09-01 18:26:33 +02:00
Sascha L. Teichmann
f7a8c1fdec Added naive BigMin interleaved implementation for interleaved spatial query. 2014-09-01 13:46:23 +02:00
Sascha L. Teichmann
0021854000 Added some spatial query for plain sql backend. 2014-09-01 12:42:57 +02:00
Sascha L. Teichmann
8cd23d257f Moved special code for interleaver out of common. 2014-08-23 16:01:57 +02:00
Sascha L. Teichmann
954cc1928b Added transcoders for interleaved LevelDB backend. 2014-08-23 13:49:45 +02:00
Sascha L. Teichmann
712708f87c Added transcoder functions to LevelDB backend. 2014-08-22 22:26:03 +02:00
Sascha L. Teichmann
83c160eb90 Added encoder/decoder useful in interleved SQLite backend. 2014-08-21 22:19:42 +02:00
Sascha L. Teichmann
b393712801 Completed implementation of interleaver. Needs testing! 2014-08-21 14:46:34 +02:00
Sascha L. Teichmann
c84feab792 Added copyright header and more test cases for key encoder/decoder. 2014-08-19 11:12:35 +02:00
Sascha L. Teichmann
efe6c6abb8 Introduce struct type Coord to reduce tuples passing around. 2014-08-18 21:33:58 +02:00
Sascha L. Teichmann
066675896d Dont rely on compiler smartness to replace / and % by shifting and masking. Make use of constants more consistence. 2014-08-18 19:58:10 +02:00
Sascha L. Teichmann
ff14b83b1e Made encode/decode api more symmetric. Added some unit test for the encoders/decoders. 2014-08-18 18:01:34 +02:00
Sascha L. Teichmann
a210207f8e Added more functions for treating coordinates. 2014-08-18 16:29:17 +02:00
Sascha L. Teichmann
da5c70b55b Use strconv.FormatInt() directly to convert key to string w/o using expensive fmt.Sprintf(). 2014-08-17 12:08:26 +02:00
Sascha L. Teichmann
6efb976ba2 Fixed HKEYS command for SQLite3 backend. 2014-08-16 17:41:54 +02:00
Sascha L. Teichmann
b6c041b896 Moved coords in separate module. 2014-08-16 16:06:42 +02:00