|
Gamma Adjustments Effect Posted: 22 Jun 2008 09:54 PM |
Now because of me and Blaine, we have FULL color customization! What I mean by that is that Windows Movie Maker has RGB and brightness. I have the Gamma, and Blaine has Contrast. But my big thanks is to Blaine for the FX file. What I did was changed every part that says "Contrast" to "Gamma". And removed all of the "Blaine's World" stuff.
_______________________________________________________
The following code is corrected in a later post... please read on.
FX File (Save To C:\Program Files\Movie Maker\Shared)
#include "common.fxh"
float fGamma: Gamma;
float4 PS_Gamma( float2 f2TexCoord : TEXCOORD0 ) : COLOR0 {
float4 f4TexColor = tex2D(PointSampler, f2TexCoord);
return (f4TexColor-0.5)*fGamma+0.5;
}
technique Gamma
{
pass P0
{
VertexShader = compile vs_2_0 VS_Basic();
PixelShader = compile ps_2_0 PS_Gamma();
}
}
XML File (Save to C:\Program Files\Movie Maker\Shared\AddOnTFX)
<TransitionsAndEffects Version="2.8">
<Effects>
<EffectDLL guid="TFX">
<Effect name="Gamma 50%" iconid="1" guid="Gamma 50%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="Gamma.fx" />
<Param name="Technique" value="Gamma" />
<Semantics>
<Gamma type="float" value="0.50" />
</Semantics>
</Effect>
</EffectDLL>
</Effects>
</TransitionsAndEffects>
To customize:
Change the value of the 9th line of the xml to whatever.
Tip: Negative Values Produce More Vivid Colors
|
20" iMac
2.4 GHz Intel Core 2 Duo Processor
1 GB RAM (To be upgraded..)
250 GB Hard Drive 7200RPM
Firewire 400 and 800
4 USBs
Beautiful Design |
|
 |
|
|
Re: Gamma Adjustments Effect Posted: 23 Jun 2008 03:18 AM |
Hi Aar267 & others,
I hope you think it's okay if I post some effects made of this one!
You need DPL_Gamma_Effect.fx for these effects! Check post DOWN!!!
For more effects, check post by Patrick L. and take that .fx file and my new xml 1 post under that!
TheOnePb |
Movie Maker Vista SP1 + ShaderTFX, registered
http://youtube.com/profile?user=TheOnePb1 |
|
 |
|
|
Re: Gamma Adjustments Effect Posted: 23 Jun 2008 11:01 AM |
| Thanks for helping! |
20" iMac
2.4 GHz Intel Core 2 Duo Processor
1 GB RAM (To be upgraded..)
250 GB Hard Drive 7200RPM
Firewire 400 and 800
4 USBs
Beautiful Design |
|
 |
|
|
Re: Gamma Adjustments Effect Posted: 23 Jun 2008 12:05 PM |
UPDATE!!!
The normal Gamma Level is equivalent to 1. |
20" iMac
2.4 GHz Intel Core 2 Duo Processor
1 GB RAM (To be upgraded..)
250 GB Hard Drive 7200RPM
Firewire 400 and 800
4 USBs
Beautiful Design |
|
 |
|
|
Re: Gamma Adjustments Effect Posted: 23 Jun 2008 12:49 PM |
| Tip 2: Values Above 1 also produce vivid, but not blue colors. |
20" iMac
2.4 GHz Intel Core 2 Duo Processor
1 GB RAM (To be upgraded..)
250 GB Hard Drive 7200RPM
Firewire 400 and 800
4 USBs
Beautiful Design |
|
 |
|
|
Re: Gamma Adjustments Effect Posted: 24 Jun 2008 05:19 PM |
Hi Josh
Its a good attempt however what you have changed in the .fx file is not sufficient to produce gamma correction effects... changing the name does not change the functionality... so the code is still adjusting contrast..
For Gamma Adjustment please study how gamma is calculated and then implement the formula in the .fx file. Please let me know if you need any help. |
www.rehanfx.org - do more with Windows Movie Maker... |
|
 |
|
|
Re: Gamma Adjustments Effect Posted: 24 Jun 2008 07:38 PM |
| Oh, I didn't realise. I thought it was gamma i was adjusting. But currently I am focussing on trying to study more about FX. I don't know any sites to study from. Do you have any suggestions? |
20" iMac
2.4 GHz Intel Core 2 Duo Processor
1 GB RAM (To be upgraded..)
250 GB Hard Drive 7200RPM
Firewire 400 and 800
4 USBs
Beautiful Design |
|
 |
|
|
Re: Gamma Adjustments Effect Posted: 24 Jun 2008 07:59 PM |
Here is a tutorial: HLSL (Pixel shader) effects tutorial.
The best way to learn it is to try tweaking some .fx files and seeing how it affects output. |
www.rehanfx.org - do more with Windows Movie Maker... |
|
 |
