Page 6 of 9
Re: Minecraft remake- Crafter
Posted: Tue Jul 12, 2011 4:23 am
by Van-B
The combined cubes idea would work great, except for texturing. I just don't think it would work for texturing and lighting very well. The top, bottom and sides of the cubes would have to be different textures, because you can only scale the texture if the texture repeats. I think that minecraft textures are combined, so its much more like a tile sheet than a texture. The workarounds might just negate any benefit you'd get from doing that - I think plain old caulking is enough to keep frame rates sensible.
Re: Minecraft remake- Crafter
Posted: Wed Jul 13, 2011 8:50 am
by MadPumpkin
simple, tile your texture. I'm not meaning to be rude, but I simply don't see what problem might arise, lighting possibly, where big cubes touch small cubes but that's it.
EDIT: Oh! I understand what you're saying now, yes it would have to already be a tile sheet or each separate image you're right. Because texture stretching would look like shit. Especially If you have a shape 12 times bigger than any individual cube.
Re: Minecraft remake- Crafter
Posted: Wed Jul 13, 2011 3:16 pm
by teamtwentythree
Its actually something I'm looking at now.
On the phone I'm very vertex bound. So cutting verticies increases my fps significantly. What I'm looking at right now is having a tile sheet with two copies of each texture on it. Which means its bigger than it otherwise would be, but it would still support some face optimization (2 faces to 1 larger face).
Doing a quick check on my scene, looking at the top face of the cubes only, if I do an as available optimization combining two faces assuming equal lighting/textures I was able to reduce my vertex count by ~10%. Which is enough of a bump for me to probably do it. Beyond that it was diminishing returns, combining 3 faces gave another 3%, 4 faces gave another 1% beyond that. So really just doing the 2>1 should give a nice boost without too much of an impact. I'm hoping that I can get another 10% doing that on the other 6 faces.
Re: Minecraft remake- Crafter
Posted: Thu Jul 14, 2011 6:31 am
by Van-B
Ahh, so your using double sized cubes?
I can see how that would help, quick to detect, and having the doubled up textures probably wouldn't affect things that much. Let us know what improvements you get after doing the same with the sides and bottom.
Re: Minecraft remake- Crafter
Posted: Fri Jul 15, 2011 12:40 am
by teamtwentythree
So I'm not really drawing in cubes per se. I draw the faces of each cube based on whether its visible to the player or not. A mountain is drawn on the edges only, nothing internal exists. Even the "blocks" on the edges are just the faces you can see, not entire blocks. So what I'm doing is looking at each face I draw and seeing if I can extend it out to cover two blocks worth.
Just got done with the logic for all 6 sides, total vertex reduction was 28%. This is an inflated number as I'm using the same texture for all of my cubes at the moment. But I think it will hold fairly true for a more varied level, as it requires only a small block to do its optimization. The sides in the current terrain were the worst with about 1k faces removed each, top was 9k, bottom was 10k. Total I yanked out 23k verticies from my scene. Player built structures will likely get more out of the sides (As we generally build flat walls). This turned into 5fps at the worst viewing angle (Most stuff on screen at once) on the physical device (From 16fps to 21fps). Definitely worth it for me.
Right now I'm requiring light be equal to extend the texture, this could be made more complete by checking for a linear lighting amplification/degredation. Meaning if block 1 has 3 light at its left side, 2 light on its right side, and block two has 2 light on its left side and 1 light on its right side you could extent one larger face with 3 light on left and 1 on right, achieving the same affect. Although I expect the benefit right now would be minimal. I do per vertex lighting so this calculation would be a little more complex as well.
Re: Minecraft remake- Crafter
Posted: Fri Jul 15, 2011 4:35 am
by N64vSNES
teamtwentythree wrote:So I'm not really drawing in cubes per se. I draw the faces of each cube based on whether its visible to the player or not. A mountain is drawn on the edges only, nothing internal exists. Even the "blocks" on the edges are just the faces you can see, not entire blocks. So what I'm doing is looking at each face I draw and seeing if I can extend it out to cover two blocks worth.
I do the same, I remember the performance before I implemented this.
teamtwentythree wrote:
Right now I'm requiring light be equal to extend the texture, this could be made more complete by checking for a linear lighting amplification/degredation. Meaning if block 1 has 3 light at its left side, 2 light on its right side, and block two has 2 light on its left side and 1 light on its right side you could extent one larger face with 3 light on left and 1 on right, achieving the same affect. Although I expect the benefit right now would be minimal. I do per vertex lighting so this calculation would be a little more complex as well.
Eh I need to get lighting stuff done.
Good work anywhoo, I've gotten some stuff done with Crafter so I'll have another update soon
Re: Minecraft remake- Crafter
Posted: Fri Jul 15, 2011 3:06 pm
by teamtwentythree
Lighting sucks, I still think I'm doing it wrong/stupidly.
Re: Minecraft remake- Crafter
Posted: Thu Aug 11, 2011 4:49 am
by Kyosaur
Dude this is fucking awesome! Im hoping its still being worked on, cause it would be a crime to throw this into the unfinished pile
.
Re: Minecraft remake- Crafter
Posted: Thu Aug 11, 2011 7:31 am
by N64vSNES
Kyosaur wrote:Dude this is fucking awesome! Im hoping its still being worked on, cause it would be a crime to throw this into the unfinished pile
.
If you're referring to Crafter, it's not in that pile
Re: Minecraft remake- Crafter
Posted: Thu Aug 11, 2011 9:06 am
by dandymcgee
N64vSNES wrote:Kyosaur wrote:Dude this is fucking awesome! Im hoping its still being worked on, cause it would be a crime to throw this into the unfinished pile
.
If you're referring to Crafter, it's not in that pile
Then where is it? UPDATE!
Re: Minecraft remake- Crafter
Posted: Thu Aug 11, 2011 9:14 am
by N64vSNES
dandymcgee wrote:N64vSNES wrote:Kyosaur wrote:Dude this is fucking awesome! Im hoping its still being worked on, cause it would be a crime to throw this into the unfinished pile
.
If you're referring to Crafter, it's not in that pile
Then where is it? UPDATE!
University, dead hard drive, remainder of social life.
If I post an update now it'll be a 3 page lecture on optimization.
Re: Minecraft remake- Crafter
Posted: Thu Aug 11, 2011 2:35 pm
by Kyosaur
N64vSNES wrote:dandymcgee wrote:N64vSNES wrote:Kyosaur wrote:Dude this is fucking awesome! Im hoping its still being worked on, cause it would be a crime to throw this into the unfinished pile
.
If you're referring to Crafter, it's not in that pile
Then where is it? UPDATE!
University, dead hard drive, remainder of social life.
If I post an update now it'll be a 3 page lecture on optimization.
Ah fair game man, im glad to hear you're still going strong :D. Do you have an idea whats next feature wise?
Re: Minecraft remake- Crafter
Posted: Thu Aug 11, 2011 2:37 pm
by TheBuzzSaw
Post the source on github. :D
Re: Minecraft remake- Crafter
Posted: Thu Aug 18, 2011 9:21 am
by Falco Girgis
N64vSNES wrote:dandymcgee wrote:N64vSNES wrote:Kyosaur wrote:Dude this is fucking awesome! Im hoping its still being worked on, cause it would be a crime to throw this into the unfinished pile
.
If you're referring to Crafter, it's not in that pile
Then where is it? UPDATE!
University, dead hard drive, remainder of social life.
If I post an update now it'll be a 3 page lecture on optimization.
UNIVERSITY?! Weren't you the one who used to get up my ass for being "arrogant" enough to be proud of a college degree?
Anyway, that's beside the point. Welcome to real life. The entire AiGD series happened while I was in college, and it didn't stop me. It's clear that you are no quitter, so get off your ass and show us what you're made of.
Re: Minecraft remake- Crafter
Posted: Thu Aug 18, 2011 9:37 am
by mattheweston
I'm hoping we get to see a "postgrad" edition of AiGD soon.