autogica / atgc

My side project, a game written in javascript. The "blog" is in the /issues
GNU General Public License v3.0
1 stars 0 forks source link

atgc-bundle-crystal: crystal #41

Open jbilcke opened 9 years ago

jbilcke commented 9 years ago

Ok so this is gonna be one of the coolest features of ATGC: to be able to grow crystals! They could be "grown" by keeping the mouse pressed when aiming at them, or something like that. I'm not think about small bushes, I'm talking more like giant, SF-ish crystals, the scale of a building, tower or something.

I know this may sounds dull, but think of things like sandbox / *-crafts games.. ok, the real reason is that crystals looks so so so cool, like, beautiful, and it would be a shame to not use them in a science-fiction / exotic planet setting. We should try to make them first-class citizen.

Here are some real pictures of real crystals (amazing right?), to get inspiration for the shaders: crystal-castle purple-cube-crystal tucson2010-323fluoritesphaleriteelmwoodminetennessee 800px-pyrite_from_ampliacion_a_victoria_mine _navajun _la_rioja _spain_2

jbilcke commented 9 years ago

This is the one I'm trying to model for now: 1372_3_2010113171954

Using this texture (environment / material map): atgc_crystal

jbilcke commented 9 years ago

Now there is have a simple shader material for crystals, but the result is opaque and not very sexy

Should try to implement a mix of: http://threejs.org/examples/js/shaders/FresnelShader.js and: http://threejs.org/examples/#webgl_materials_cubemap_refraction