Minecraft remake- Crafter
Moderator: PC Supremacists
- MrDeathNote
- ES Beta Backer
- Posts: 594
- Joined: Sun Oct 11, 2009 9:57 am
- Current Project: cocos2d-x project
- Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
- Programming Language of Choice: C/++
- Location: Belfast, Ireland
- Contact:
Re: Minecraft remake- Crafter
How the fuck was I not sub'd before?
http://www.youtube.com/user/MrDeathNote1988
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Minecraft remake- Crafter
Looks awesome! And yes, I can see the blocks better now :P
There's no place like ~/
Re: Minecraft remake- Crafter
Hooray for building things!
Sorry for the shitty video camstudio completely screwed up and I was too lazy to rebuilt the house again
Anyway this is fairly old (account issues) so I'll be doing a newer one soon
Sorry for the shitty video camstudio completely screwed up and I was too lazy to rebuilt the house again
Anyway this is fairly old (account issues) so I'll be doing a newer one soon
- Ginto8
- ES Beta Backer
- Posts: 1064
- Joined: Tue Jan 06, 2009 4:12 pm
- Programming Language of Choice: C/C++, Java
Re: Minecraft remake- Crafter
I'm curious, how did you get the transparent textures to work?
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
Re: Minecraft remake- Crafter
When dealing with 3D you just have to fill the vertices counter clockwise. there are other alternatives but this is the easiest in my opinion.Ginto8 wrote:I'm curious, how did you get the transparent textures to work?
Not sure how specific you want me to be so do say if you want me to elaborate
EDIT:
I think I know why you asked, if it's about part of the inner house showing in one of the screen shots then it's because I'm drawing the faces of each cube only if it's visible to the camera and obviously it needs to ignore this for transparent ones. I've got to finish block attributes before I can add this kind of functionality though.
- Ginto8
- ES Beta Backer
- Posts: 1064
- Joined: Tue Jan 06, 2009 4:12 pm
- Programming Language of Choice: C/C++, Java
Re: Minecraft remake- Crafter
I was asking how you got transparency to work in 3D because I've heard that it's very difficult to pull of with the depth buffer, because you end up with transparent things being drawn and, instead of allowing things behind them to be visible, it blocks them out via the depth buffer.
I think that's clear, but I might just be babbling from my headache. If you didn't understand it, I'll clarify when it goes away
I think that's clear, but I might just be babbling from my headache. If you didn't understand it, I'll clarify when it goes away
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
Re: Minecraft remake- Crafter
I agree I've read that when using depth you should always draw your polygons and then your transparent ones each frame so that OpenGL can handle the rendering order correctly.Ginto8 wrote:I was asking how you got transparency to work in 3D because I've heard that it's very difficult to pull of with the depth buffer, because you end up with transparent things being drawn and, instead of allowing things behind them to be visible, it blocks them out via the depth buffer.
I think that's clear, but I might just be babbling from my headache. If you didn't understand it, I'll clarify when it goes away
So far though minus my little map bug which will be fixed soon I've had no problems rendering transparent ones as they are found. However the entire portion of the map that gets drawn is rendered as a single mesh for performance reasons so I'm *guessing* this has something to do with it.
- Ginto8
- ES Beta Backer
- Posts: 1064
- Joined: Tue Jan 06, 2009 4:12 pm
- Programming Language of Choice: C/C++, Java
Re: Minecraft remake- Crafter
so you ARE using the depth buffer right?
Anyway, for your bug it just looks like an error when calculating which faces to draw. You're not drawing faces that are either touching glass or touching the "selection" block, and that's causing the "I can see inside blocks!" glitch. Also, you might want to set up backface culling.
Anyway, for your bug it just looks like an error when calculating which faces to draw. You're not drawing faces that are either touching glass or touching the "selection" block, and that's causing the "I can see inside blocks!" glitch. Also, you might want to set up backface culling.
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
Re: Minecraft remake- Crafter
Yip I'm definitely using the depth buffer and I've already got backface culling. Like I said it is in fact a glitch with the way I'm drawing the faces of each cube.Ginto8 wrote:so you ARE using the depth buffer right?
Anyway, for your bug it just looks like an error when calculating which faces to draw. You're not drawing faces that are either touching glass or touching the "selection" block, and that's causing the "I can see inside blocks!" glitch. Also, you might want to set up backface culling.
For example if I'm about to draw the left face of a cube then I'd do something like this:
Code: Select all
// If there is a block to the left then the player wouldn't see this face. (0 = no empty space)
if ( Blocks[x-1][z][y] == 0 ) {
// Draw the face
}
Once I've set it up so that each type of block I.E. grass, dirt, water etc have their own attributes I can give an exception so that if the block is at all transparent it will ignore this logic.
- TheBuzzSaw
- Chaos Rift Junior
- Posts: 310
- Joined: Wed Dec 02, 2009 3:55 pm
- Current Project: Paroxysm
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Contact:
Re: Minecraft remake- Crafter
Source code or it didn't happen!
I'm actually curious as to how you built your scene graph. Are you just using a massive array as hinted at in that code sample above?
I'm actually curious as to how you built your scene graph. Are you just using a massive array as hinted at in that code sample above?
Re: Minecraft remake- Crafter
You're correct I use a simple 3D array 256x256x64. Let's be fair this seems the simplest way to do this and from what I've heard of interviews with Notch he does it the same way too only you can go higher than this (Crafter will too eventually)TheBuzzSaw wrote:Source code or it didn't happen!
I'm actually curious as to how you built your scene graph. Are you just using a massive array as hinted at in that code sample above?
- MadPumpkin
- Chaos Rift Maniac
- Posts: 484
- Joined: Fri Feb 13, 2009 4:48 pm
- Current Project: Octopia
- Favorite Gaming Platforms: PS1-3, Genesis, Dreamcast, SNES, PC
- Programming Language of Choice: C/++,Java,Py,LUA,XML
- Location: C:\\United States of America\Utah\West Valley City\Neighborhood\House\Computer Desk
Re: Minecraft remake- Crafter
The issue you and Ginto8 are talking about with the depth is mostly ancient and USUALLY doesn't happen with a handy dandy depth buffer. Honestly this still comes up from time to time, but until it does (even once) you really shouldn't worry about it too much. I've not had a problem with it for a long time.(But, shit happens)
EDIT: But I have had problems with it, just not since I got better at rendering techniques.
EDIT: But I have had problems with it, just not since I got better at rendering techniques.
While Jesus equipped with angels, the Devil's equipped with cops
For God so loved the world that he blessed the thugs with rock
For God so loved the world that he blessed the thugs with rock
Re: Minecraft remake- Crafter
Don't worry I think I'm not describing what's causing the issue too wellMadPumpkin wrote:The issue you and Ginto8 are talking about with the depth is mostly ancient and USUALLY doesn't happen with a handy dandy depth buffer. Honestly this still comes up from time to time, but until it does (even once) you really shouldn't worry about it too much. I've not had a problem with it for a long time.(But, shit happens)
EDIT: But I have had problems with it, just not since I got better at rendering techniques.
Some of my optimization is having a lot of strange but expected affects such as this one. Just you wait until I've finished the block attributes and I promise this issue will be gone forever
- THe Floating Brain
- Chaos Rift Junior
- Posts: 284
- Joined: Tue Dec 28, 2010 7:22 pm
- Current Project: RTS possible Third Person shooter engine.
- Favorite Gaming Platforms: PC, Wii, Xbox 360, GAME CUBE!!!!!!!!!!!!!!!!!!!!!!
- Programming Language of Choice: C/C++, Python 3, C#
- Location: U.S
Re: Minecraft remake- Crafter
Its looking good
"Why did we say we were going to say we were going to change the world tomorrow yesterday? Maybe you can." - Myself