Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Minecraft with Shaders


  • Please log in to reply
37 replies to this topic

#21

makaroni
    makaroni

    Redstone Miner

  • Members
  • 586 posts
  • Location: FINLAAAAANDDD

Posted 02 October 2010 - 12:07 PM

mitsuhiko said:

makaroni said:

Minecraft with shaders would be a automatic-computer-rape-machine (ACRM).
How so? Minecraft is not utilizing the GPU at all. It's idling.

Quote

And java might not like shaders either.
Java has nothing to do with it. Minecraft is using OpenGL which does Shaders just fine.

Quote

Minecraft is good the way it is.
That does not mean one should not attempt to improve it with a mod.

Oh, i thought you wanted notch to add shaders, if its a mod its all good.

And i have never seen a java game with shaders :/

EDIT: And minecraft rapes my computer already, with shaders it would be horrible D:

Register or log in to remove.

#22

xtremeqg

Posted 02 October 2010 - 12:11 PM

Shaders are done through graphics APIs such as OpenGL. It does not matter which language the game is written in (Java, C#, C++, etc).

#23

nursesaids
  • Location: Deep within the Earth

Posted 02 October 2010 - 12:24 PM

Despite that I love Minecraft's look, I'm not all that opposed to the pic the OP posted. Reminds me of 3-D Dot Hero's a bit.
Posted Image

#24

IkeKrull

Posted 02 October 2010 - 10:08 PM

I've been exporting minecraft levels to sauerbraten, which allows the use of more advanced texturing techniques. Sauerbraten can't support an 'infinite' minecraft world, but should be able to handle a usefully large chunk of it.

http://www.minecraft...hp?f=25&t=42602

#25

zagzaggr

Posted 02 October 2010 - 10:48 PM

As long as the feel is the same, it would be nice to have some sort of material shaders too. Like gleaming gold and diamond blocks. Still 16x16 (or 32x32) but shiny . It shouldn't affect fps too much, and anything other than the most basic intel cards should be able to handle it easily.

As for depth of field, how would it work ? Focus on the distance of the block you're looking at and blur the rest? It looks excellent but it has the potential of becoming annoying after a while, unless it's really subtle..

#26

Nightwatch

Posted 02 October 2010 - 11:52 PM

blaster said:

Posted Image
Flat shading is what we have now, phong shading would be the highest detail.

I think gouraud shading would be best for minecraft though
http://en.wikipedia....ud_low_anim.gif
Just change them triangles to squares and it should work.

Phong shading would not be a good idea, because it would destroy the retro look. Notch seems to like the graphics blocky, and if you interpolate the surface normals you'll have a bunch of round looking cubes.

mitsuhiko said:

Hey everybody,

When I found this wallpaper (minecraft wallpaper) I was hooked by the idea of having bump mapping and a depth of field shader in Minecraft. Does anyone know if people tried to hook into the rendering pipeline of the game already to inject shaders for materials?

That + basic antialiasing and bilinear filtering for textures would probably result in a much nicer graphic without slowing down the game as the graphics card is currently not doing much on the shader layer anyways.

Regards,
Armin

Bump mapping would be very slow with the sheer number of lights that could exist. A block would have to be drawn the same number of times as there are lights affecting the block, unless some sort of deferred shading scheme were implemented. Don't forget this is Java, with a huge overhead for function calls (all are virtual and non-inlined), so the less work that has to be done each frame the better. Although the actual normal mapping is computed by the gpu, it's a very simple shader and the bottleneck would be the cpu.

Bilinear filtering would make the blocky textures look blurred, which personally I don't find desirable.

#27

dead pandas

Posted 03 October 2010 - 01:09 AM

zagzaggr said:

As long as the feel is the same, it would be nice to have some sort of material shaders too. Like gleaming gold and diamond blocks. Still 16x16 (or 32x32) but shiny . It shouldn't affect fps too much, and anything other than the most basic intel cards should be able to handle it easily.

As for depth of field, how would it work ? Focus on the distance of the block you're looking at and blur the rest? It looks excellent but it has the potential of becoming annoying after a while, unless it's really subtle..
it would probably work as it does in many large map style games nowadays, it's very rarely active if active at all, and its only function will be to blur objects at an incredibly long distance like this (well, ingame it's actually quite a bit further but you get the point)

