Shader Trunk Integration

Okay, this I guess more of a question/thought on how the blender foundation works, but I’ve been wondering: Martinsh (and others, but he is the shining god among them) have created wonderful shaders for the ge that have been stable and run quite efficiently. However, they’ve never actually been implemented directly into blender (or any trunk). This isn’t necessarily a problem, however you have to go searching for it, load it into your file, and so on. Not to mention, it almost seems that some of these shaders have been practically forgotten, and fallen to a point where they don’t work, and since they aren’t actually implemented features, no one really seems to notice them, and the people who made them are usually busy and have better things to do than update their shaders every time a new build comes out. Also, a god-damn mouse-look script needs to be built in.

My opinions:Yes,you are right,maybe this things will happen when Harmony branch is over.

Is there no way we can put it in trunk as members, or is that up to people at the BF?

I think this wouldn’t be quite successful.
We already have blendswap for assets and scripts. Most of the latter are outdated 2.49 scripts.
Furthermore most bge game developers will know about the game resources section here on blenderartists.

The commercial nature of that “store” would be the only thing which could make developers keep their scripts up to date but since shader scripts can be found all over the web and only have to be ported to python wouldn’t result in much profit for the sellers.

In my opinion integrating at least the most common shaders into the bge is a MUST and it ensures that these shaders will be updated with every new version of blender.

By the way, why does the BF want do keep the size of blender that low?
In comparism to other 3D Software which all have lots of GB of size blender ist is a dwarf and will still be one with some more integrated shaders.
If its the mere increase of downloadsize the BF fears they could think about other ways of distribution like torrents.

LOL! A few filters that have no more than a few kb would mega increase the size of blender,up to 2 gb.

Well, I actually think the idea about a semi-official BGE-dedicated website doesn’t sound like such a bad idea.

  • Of course, it shouldn’t be a place solely for assets(shaders, scripts, etc.), but perhaps also contain a section for well-written tutorials, and provide a better showcase for what’s really possible with the BGE (rather than just 5-minute cubes and spheres games).

Regarding the Blender size, I think it would be best to keep it structurally lightweight rather than a software swizzknife-behemoth. In Max or Maya, you can often spent several minutes to find what you need in the long list of included scripts, where as in Blender, you are not so easily obstructed by immense lists of included semi-useless scripts, and if you need something, you can always just download and install it (as with LuxRender or Suicidators Citybuilding script for example).

Couldn’t we have nice sticky thread where we collect all these resources here on the forum, and take care of them? Or some kind of community plug-in / addon with these features gathered together?

I think integrating the more well-used shaders (like SSAO, chromatic aberration, bloom, depth of field, and color correction) would be nice. If it’s a matter of size, some of the less useful shaders could be taken out, or even combined (sepia and grayscale could probably be combined, perhaps even into the color correction filter).

The sticky thread method would probably work since there’s no way to keep the shaders ‘together’ now, but someone still has to update them.

An asset store may or may not work, but the ability to have BGE viewable assets available directly would be a good idea. Maybe it would just be an add-on to work with BlendSwap from directly in Blender? However, since BlendSwap has a download limit, it might not be a good idea to work with it for downloading more complex assets.

Before the asset store, a library view actually implemented into Blender would probably be a good idea (being able to physically see objects, materials, and other resources append-able from a blend file, or add-able through groups, for example).

There are alot developments going on but i dont know why its not in the trunk. .need a UI for the shaders. .Water is a must. .martinsh water shader is mindblowing

Doesn’t Unity have such a “Asset-Store” system?
I like the idea and would work on it, btw. could work on a concept for it. :slight_smile:
It could be realizable with a little group, I think.

And there should even be a website especially for the blender game engine, which includes a nice portfolio about very well game projects.
If there is a higher amount of bge users, I think there would be more development.

Yeah, I’m not implying we have implement like 80 shaders into the bge, even though that would add like a megabyte, but mostly the more popular used ones as solarlune said, like ssao, light scattering, ssgi maybe, dof, bloom, etc. It’s actually a shame, it seems that martinsh’s ssao shader has stopped working with the current build, or at least on my computer, which is a shame because that’s a real essential shader. It’s not even necessarily important that they are all implemented, but more of a way that we can keep track of, make sure they work, and ease of putting into the game.

try this one, although it needs tweaking but works on newer nVidia cards.

SSAO_spiral_mist_2.6.blend (1.63 MB)

be sure to disable the mist setting in the ssao shader file if you want to adapt it to your own project.

I’m not sure if increasing size is the reason why BF doesn’t implement those shaders yet. Increasing size of a software is normal along with increasing number of features.
Perhaps BF is just got their hands full like usual. I won’t be surprised if BF doesn’t even aware of the existance of those shaders. They need more funding to hire new developers.

+1 to the essential shaders integration in trunk, that would make BGE more feature rich.

Well, maybe I sound like an idiot, but I don’t think trunking shaders would take very long.

Made a little addon:

Instruction:
Grab the addon-script from here (needs Mercurial when used):
https://bitbucket.org/Urfoex/bge-shader/src/806d03fc69ed732f906fd97d9bc49ca4275e8acf/GLSLShaderRepository.py?at=default

[edit]
You can now also grab that “Grab-ZIP”-version here:
https://bitbucket.org/Urfoex/bge-shader/src/806d03fc69ed732f906fd97d9bc49ca4275e8acf/GLSLShaderRepositoryZIP.py?at=default

Load it in Blender:
File → User Preferences… → Addons → Install from File…

After activation you’ll get a new import option:
File → Import → GLSL Shader Repository

It will pull the shaders in using Mercurial (you need to have it installed).
The scripts will be in ~/.config/blender/2.66/scripts/bge-shader
or somewhere equal on other OS.

After that you need to restart Blender because it changes $blender/2.66/scripts/startup/bl_ui/space_text.py
That way the shader will appear unter
Text Editor → Templates → GLSL

Here is a picture with it working in ge_harmony branch. (Works also fine with normal trunk.)


[Just tested on Linux. Can’t say if or how it works on different OS.]

Have fun!

PS: There are currently not much shaders included. Just some to show that it works. Contributions, additions, critics etc. are welcome.

Seems nice. As long as the repository was updated, it would be perfect.

Personally, I would rather see the system using SVN since that is already used for Blender’s version control. This would give the option of potentially including the shader repo in Blender’s servers.

Also, I already have SVN installed :stuck_out_tongue: (though I probably have SVN, git, and Mercurial on my Arch install for the AUR)

@Sinan: The idea was just to provide “something” instead of just saying “that would be cool”. I read this thread and some others and most people just say “it would be cool to have something like this and that”. And because I had some time and an idea I just created this little piece.
I like Mercurial for development and so I choose that. Could have also done it with Git. SVN most probably not because I enjoy the features of those newer version control systems.
And with an open repository server anyone trusted can commit, update and add new stuff.

@Kupoman: I would rather love to see the move of Blender to Git or Mercurial :wink:
But I see the problem with all those extra software.
That’s why:

Here the addon that just grabs the repo as ZIP:
https://bitbucket.org/Urfoex/bge-shader/src/806d03fc69ed732f906fd97d9bc49ca4275e8acf/GLSLShaderRepositoryZIP.py?at=default

@Sinan.
You are right. I’ve collected some shader I found here and they are about 200KB all together.
I haven’t look in the source on how the Filter 2D actuator and its internal filters are implemented. But as they should also just be GLSL shader it would be fairly easy to include more post processing filter that way. And I don’t think that BF would argue against including more of those little lines.

Somebody just needs to do it and then push it to trunk.

1 Like