GLSL Sources

Have found a source for working GLSL shaders for the gameengine

Link to the website:

http://www.ozone3d.net

Most of the Basic GLSL shaders that they use could be implemented into the Blender GE

Here are some samples:

A simple ToonShader

http://3dmanzone.kilu.de/MeineBlenderDateien/Toon.blend

Toon Shader with Texture

http://3dmanzone.kilu.de/MeineBlenderDateien/ToonTexture.blend

And last for now a X-Ray Shader

http://3dmanzone.kilu.de/MeineBlenderDateien/XRay.blend

Other samples will follow

hey thanks… I’ve checked out OZONE3d before… very cool site… lots of useful info… thanks for the blends…

nice stuff, thanks D-Man!

Another Sample called Wraped Texture

http://3dmanzone.kilu.de/MeineBlenderDateien/WrapedTexture.blend

And last for today a sample of SphereEnvironmentMaping

http://3dmanzone.kilu.de/MeineBlenderDateien/SphereEnv.blend

Nice. The x-ray blend is impressive. Thanks for sharing.

the wraped? do you mean warped texture link is giving me a 404 error… also in the sphere demo the vertex shader doesn’t compile properly… have you tried using shader designer to design and test your shader and then porting it to blender? What graphix card to yo have Nvidia or ATI? I have a nvidia one.

Have repaired the link for the Warped Texture Sample
And the SphereEnv Sample now should work without problems.
There was a failure in the script(forgotten to set a vec3).

Samples do work on a Nvidia Geforce 5500 FX and a Geforce 7300.

nice texture warping… I was going to try and do the same thing with the shaders from ozone3d… eventually… nice to know the texture warping works… I forsee some good looking water shaders! thanks for fixing the link… yeah both files work fine… are you going to do the cube map reflection next? :wink:

Woah! Thanks! :slight_smile: It works on my Geforce 6600 great!

I wasn’t able to re-create any of them though. I made a new object, made the same kinda materials, logic bricks, textures, with the exact same settings, and it didn’t seem to work. Would you mind typing out a small setup guide? I’m probably just missing something really obvious.

Oh and I couldn’t figure out how to change the color in the toon shader one, any ideas?

Thanks again! These shaders look great!

I was going a step further and left the cupemap sample behind.
Here is the Glossy Map sample

It was a little bit tricky to set the cubemap correctly but now it works.

Link to the file:

http://3dmanzone.kilu.de/MeineBlenderDateien/GlossMap.blend

@facemania:

take a look at the line that starts with:

"vec4 materialColor = vec4(1.0,0.0,0.0,1.0);"

that's the line where the Diffuse Color goe's into. its a RGBA Vector.
to change the color you need to change the first three values.

A better way to get a nice result is changing the texture in sample "ToonTex" to a plain colored texture.

Here is another sample from Ozone3D realized in Blender.

http://3dmanzone.kilu.de/MeineBlenderDateien/ProjectedMaping.blend

It’ s a Sample of porjected maps. I have the original sample modified, so now
we have a dynamic projected Map.

By the way: is there an option to turn texture repeat off into teh gameengine.
That’s a problem a did not solved, so the projection texture in this sample repeats.

Altering your nice files I got this:

http://blenderbuch.de/daten/Experimente/Water.blend

I wish I could find out how to add some randomness to it.

Best Regards,
Carsten

@calli:

maybe you use the datetime.datetime.now() function to get a random start value
each time you start the file. If I find the time tommorow I will add a normal map to your nice looking scene.
Is that ok for you (maybe i can get an solution for your question).

@D-Man: I meant more a randomness in the movement of the texture. I think you are using the normal map in texture channel 2 for generating the wrapping effect`? Too bad that the normal noise textures from Blender are not working for the shaders.

Carsten

@ calli:

Yes thats a problem i have seen too. I tryed the noise function taht is discriped in some GLSL samples but it doesn’t seem to work.

not all graphics card support the noise function… you can get a program from ozone 3d that will tell you what glsl /arb extensions your graphic card supports… I think mine can only do 2d noise? not 3d noise? the cube gloss map is sweet :wink:

really nice job !!

does your ozone can handle animated texture ?

i would really like to see real cube-map - where cubemapped reflection would change when your camera is viewing object from different locations

Great! have you ever check out the demos of the jMonkey engine? it uses GLSL and have some nice effects.

http://jmonkeyengine.com/index.php?option=com_content&task=view&id=30&Itemid=54

@black reaper:

The Ozone3D Engine can handle animated textures.
I’ m not shure that the Blender GE can handle them too but I will give him a try