|
|
Re: Gamma Adjustments Effect Posted: 24 Jun 2008 08:31 PM |
| Wow, thanks rehan! Now I actually know what to look up when I search, and more about basic pixel shaders. I'll looking more through fx and maybe I'll release something soon if possible. |
20" iMac
2.4 GHz Intel Core 2 Duo Processor
1 GB RAM (To be upgraded..)
250 GB Hard Drive 7200RPM
Firewire 400 and 800
4 USBs
Beautiful Design |
|
 |
|
|
Re: Gamma Adjustments Effect Posted: 03 Jul 2008 10:41 AM |
Josh and Pb you might try this. It seems to match about what IrfanView does with Gamma Correction and also Rehan's reference (I think).
The FX file:
// Save as DPL_Gamma_Effect.fx to Shared Folder
#include "common.fxh"
//Global semantics for Gamma Effect
shared float gamma : Gamma = 1.0;
////////////////////////////////////////////////////////////////////////////////
// Pixel Shader For Gamma Effect
float4 PS_Gamma(float2 t : TEXCOORD0) : COLOR {
float4 lgamma=1.0/gamma; // Inverse ala' graphic editors
lgamma.a = 1.0;
return saturate(pow(tex2D(PointSampler, t),lgamma)); // Not sure if saturate needed?
}
////////////////////////////////////////////////////////////////////////////////
// Gamma Effect Technique
technique GammaEffect {
pass P0 {
VertexShader = compile vs_2_0 VS_Basic();
PixelShader = compile ps_2_0 PS_Gamma();
}
}
and an XML file:
<!-- ************* Save as DPL_Gamma_Effect.xml to AddOnTFX folder************* -->
<TransitionsAndEffects Version="2.8" >
<Effects>
<EffectDLL guid="TFX">
<Effect name="DPL Gamma 1.5" iconid="3" guid="DPL Gamma 1.5" ShaderModel="2">
<Animation value="FX" />
<FXFile value="DPL_Gamma_Effect.fx" />
<Technique value="GammaEffect"/>
<Semantics>
<Gamma type="float" value="1.5" />
</Semantics>
</Effect>
<Effect name="DPL Gamma 0.667" iconid="2" guid="DPL Gamma 0.667" ShaderModel="2">
<Animation value="FX" />
<FXFile value="DPL_Gamma_Effect.fx" />
<Technique value="GammaEffect"/>
<Semantics>
<Gamma type="float" value="0.667" />
</Semantics>
</Effect>
</EffectDLL>
</Effects>
</TransitionsAndEffects>
You can change the Gamma in the
<Gamma type="float" value="0.667" />
statement. Make Gamma >0.0. Gamma=1.0 is no change, <1.0 is darken and >1.0 is lighten.
The Icons used are the Movie Maker ones provided for Brightness, Decrease and Brightness, Increase even though the HLSL for them is more like Josh's above.
See Video Sample.
Have Fun, PatrickL |
DPL Effects and Transitions for Vista MM Website |
|
 |
