Updated Turbulence PostFX - Visual Quality Enhancement
by smally · 07/30/2013 (10:04 am) · 28 comments
Well I don't have a video for this one, so if you feel so inclined set it up and run beneath some water.
Simple update for the turbulence postfx to make it look more visually appealing. I don't have time at the moment to do a video, as soon as I do get the time I will. This works with T3D Mit 3.0 but should work even for most older versions of T3D. I didn't test backdated engines outside of Mit 2.0, but there is nothing crazy going on in this shader. Just a replacement.
Instructions:
Download the zip, extract it and copy the files to your game folder. There are only 2 files to update, turbulence.cs and turbulenceP.hlsl
If needed I can post the contents here as well. Nothing major there.
Enjoy!
turbulence.zip
Simple update for the turbulence postfx to make it look more visually appealing. I don't have time at the moment to do a video, as soon as I do get the time I will. This works with T3D Mit 3.0 but should work even for most older versions of T3D. I didn't test backdated engines outside of Mit 2.0, but there is nothing crazy going on in this shader. Just a replacement.
Instructions:
Download the zip, extract it and copy the files to your game folder. There are only 2 files to update, turbulence.cs and turbulenceP.hlsl
If needed I can post the contents here as well. Nothing major there.
Enjoy!
turbulence.zip
About the author
Most people say that is it is the intellect which makes a great scientist. They are wrong: it is character. -- Albert Einstein
Recent Blogs
#22
The only thing Ivan / Liman wanted was #1 to be asked first, and #2 credit.
No one can claim copyright over the shader system in T3D except for GG. That belongs to them and T3D. So that's not the question. The question was the core code of that first turbulence shader, as it was based on one that was posted with collaboration into the community.
Basically the long reaching effects from what I see here is this:
Even if it's posted in the forums, ASK the author first before submitting. Which isn't a big deal.
But People hear me out here, PLEASE... Do not, under any circumstances, post code into the forums you plan to sell, or even remotely have the thought of selling.. Keep that to yourself..
I love the collaboration, but I'm sure I'm like a lot of us here, that don't want the waters muddied leading to confusion.
And if you don't feel the same, please correct me if I'm wrong.. Seriously...
08/13/2013 (7:36 pm)
The original turbulence shader that was first pushed into the core.The only thing Ivan / Liman wanted was #1 to be asked first, and #2 credit.
No one can claim copyright over the shader system in T3D except for GG. That belongs to them and T3D. So that's not the question. The question was the core code of that first turbulence shader, as it was based on one that was posted with collaboration into the community.
Basically the long reaching effects from what I see here is this:
Even if it's posted in the forums, ASK the author first before submitting. Which isn't a big deal.
But People hear me out here, PLEASE... Do not, under any circumstances, post code into the forums you plan to sell, or even remotely have the thought of selling.. Keep that to yourself..
I love the collaboration, but I'm sure I'm like a lot of us here, that don't want the waters muddied leading to confusion.
And if you don't feel the same, please correct me if I'm wrong.. Seriously...
#23
So giving 10 programmers the goal to write the same type of shader, assuming that they are all looking for the best optimized way to do it, their code is going to be very similar. Especially if the basic thought pattern for how it should work was published PUBLICLY on the internet.
So, if I write a shader that the end result does the same thing they "Copyrighted" they could in fact "claim" copyright infringement since in the current implementation of shaders in the T3D engine lend to a typical format of the final product in shader syntax.
Just my 2cents, personally I don't care for the stock shader system.
08/13/2013 (7:58 pm)
But the question is of course is that there is programmatically only so many ways to write a shader. So giving 10 programmers the goal to write the same type of shader, assuming that they are all looking for the best optimized way to do it, their code is going to be very similar. Especially if the basic thought pattern for how it should work was published PUBLICLY on the internet.
So, if I write a shader that the end result does the same thing they "Copyrighted" they could in fact "claim" copyright infringement since in the current implementation of shaders in the T3D engine lend to a typical format of the final product in shader syntax.
Just my 2cents, personally I don't care for the stock shader system.
#24
There is nothing stopping a person from copyrighting all of the github submissions before they are merged into the engine even if they didn't create them.
They CAN do it, is it ethical? is it a valid copyright? there is nothing stopping them and it is up to the community to challenge there copyright that they purport they have.
This just really seems beyond stupid that
was able to be copyrighted. I mean what is it 20 lines of code? I know the hoops I need to go through to copyright my stuff, it requires 50 pages of code at minimum.
And please, could you write me a shader that has the same effect I guess we would need to call it "SomeFunnyEffectOnWater" since "turbulence" is now copyrighted....
I mean, lets say I have a thread about how to do something in torquescript. The community helps me out and it's now a very useful function called foo(). So I now head off to my Copyright office with a function the community worked on and say it's mine I want it copyrighted. Can I do it? of course, is it ethical, well... would it hold up in court... (does anyone have the money to challenge me?)
I'm glad this happened to be honest, because it opens up a whole new way to force people to buy your product. Kinda wish I had thought of it....
08/13/2013 (9:16 pm)
And, well since I couldn't sleep because this issue kinda ticked me off. There is nothing stopping a person from copyrighting all of the github submissions before they are merged into the engine even if they didn't create them.
They CAN do it, is it ethical? is it a valid copyright? there is nothing stopping them and it is up to the community to challenge there copyright that they purport they have.
This just really seems beyond stupid that
#include "./postFx.hlsl"
uniform float accumTime;
float4 main( PFXVertToPix IN, uniform sampler2D inputTex : register(S0) ) : COLOR
{
float reduction = 128;
float power = 1.0;
float speed = 3.0;
float frequency=8;
float backbuffer_edge_coef=0.98;
float2 screen_center = float2(0.5, 0.5);
float2 cPos = (IN.uv0 - screen_center);
float len = 1.0 - length(cPos);
float2 uv = clamp((cPos / len * cos(len * frequency - (accumTime * speed)) * (power / reduction)), 0, 1);
return tex2D(inputTex, IN.uv0 * backbuffer_edge_coef + uv);
// float4 color = tex2D(inputTex, IN.uv0 * backbuffer_edge_coef+(sin*right));
// return color;
}was able to be copyrighted. I mean what is it 20 lines of code? I know the hoops I need to go through to copyright my stuff, it requires 50 pages of code at minimum.
And please, could you write me a shader that has the same effect I guess we would need to call it "SomeFunnyEffectOnWater" since "turbulence" is now copyrighted....
I mean, lets say I have a thread about how to do something in torquescript. The community helps me out and it's now a very useful function called foo(). So I now head off to my Copyright office with a function the community worked on and say it's mine I want it copyrighted. Can I do it? of course, is it ethical, well... would it hold up in court... (does anyone have the money to challenge me?)
I'm glad this happened to be honest, because it opens up a whole new way to force people to buy your product. Kinda wish I had thought of it....
#25
This was not a discussion about what is copyrighted or not. The case is different. Ivan has invested time and efforts to create something. The shader was 100% the same (even the comments, even the names of the variables). Exposing his own work to public without giving credits to him is unfair.
08/18/2013 (1:35 am)
@Vince,This was not a discussion about what is copyrighted or not. The case is different. Ivan has invested time and efforts to create something. The shader was 100% the same (even the comments, even the names of the variables). Exposing his own work to public without giving credits to him is unfair.
#26
The final shader that was actually included was a heavily modified version. Since I modified the shader I can tell you that I didn't have anything other than what I received for the original effect; Which was posted to the forums.. All modifications were made on my own, with my own testing. I seriously doubt the final shader that was included is EXACTLY the same line for line because of that.
Considering that the original shader appeared to be a community effort, we just continued in that vein. I ended up researching to find where it originally came from and if it was a community effort or not and it appeared to be so.
I didn't change the variable names because I didn't want to destroy the intended functionality of the original shader itself.
For the one I created (linked in this resource)... it's obviously a different shader entirely and that was an old, ooooooold effect I've had laying around in some of my old 2d engines and had to convert sin and cos lookup tables to the real thing (read: no big deal).
Rant portion:
I can't say anyone was really in the wrong here because the original shader appeared to be a community contribution. I'm glad you stepped in and helped with info from Ivan and from yourself as well Lyubomir, I really am. It helped clear up the issue and deal with it in a timely manner and that's important.
The reason Ivan or liman3d wasn't credited, I'm fairly certain, is because there was no copyright notice or clear author IN the community code. As much as that sucks to say, that's the truth of it. Following the forum thread you can glean that Ivan was the one creating the actual effect. Aside from that, If there was a copyright notice in the original code, it wouldn't have been touched at all; especially not by me or Ron. Neither him or I, or GG condone that kind of behavior or abuse in terms on stated works. Obviously I can't speak for him or GG but I'm fairly certain that's the case and there truly was no ill will associated nor intended with any of it. I ended up creating a new one for a project because even the modified one was bugging me.
Also we can't track if someone takes something they posted to any forums and tell if they've included it into a product or not. Which is where my original plea stating that, if you use something ASK the author, comes from.
At this point I would seriously like to ask if it's possible to not continue with exacerbating the subject? (Not directed at anyone in particular)
It's disappointing to me, that this resource has turned into finger pointing and debate around something that should have been a simple thing.
08/19/2013 (10:51 am)
I'm not at all for not giving credit to anyone that deserves it, so please don't get me wrong while reading the following. Warning slight Rant:The final shader that was actually included was a heavily modified version. Since I modified the shader I can tell you that I didn't have anything other than what I received for the original effect; Which was posted to the forums.. All modifications were made on my own, with my own testing. I seriously doubt the final shader that was included is EXACTLY the same line for line because of that.
Considering that the original shader appeared to be a community effort, we just continued in that vein. I ended up researching to find where it originally came from and if it was a community effort or not and it appeared to be so.
I didn't change the variable names because I didn't want to destroy the intended functionality of the original shader itself.
For the one I created (linked in this resource)... it's obviously a different shader entirely and that was an old, ooooooold effect I've had laying around in some of my old 2d engines and had to convert sin and cos lookup tables to the real thing (read: no big deal).
Rant portion:
I can't say anyone was really in the wrong here because the original shader appeared to be a community contribution. I'm glad you stepped in and helped with info from Ivan and from yourself as well Lyubomir, I really am. It helped clear up the issue and deal with it in a timely manner and that's important.
The reason Ivan or liman3d wasn't credited, I'm fairly certain, is because there was no copyright notice or clear author IN the community code. As much as that sucks to say, that's the truth of it. Following the forum thread you can glean that Ivan was the one creating the actual effect. Aside from that, If there was a copyright notice in the original code, it wouldn't have been touched at all; especially not by me or Ron. Neither him or I, or GG condone that kind of behavior or abuse in terms on stated works. Obviously I can't speak for him or GG but I'm fairly certain that's the case and there truly was no ill will associated nor intended with any of it. I ended up creating a new one for a project because even the modified one was bugging me.
Also we can't track if someone takes something they posted to any forums and tell if they've included it into a product or not. Which is where my original plea stating that, if you use something ASK the author, comes from.
At this point I would seriously like to ask if it's possible to not continue with exacerbating the subject? (Not directed at anyone in particular)
It's disappointing to me, that this resource has turned into finger pointing and debate around something that should have been a simple thing.
#27
I am sure it wasn't intentional. It's more disappointing for me that this resource turned into debate like this. Yes, we don't have any copyright notices in the shaders' code in any of our Shader Packs. I am sure credits weren't given because of this.
What actually happened - Ivan knows his coding style, variable names, he also had made one trick (as he told me) in this turbulence shader to increase the quality of the effect and when he saw the resource he was 100% sure it was his code.
Again I am happy we sorted that out. I wouldn't like to continue with exacerbating the subject too. We both (me and Ivan) value a lot the job you all do to make Torque 3D a better engine. Ivan has also contributed a lot of bug fixes in earlier versions of Torque3D. Let's keep the forum friendly and constructive!
08/19/2013 (12:08 pm)
@smally,I am sure it wasn't intentional. It's more disappointing for me that this resource turned into debate like this. Yes, we don't have any copyright notices in the shaders' code in any of our Shader Packs. I am sure credits weren't given because of this.
What actually happened - Ivan knows his coding style, variable names, he also had made one trick (as he told me) in this turbulence shader to increase the quality of the effect and when he saw the resource he was 100% sure it was his code.
Again I am happy we sorted that out. I wouldn't like to continue with exacerbating the subject too. We both (me and Ivan) value a lot the job you all do to make Torque 3D a better engine. Ivan has also contributed a lot of bug fixes in earlier versions of Torque3D. Let's keep the forum friendly and constructive!
#28
It's truly unfortunate.
I also hope you get your way there Lyubomir, about including the shader packs back to your website. I don't know how many people are looking at them, etc but I always thought for you guys there, it would be in your best interest to keep them around. Hopefully that goes well. I know it could help people who aren't familiar with HLSL or any shader code to get some decent effect quickly implemented and have most of their material supplementation needs dealt with quickly that way. ;)
08/19/2013 (12:23 pm)
For me, It's not the shader packs that are the contention point there. It's the code in the forum.. Now, the original shader may have been included in the shader pack, but any and all modifications to the forum code past that point, weren't pulled from any pack.It's truly unfortunate.
I also hope you get your way there Lyubomir, about including the shader packs back to your website. I don't know how many people are looking at them, etc but I always thought for you guys there, it would be in your best interest to keep them around. Hopefully that goes well. I know it could help people who aren't familiar with HLSL or any shader code to get some decent effect quickly implemented and have most of their material supplementation needs dealt with quickly that way. ;)

Torque 3D Owner Paul Yoskowitz
WinterLeaf Entertainment
whats the long reaching effects here? since there are only so many ways to write a shader, (for example: turbulance) that any variant of a turbulence shader would be infringement? do we need a list now of the shaders that are written by this group so we know what we can write and what has to be purchased through them?