#28

ithkuil
    ithkuil

    Out of the Water

  • Members
  • 9 posts

Posted 08 October 2010 - 10:12 PM

I am on board with the shaders idea.  I actually feel like a talented GLSL programmer could render the terrain efficiently and much, much more realistically.  You could leave the original for the retro fans of course.

Just wanted to throw my idea out there.  I tried last night to get a Java JOGL environment set up.  I was tired and didn't know what I was doing so that was frustrating.  However I do believe (although I haven't tried to look at a decompile) that it is probably possible (assuming very difficult) to create a mod that replaces the entire rendering with shaders.  Not sure how practical that is.  Maybe notch will add a rendering hook for plugins.

I am telling you guys this because I make a lot of plans that never get implemented so in case it could at least possibly give someone on the planet an idea it is not totally wasted brainjuice.

What I want to do at the moment if I can stay focused enough is just to play around with rendering the Minecraft maps more or less entirely on the GPU, in a web browser like Chromium, using WebGL, with vertex, geometry and fragment shaders.  Basically all you would be passing in is the map data as vertices and possibly another buffer or something with the types for each block.  

The point of this is not to create another Minecraft clone but just to have another way of (more realistically) visualizing maps in first person perspective.  What else you can do with it I don't know.  I would not try to copy Minecraft at this point because I feel like the world generation is too advanced to approach without a significant background in that (and besides you Minecraft is awesome, and and awesome force of nature, not something to fight against).  But maybe you can do interesting things with existing maps.  To me JavaScript is nice for plugins and such because you can easily modify objects or dynamically attach functions wherever.

So your shaders just get the voxels and render them on the GPU.  A lot of approaches to that, none of them seem very easy, but I think there are at least a few ways that could work.  One thing you could do would be to use a geometry shader to create triangles connecting voxels.  Maybe a way to cheat would be to divide the world into top and bottom heightmaps.  Or perhaps you could use something like marching cubes.  Or maybe you could really cheat and get something halfway interesting using just interpolated vertices like the whole world was particles.

To take a step back from that, my approach for getting the world data into a file that I can load into the shader with JavaScript is to hack a gziped JSON export command on to mce (the python script).  So you get a file with JSON that is compressed with gzip.  Browsers know how to uncompress gzip if you specify it.

So this JavaScript program has an input box to paste a link.  You click the button and it downloads that world file, automatically uncompressing.  Then it converts the JSON array or whatever into vertex data and loads the shader programs.  Then you can walk/fly around and stuff.

#29

Paragraph
  • Location: Sweden
  • Minecraft: Indent

Posted 09 October 2010 - 12:09 AM

I'm probably 15 years behind the rest of you in programming, so I won't make this too long as I'll just look like a fool.

Motion blur.

Can it be done, and how would you other Minecraftians feel about this addition to the graphics, would it be a nuisance?
For Kralnor!

#30

Zikel
    Zikel

    Iron Miner

  • Members
  • 311 posts
  • Location: I just know that I have to survive.
  • Minecraft: Zikel

Posted 09 October 2010 - 12:30 AM

Paragraph said:

I'm probably 15 years behind the rest of you in programming, so I won't make this too long as I'll just look like a fool.

Motion blur.

Can it be done, and how would you other Minecraftians feel about this addition to the graphics, would it be a nuisance?

Need Anti-Aliasing to look good I think.

#31

CobraA1
    CobraA1

    Obsidian Miner

  • Curse Premium
  • Curse Premium
  • 1374 posts
  • Minecraft: CobraA1

Posted 09 October 2010 - 01:03 AM

Quote

