I made somefink!

From: Mikee15 Nov 2012 21:07
To: Mikee 16 of 48
I guess I need to write some kind of algorithm to 'expand' colours.

For example:

For any block, if there's no block around it with the same material being used, change the texture to the most common material of each of its neighbours.

I need to make sure I can smooth them out using tricks like that
From: koswix15 Nov 2012 21:08
To: Mikee 17 of 48

Doesn't work. How dare you not support my 7 year old laptop? :C

From: af (CAER)15 Nov 2012 21:20
To: Mikee 18 of 48
Have you timed which parts are especially slow?

(and do you know about console.time() and console.timeEnd() for sub-millisecond timing accuracy?)
From: Mikee15 Nov 2012 21:48
To: af (CAER) 19 of 48
Yeah I've used it a bit - I'll do some proper profiling soon.

I've made a few tweaks to the colour matching. The results are far better, but I've had to sacrifice a little bit of speed.

It's certainly looking better. I could still do with a bit more smoothing on the colours, but far better than it was before...

voxel2.jpg
From: af (CAER)15 Nov 2012 21:49
To: Mikee 20 of 48
You might be able to judge colour matching better if you toned that background down a bit. To medium grey, for instance.
From: Mikee15 Nov 2012 21:52
To: Mikee 21 of 48
Hmm - 45 seconds to make that, on my laptop.

This model is 180 blocks high, though, which is far bigger than you'd normally build in minecraft.

15 seconds to produce this:

voxel3.jpg
From: Mikee15 Nov 2012 21:53
To: af (CAER) 22 of 48
Good point! :)
From: Mikee15 Nov 2012 21:57
To: ALL23 of 48
Awesome!! This came out much better than I was expecting...


voxel4.jpg
From: af (CAER)15 Nov 2012 21:58
To: Mikee 24 of 48
Something like that would be absolutely gigantic in Minecraft :S
From: Mikee15 Nov 2012 21:59
To: af (CAER) 25 of 48
Haha yeah :)

You could set up a base inside it!

http://www.mikeefranklin.co.uk/3d/harpoon.html
From: Mikee15 Nov 2012 22:01
To: Mikee 26 of 48
Mind you - with the half-blocks you can get in tekkit/red power, you could have it at the same quality but far smaller
From: Mikee16 Nov 2012 10:07
To: ALL27 of 48
Made some pretty huge changes to the way it works..


http://www.mikeefranklin.co.uk/3d/bishop.html

It should now be REALLY fast in comparison - about 10 seconds

Edit: It seems to depend on how much memory you have available. On lower specs it seems to stop at ~80% and start crawling. If you have enough memory it does it all verrry fast.
EDITED: 16 Nov 2012 10:26 by MIKEE
From: Mikee16 Nov 2012 11:14
To: Mikee 28 of 48
http://www.mikeefranklin.co.uk/3d/goblin.html

:D


Gotta find some new models now..

I realised that my thing only works with a single texture at the moment, too. I need to change it to support multiple textures.. :)
From: Mikee16 Nov 2012 15:54
To: ALL29 of 48
Now improved so it still works if you have multiple textures on a model...

http://www.mikeefranklin.co.uk/3d/dragon.html

(the Dungeon Defenders ancient dragon has a texture on his head and a texture on his body)
From: Drew (X3N0PH0N)16 Nov 2012 16:00
To: Mikee 30 of 48
Works like a charm here now.
From: Mikee16 Nov 2012 19:01
To: ALL31 of 48
I've made a new technique..

Once the texture is loaded in, I run blurring on it before doing anything else.

The result is far far superior..

The only issue left to deal with is that at higher resolutions chrome runs out of memory and the whole thing slows down considerably. I don't think there's any real fix to this - v8 engine has a memory limit built in.

http://www.mikeefranklin.co.uk/3d/dragon.html

(may pause loading half way through on lower spec machines)
EDITED: 16 Nov 2012 19:02 by MIKEE
From: Drew (X3N0PH0N)16 Nov 2012 19:02
To: Mikee 32 of 48
Get a proper browser ;)
From: Mikee16 Nov 2012 19:03
To: Drew (X3N0PH0N) 33 of 48
Pftcha!
From: Drew (X3N0PH0N)16 Nov 2012 19:04
To: Mikee 34 of 48
cha!
From: Mikee16 Nov 2012 19:07
To: Drew (X3N0PH0N) 35 of 48
..-cha-cha (back step)
EDITED: 16 Nov 2012 19:08 by MIKEE