|
|
Re: Gamma Adjustments Effect Posted: 03 Jul 2008 03:05 PM |
Thanks Patrick L.! Great effect, works fine!
My (new) extra effects:
You need DPL_Gamma_Effect.fx (above) for these effects to work. Save this XML to DPL_Gamma_Effect.xml in AddOnTFX!.
<!-- This XML for Windows Moviemaker 6.0 Vista installs 27 additional Gamma effects for you.
This XML is made by TheOnePb. Please use this webpage with sharing:
http://www.windowsmoviemakers.net/Forums/ShowPost.aspx?PostID=175441
Please share your additional effects on http://www.windowsmoviemakers.net/Forums/
Happy editing! [Last update 08/2008] -->
<TransitionsAndEffects Version="2.8">
<Effects>
<EffectDLL guid="TFX">
<Effect name="Gamma 0.5%" iconid="2" guid="Gamma 0.5%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.005" />
</Semantics>
</Effect>
<Effect name="Gamma 1%" iconid="2" guid="Gamma 1%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.01" />
</Semantics>
</Effect>
<Effect name="Gamma 1.5%" iconid="2" guid="Gamma 1.5%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.015" />
</Semantics>
</Effect>
<Effect name="Gamma 2%" iconid="2" guid="Gamma 2%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.02" />
</Semantics>
</Effect>
<Effect name="Gamma 2.5%" iconid="2" guid="Gamma 2.5%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.025" />
</Semantics>
</Effect>
<Effect name="Gamma 5%" iconid="2" guid="Gamma 5%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.05" />
</Semantics>
</Effect>
<Effect name="Gamma 10%" iconid="2" guid="Gamma 10%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.10" />
</Semantics>
</Effect>
<Effect name="Gamma 15%" iconid="2" guid="Gamma 15%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.15" />
</Semantics>
</Effect>
<Effect name="Gamma 20%" iconid="2" guid="Gamma 20%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.20" />
</Semantics>
</Effect>
<Effect name="Gamma 25%" iconid="2" guid="Gamma 25%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.25" />
</Semantics>
</Effect>
<Effect name="Gamma 33%" iconid="2" guid="Gamma 33%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.33" />
</Semantics>
</Effect>
<Effect name="Gamma 50%" iconid="2" guid="Gamma 50%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.50" />
</Semantics>
</Effect>
<Effect name="Gamma 67" iconid="2" guid="Gamma 67%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.67" />
</Semantics>
</Effect>
<Effect name="Gamma 75%" iconid="2" guid="Gamma 75%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.75" />
</Semantics>
</Effect>
<Effect name="Gamma 80%" iconid="2" guid="Gamma 80%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.80" />
</Semantics>
</Effect>
<Effect name="Gamma 125%" iconid="3" guid="Gamma 125%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="1.25" />
</Semantics>
</Effect>
<Effect name="Gamma 150%" iconid="3" guid="Gamma 150%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="1.50" />
</Semantics>
</Effect>
<Effect name="Gamma 175%" iconid="3" guid="Gamma 175%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="1.75" />
</Semantics>
</Effect>
<Effect name="Gamma 200%" iconid="3" guid="Gamma 200%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="2.00" />
</Semantics>
</Effect>
<Effect name="Gamma 250%" iconid="3" guid="Gamma 250%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="2.50" />
</Semantics>
</Effect>
<Effect name="Gamma 300%" iconid="3" guid="Gamma 300%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="3.00" />
</Semantics>
</Effect>
<Effect name="Gamma 500%" iconid="3" guid="Gamma 500%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="5.00" />
</Semantics>
</Effect>
<Effect name="Gamma 1000%" iconid="3" guid="Gamma 1000%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="10.00" />
</Semantics>
</Effect>
<Effect name="Gamma 1500%" iconid="3" guid="Gamma 1500%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="15.00" />
</Semantics>
</Effect>
<Effect name="Gamma 2000%" iconid="3" guid="Gamma 2000%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="20.00" />
</Semantics>
</Effect>
<Effect name="Gamma 2500%" iconid="3" guid="Gamma 2500%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="25.00" />
</Semantics>
</Effect>
<Effect name="Gamma 5000%" iconid="3" guid="Gamma 5000%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="50.00" />
</Semantics>
</Effect>
</EffectDLL>
</Effects>
</TransitionsAndEffects>
TheOnePb |
Movie Maker Vista SP1 + ShaderTFX, registered
http://youtube.com/profile?user=TheOnePb1 |
|
 |
|
|
Re: Gamma Adjustments Effect Posted: 04 Jul 2008 08:31 AM |
TheOnePb you got it done nicely.
Some Thoughts:
You might make the iconid="2" for darker ones and iconid="3" for lighter ones.
<Param name="FXFile" value="gamma.fx" /> doesn't match the suggested name for the FX file.
Effects can be stacked so you might not need so many.
Maybe a nice binary progression off of 1.0 like:
1.25, 1.50, 2.00, 3.00, (5.00 if needed)
and their reciprocals:
0.80, 0.67, 0.50, 0.33, (0.20 if needed)
PatrickL |
DPL Effects and Transitions for Vista MM Website |
|
 |
|
|
Re: Gamma Adjustments Effect Posted: 05 Jul 2008 07:23 AM |
Patrick L.,
I updated my post with the XML. I changed the iconid's and the fxfile name, but the effects don't work anymore ... And.. Ooops: 0.66 .. 0.67 ofcourse!
I have:
DPL_Gamma_Effect.fx - Shared
DPL_Gamma_Effect.xml - AddOnTFX
DPL_Gamma_Effect.fx - in XML
What's wrong?
TheOnePb |
Movie Maker Vista SP1 + ShaderTFX, registered
http://youtube.com/profile?user=TheOnePb1 |
|
 |
|
| |
|
Re: Gamma Adjustments Effect Posted: 06 Jul 2008 03:33 PM |
Mm.. It workes now :D ! But I just deleted the XML and FX and made them over and placed them in the right folders..
Replacing didn't work, delete and make over did.. :s ...
Bit weird, but I'm happy now.. Still love the effect!
TheOnePb |
Movie Maker Vista SP1 + ShaderTFX, registered
http://youtube.com/profile?user=TheOnePb1 |
|
 |
|
|
Re: Gamma Adjustments Effect Posted: 20 Aug 2009 11:36 PM |
Hey this effect looks AWESOME but whenever i put it into wmm and use it on a vid it just turns black did i do something wrong? thanx! |
|
|
 |
|
|
Re: Gamma Adjustments Effect Posted: 21 Aug 2009 03:06 PM |
Black screen usually means:
1. Can't find the DPL_Gamma_Effect.fx file (wrong name, extension or folder(should be in Shared))
2. DPL_Gamma_Effect.fx file was corrupted - truncated etc.
Good luck, this will work if installed OK, PatrickL |
DPL Effects and Transitions for Vista MM Website |
|
 |
|
|
Re: Gamma Adjustments Effect Posted: 22 Aug 2009 10:27 PM |
hmm, it still doesnt seem to be working im saving it as gammaeffects.xml woul that be a problem? thanx :) |
|
|
 |
|