And i have never seen a java game with shaders :/

As has been said before - it's not Java doing the 3D. He's using a special library to access OpenGL, and yes, it supports shaders.

Quote

Don't forget this is Java, with a huge overhead for function calls (all are virtual and non-inlined)

Java can and does actually inline functions when it thinks it can. Just because you can't declare it explicitly doesn't mean the functionality doesn't exist. Yes, Java hides a lot of optimization details, however that does not mean the JVM is not aware of them. The latest JVMs are very good at optimization.

Quote

Bump mapping would be very slow with the sheer number of lights that could exist.

I'm thinking that that could be overcome somewhat by prioritizing lights at the user's location and only using, say, the top two or top four lights for the bump maps. Generally speaking, people aren't gonna notice much if lights further away aren't contributing to the maps. There's not enough depth in most bump maps to make people aware of missing lights.

Quote

Can it be done, and how would you other Minecraftians feel about this addition to the graphics, would it be a nuisance?

There are two basic ways to create motion blur - the realistic way (multiple renders between frames), and the fast way (overlay previous frames on current frame). The fast way can be a cool effect, but tends to exaggerate the blur unrealistically. The realistic way looks realistic, but since you're just rendering the frames multiple times, it will obviously affect the framerate.

All that being said, my opinion:

I personally would like to see the graphics improved. Yes, the current style is very retro, but I think that sometimes getting stuck on one way of doing things can hold back the potential of a game.

I think the graphics can still be stylized yet take advantage of modern hardware - look at TF2, Darwinia, and WoW: Cataclysm.

All are using some shaders for their graphics, yet they very much retain a very recognizable, stylized, and even retro look. No, shaders will not kill the look of a game if done carefully.

I think people are a bit too stuck on the idea that shaders == realism. That is certainly not the case, as they can add unrealistic but fun style to a game.

. . . and I don't really think that I'd like to see this game stick with a flat illumination model. As retro as it looks, I really don't think it really has to be that retro. I'd like to see what something like ambient occlusion or some other fast global illumination shader would do to this game.

I've been playing around with some of the texture packs - and I don't think that adding some detail is really gonna hurt Minecraft all that much. It's still the same game, and it still plays the same way.

The game doesn't look bad at all with different graphics, and I think people are just fearing change.
When all is said and done,  Will you have said more than you have done?

#32

marfig
    marfig

    Void Walker

  • Members
  • 1607 posts

Posted 09 October 2010 - 02:05 AM

GlukaSchlok said:

AA and texture filtering are the most important things that the game is in need of graphically at the moment. Neither of those would affect the retro look of the game, they'd just make everything look cleaner/smoother. You would still have your pixelated landscape, but now you'd actually be able to see the pixels on those textures instead of a garbled mess.

Absolutely! The improvements would be immense and it would retain the retro look. There's really no need for anything else beyond that. Once (and if) we get AA and texture filtering, everyone will forget about shaders.
I was trying to think of a signature and this is what came up.

#33

Knots
    Knots

    Stone Miner

  • Members
  • 74 posts

Posted 11 November 2010 - 08:38 PM

Hey, guys!  I've figured out how we can apply shaders to minecraft, but so far I haven't been able to do it myself.

The trick is, we need an OpenGL wrapper.  A good one.  I've tried GLDirect but that crashes the game.  You simply put the wrapper in the same folder as java.exe along with a build of enbseries.  I know it's at least partially the wrappers fault because I can't get it to work with any other OGL games, either.  I think this would work with a good wrapper because the enbseries text DOES pop up in the upper left hand corner before the crash.

If we got enbseries working, that'd give us depth of field, bloom, and motion blur easily.  Does anyone know something I don't?

Someone with the know-how could code an enbseries like thing that was specific to opengl, too, by modifying opengl32.dll.  In theory.
==>[things] JUST GOT REAL
^Modding guides for Morrowind & Oblivion

#34

CobraA1
    CobraA1

    Obsidian Miner

  • Curse Premium
  • Curse Premium
  • 1374 posts
  • Minecraft: CobraA1

Posted 11 November 2010 - 10:00 PM

Yeah - after looking at the Amient Occlusion mod - I do think that basic shaders would help the game. I'd be against trying to make Minecraft into something it's not, but they can really help the game if used properly.

Just because it has a classic "style" doesn't mean it hurts to throw in a bit of modern graphics. Games like Darwinia and Team Fortress 2 combine retro styles with some modern shaders for some really cool effects.
When all is said and done,  Will you have said more than you have done?

#35

OmegaJasam

Posted 11 November 2010 - 11:28 PM

I couldn't say for sure, but it wouldn't suprise me if using shaders for the current effect would end up with more performance.

And OpenGL 1.1? Seriously? Most of it's functionality has been depricated in favour of much faster options... I hope once Notch gets a stable build and a full team that they will put some seriosu work into optimising things, shaders or no!
Posted Image

#36

Knots
    Knots

    Stone Miner

  • Members
  • 74 posts

Posted 12 November 2010 - 12:49 AM

CobraA1 said:

Yeah - after looking at the Amient Occlusion mod - I do think that basic shaders would help the game. I'd be against trying to make Minecraft into something it's not, but they can really help the game if used properly.

Just because it has a classic "style" doesn't mean it hurts to throw in a bit of modern graphics. Games like Darwinia and Team Fortress 2 combine retro styles with some modern shaders for some really cool effects.
Shaders make a game's geometry pop out and become "alive".  Depth of field especially is what this game is missing.  It would even have a gameplay advantage, as it would be a nice subtle reminder as to what block you currently have selected.  :3
==>[things] JUST GOT REAL
^Modding guides for Morrowind & Oblivion

#37

thrash242

Posted 12 November 2010 - 06:50 AM

Drury said:

There is something called "retro styled graphics", it's kinda strange force, and it doesn't allow Minecraft to have better graphics than it has now. No one ever discovered it as it is too awesome to be manipulated.

I don't see Minecraft as really having intentionally retro graphics at all.  Yeah, it's blocky and the textures are low res, but, that's not surprising considering they were made by a programmer, not an artist.  They do the job perfectly well, but I would not object to them looking better.  The block-based aspect will never change, but if new fancy effects were added, or the textures were improved, that would be fine with me.

If you want intentionally retro graphics, but made 3D with fancy effects, check out 3D Dot Game Heroes.  The game looks like if 2D pixels were turned into 3D blocks.

I think Minecraft looks the way it does because Notch wants to focus more on gameplay and new mechanics instead of spending a lot of time making it look pretty.  This is the same exact reason that Dwarf Fortress still uses ASCII graphics--because the developer would rather spend his time adding new fun stuff to the game.  Graphics are very time-consuming to create and when you don't have artists, graphics programmers, etc, you have to pick your priorities.

#38

CobraA1
    CobraA1

    Obsidian Miner

  • Curse Premium
  • Curse Premium
  • 1374 posts
  • Minecraft: CobraA1

Posted 12 November 2010 - 09:18 AM

Quote

I think Minecraft looks the way it does because Notch wants to focus more on gameplay and new mechanics instead of spending a lot of time making it look pretty.

Notch has actually stated that it's not the look he's going for.

Notch said:

Ambient Occlusion in Minecraft:
mcwaite: "What are your thoughts on the Ambient Occlusion mod?"
Notch: "it looks pretty, but it's not the style imvauming for" (Nov 04, 2010)

Quote

This is the same exact reason that Dwarf Fortress still uses ASCII graphics--because the developer would rather spend his time adding new fun stuff to the game.

On Windows at least, Dwarf Fortress is actually a graphical app and not a true console app. It's missing the properties window that console apps use. So I dunno what their real reasoning is. DF is certainly capable of 2D graphics, as shown by their graphical tile sets.
When all is said and done,  Will you have said more than you have done?