1 registered members (TipmyPip),
15,499
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Tron effects :
#415554
01/20/13 12:43
01/20/13 12:43
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
Hi ! I would want to have some shader(s) doing that effect with 3DGS : indie game video Anyone have some ideas ? I mean the glow effect (not the motion blurr).
|
|
|
Re: Tron effects :
[Re: MasterQ32]
#415556
01/20/13 12:50
01/20/13 12:50
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
In fact texture parts (with some alpha no ?) ? It seems it's like that that it works, use the alpha or second texture for indicating glowing parts ? Anyway, if you hav time to make a quick test with some other Glowing effect, i'm interested 
|
|
|
Re: Tron effects :
[Re: ratchet]
#415558
01/20/13 13:27
01/20/13 13:27
|
Joined: Nov 2007
Posts: 2,568 Germany, BW, Stuttgart
MasterQ32
Expert
|
Expert
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
|

#include <acknex.h>
#include <default.c>
#include <mtlFx.c>
MATERIAL *matGlow =
{
effect = "glownm.fx";
ambient_red = 16;
ambient_green = 16;
ambient_blue = 16;
flags = PASS_SOLID | AUTORELOAD;
}
function main()
{
level_load(NULL);
you = ent_create("techcont_5.mdl", vector(128, -64, 0), NULL);
you->material = matGlow;
}
#include <define>
#include <transform>
#include <sun>
#include <lights>
#include <fog>
#include <normal>
Texture entSkin1; // Color
float4 vecSkill41;
float4 vecAmbient;
sampler sColor = sampler_state { Texture = <entSkin1>; MipFilter = Linear; };
//////////////////////////////////////////////////////////////////////
struct out_terraintex3 // Output to the pixelshader fragment
{
float4 Pos : POSITION;
float4 Color : COLOR0;
float Fog : FOG;
float2 TexCoord : TEXCOORD0;
};
out_terraintex3 vs_terraintex3(
float4 inPos : POSITION,
float3 inNormal : NORMAL,
float2 inTexCoord0 : TEXCOORD0)
{
out_terraintex3 Out;
Out.Pos = DoTransform(inPos); // transform to screen coordinates
// rotate and normalize the normal
float3 N = DoNormal(inNormal);
float3 P = mul(inPos,matWorld);
Out.Color = vecAmbient; // Add ambient and sun light
for (int i=0; i<8; i++) // Add 8 dynamic lights
Out.Color += DoLight(P,N,i);
Out.Fog = DoFog(inPos); // Add fog
// scale the texture coordinates for the masked textures
Out.TexCoord = inTexCoord0.xy;
return Out;
}
float4 ps_terraintex3(out_terraintex3 In): COLOR
{
float4 Color = tex2D(sColor,In.TexCoord);
Color = Color * In.Color + Color * Color.a;
Color.a = 1.0f; // prevent transparency
return Color;
}
technique terraintex3_13
{
pass one
{
sampler[0] = (sColor);
ZWriteEnable = true;
ZEnable = true;
ZFunc = Less;
AlphaBlendEnable = false;
FillMode = Solid;
CullMode = CCW;
VertexShader = compile vs_2_0 vs_terraintex3();
PixelShader = compile ps_2_0 ps_terraintex3();
}
}
// fallback if nothing works
technique fallback { pass one { } }
Texture file:  I know it's not the best one but it works maybe you can get much more out of it if you use better textures and models 
|
|
|
Re: Tron effects :
[Re: Aku_Aku]
#415563
01/20/13 13:56
01/20/13 13:56
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
wow , tanks a lot MasterQ32 ! We don't see the effect a lot, i think it's because of blue background and textures you used ; i'll gonna try it right now  That's strange your code takls about terrain and lights ? And where do i put the shader code ? Arrrghhhhh .... The day 3DGS will evolve a bit more instead of beeing so prehistoric, and allow direct integration of shader code without coding , drag and drop and menu select for shaders .... One of the many reasons it is hard for 3D artists to go for 3DGS.
Last edited by ratchet; 01/20/13 14:21.
|
|
|
Re: Tron effects :
[Re: MasterQ32]
#415568
01/20/13 14:23
01/20/13 14:23
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
lol i don't understand anything ... ahahaha  a 3D artist talking to a sdare programmer. Could you put the example on some sharing site ? http://www.2shared.com/
Last edited by ratchet; 01/20/13 14:24.
|
|
|
Re: Tron effects :
[Re: MasterQ32]
#415571
01/20/13 15:01
01/20/13 15:01
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
Not sure it will be optimized ??  Well i tested on a model, afetr putting the file, and i got a BLack Screen ?? So my decision : take some engine having natively that shader ? or simply used 3DGS and official shaders ... It's for the little contest so i keep 3DGS and normal map/specular shader instead ...
|
|
|
Re: Tron effects :
[Re: MasterQ32]
#415594
01/20/13 22:08
01/20/13 22:08
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
In fact i redone the level and tried all one time again and used your models. In fact the material file you've done must be place in the project folder also. Thanks for the material, i htink i'll find a use of it , even if it is some sort of self illuination ! But for that case i work on i really needed : REAL GLOW  I mean GLOWING STUFF : like this one : example code
Last edited by ratchet; 01/20/13 22:08.
|
|
|
Re: Tron effects :
[Re: 3run]
#415596
01/20/13 22:23
01/20/13 22:23
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
I think you mix self illumination and Glow efffect  Glow is somewhat like some slef illumination + bloom effect. Anyway i have made a better example for your shader : YEs this is self illumination, perhaps adding some bloom on full scene i had some glow ?? 
|
|
|
Re: Tron effects :
[Re: ratchet]
#415597
01/20/13 22:34
01/20/13 22:34
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
Well your illumination shader do some Glow if i add HDR to the scene : The problem it doesn't work on non illuminated 3D faces as you can see. Because it's just the HDR effect taking on illuminated parts, not a real bloom 
Last edited by ratchet; 01/20/13 22:36.
|
|
|
Re: Tron effects :
[Re: txesmi]
#415631
01/21/13 13:25
01/21/13 13:25
|
Joined: Jun 2007
Posts: 1,337 Hiporope and its pain
txesmi
Serious User
|
Serious User
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
|
double post, interesting info. Here is a quick working example:
#include <acknex.h>
#include <default.c>
VIEW *camGlow;
VIEW *camMix;
BMAP *bmpGlow;
BMAP *bmpCamera;
MATERIAL *mtlObject =
{
effect = "
float4x4 matWorldViewProj;
Texture entSkin1;
sampler entSkin1Sampler = sampler_state { Texture = <entSkin1>; MipFilter = Linear; };
void VS (
in float4 inPos : POSITION,
in float2 inTex : TEXCOORD0,
out float4 outPos : POSITION,
out float2 outTex : TEXCOORD0 )
{
outPos = mul ( inPos, matWorldViewProj );
outTex = inTex;
}
float4 PS ( in float2 inTex : TEXCOORD0 ): COLOR0
{
float4 Color = tex2D ( entSkin1Sampler, inTex );
Color.a = 1.0f;
return Color;
}
technique Solid
{
pass one
{
ZWriteEnable = true;
AlphaBlendEnable = true;
VertexShader = compile vs_2_0 VS ();
PixelShader = compile ps_2_0 PS ();
}
}
";
flags = PASS_SOLID;
}
MATERIAL *mtlGlow =
{
effect = "
float4x4 matWorldViewProj;
Texture entSkin1;
sampler entSkin1Sampler = sampler_state { Texture = <entSkin1>; MipFilter = Linear; };
void VS(
in float4 inPos : POSITION,
in float2 inTex : TEXCOORD0,
out float4 outPosition : POSITION,
out float2 outTex : TEXCOORD0 )
{
outPosition = mul ( inPos, matWorldViewProj );
outTex = inTex;
}
float4 PS ( in float2 inTex : TEXCOORD0 ): COLOR
{
float4 Color = tex2D ( entSkin1Sampler, inTex );
Color.rgb = lerp ( 0, Color.rgb, Color.a );
Color.a = 1;
return Color;
}
technique Glow
{
pass one
{
ZWriteEnable = true;
AlphaBlendEnable = false;
VertexShader = compile vs_2_0 VS ();
PixelShader = compile ps_2_0 PS ();
}
}
technique fallback { pass one { } }
";
}
MATERIAL *mtlMix =
{
effect = "
float4 vecViewPort;
float4 vecSkill1;
static const float fWeights[4] =
{
0.133333,
0.066666,
0.033333,
0.016666
};
Texture TargetMap;
Texture mtlSkin1;
sampler ColorSampler = sampler_state { Texture = <mtlSkin1>; MipFilter = Linear; };
sampler GlowSampler = sampler_state { Texture = <TargetMap>; MipFilter = Linear; AddressU=Clamp; AddressV=Clamp; };
float4 PS ( in float2 inTex : TEXCOORD0 ): COLOR
{
float2 Coord = inTex * vecSkill1.xy;
float4 Color = tex2D ( ColorSampler, Coord );
float3 Glow = 0.0f;
float2 vOffset = vecViewPort.zw * 2;
for ( int i=1; i<5; i++ )
{
float3 Glow2 = tex2D ( GlowSampler, Coord + vOffset * i ).rgb;
Glow2.rgb += tex2D ( GlowSampler, Coord - vOffset * i ).rgb;
vOffset.x = -vOffset.x;
Glow2.rgb += tex2D ( GlowSampler, Coord + vOffset * i ).rgb;
Glow2.rgb += tex2D ( GlowSampler, Coord - vOffset * i ).rgb;
vOffset.x = -vOffset.x;
Glow.rgb += Glow2.rgb * fWeights[i-1];
}
Color.rgb += Glow.rgb;
return Color;
}
technique Mix
{
pass one
{
AlphaBlendEnable = false;
VertexShader = null;
PixelShader = compile ps_2_0 PS ();
}
}
";
}
function main ()
{
wait(1);
level_load ( "" );
you = ent_create("techcont_5.mdl", vector(128, 0, -32), NULL);
you.material = mtlObject;
bmpCamera = bmap_createblack ( screen_size.x, screen_size.y, 24 );
bmpGlow = bmap_createblack ( screen_size.x*0.25, screen_size.y*0.25, 24 );
mtlMix.skill1 = floatv ( 0.25 );
mtlMix.skill2 = floatv ( 0.25 );
mtlMix.skin1 = bmpCamera;
camMix = view_create ( 1 );
camMix.material = mtlMix;
set ( camMix, PROCESS_TARGET );
camGlow = view_create ( 1 );
camGlow.bmap = bmpGlow;
camGlow.material = mtlGlow;
set ( camGlow, CHILD );
camera.bg = pixel_for_vec ( nullvector, 100, 8888 );
camera.bmap = bmpCamera;
camera.stage = camGlow;
camGlow.stage = camMix;
while ( !key_esc )
{
DEBUG_BMAP ( bmpCamera, 0, 0.125 );
DEBUG_BMAP ( bmpGlow, 130, 0.5 );
wait (1);
}
sys_exit ( NULL );
}
|
|
|
Re: Tron effects :
[Re: ratchet]
#415634
01/21/13 13:48
01/21/13 13:48
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
The problem it doesn't work on non illuminated 3D faces as you can see. Because it's just the HDR effect taking on illuminated parts, not a real bloom  The "problem" is that the sunlight is adding even more brightness to the "glowing" parts which makes them bright enough to affect the bloom shader. If you want to I can create an object shader with all the stuff you need (also lighting / normalmapping). Let me know if you're interested.
Last edited by Kartoffel; 01/21/13 13:54.
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: Kartoffel]
#415639
01/21/13 16:04
01/21/13 16:04
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
If you have some time only  In fact i just need the Glow constant factor independant from sun light or amiant light. If you can add some specular effect using the sunlight it wouldbe cool. (caus normal map is not really needed, specially with very simple 3D models, once again if you have time whyt not also normal map!) @txesmi : I just tested your code, i don't see the difference ? perhaps the glow effect is not strong enougth ?
Last edited by ratchet; 01/21/13 16:09.
|
|
|
Re: Tron effects :
[Re: ratchet]
#415645
01/21/13 18:12
01/21/13 18:12
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Okay a last question, do you want to use multiple colors for the glow effect or only one (limited per model)?
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: txesmi]
#415650
01/21/13 20:29
01/21/13 20:29
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
Edit: I'm a bit disappointed... Model has only one skin set on.. and all that skin has is this:  No alpha channel or so... When I draw something on it, I can see the glow effect.. But how the hell model gets a texture, if it has only this one?? I'm confused.
Last edited by 3run; 01/21/13 20:34. Reason: ***
|
|
|
Re: Tron effects :
[Re: 3run]
#415651
01/21/13 20:49
01/21/13 20:49
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
I don't know how bloom works ? One colour would be great already.
Last edited by ratchet; 01/21/13 20:51.
|
|
|
Re: Tron effects :
[Re: ratchet]
#415655
01/21/13 21:17
01/21/13 21:17
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
The way bloom works is easy: - Make a "copy" of the rendered image - Decrease brightness; Black parts won't be "bloomed", the brighter it is the more visible the bloom will be at the end - Add blur to the image - Mix the bloom image with the original image There are some important steps missing such as downsampling, but in theory that's all. And regarding the shader: I'll do this tomorrow (and hopefully finish it tomorrow, too). I thought about using the entity's red, green and blue values as glow color and using the skin's alpha channel as glow-intensity-map. Maybe I'll also take some of my post-process shaders and combine them for you. Probably a nice bloom shader and a zoom-blur effect ( looks nice for this kind of games  )
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: Kartoffel]
#415688
01/22/13 15:08
01/22/13 15:08
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Okay this is what I've got so far:  In the screenshot I'm using my own post processing shaders with an intensive bloom. Is this the result you're looking for?
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: 3run]
#415690
01/22/13 15:18
01/22/13 15:18
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Hi, nice that you like it  I'm using the alpha channel of the first skin (inverted because then it is easier to take the skin and erase the glow-parts out instead of Messing around with 0% alpha on most of the skin.
Last edited by Kartoffel; 01/22/13 15:20. Reason: Damn iPod-autocorrect
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: Kartoffel]
#415693
01/22/13 15:22
01/22/13 15:22
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
Wow  that's it a real bloom effect. I never seen that effect on any 3DGS project (or i simply missed them) ! I think it should be part of the next 3DGS official download  It's so usefull for ancient magic, futurist things and levels or simply to make some retro glowing games.
Last edited by ratchet; 01/22/13 15:23.
|
|
|
Re: Tron effects :
[Re: ratchet]
#415698
01/22/13 15:47
01/22/13 15:47
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
OK, so for example, if I need some glowing splashes on the box, I need to pain those splashes on the texture, and then, make then black on the alpha channel? I'm not 100% sure what you mean but I think you understood it right  It's simple: full alpha = now glow, no alpha = max glow in gimp for example I would create a new, transparent layer (which will be the glow mask), paint the parts which should be illuminated and the use selection from alpha. Now you just have to select the base layer and hit 'del' to delete the selected parts. These will glow then  Of course it is important that the file format supports alpha. @ratchet thanks for the kind words  I'll try to make a simple (but similar) bloom-shader for you  With this the glow effect should look nice. It's so usefull for ancient magic, futurist things and levels or simply to make some retro glowing games. The main idea of bloom is using it on the whole scene, not just specific parts like glowing stripes  With this all bright areas of the screen will look bright - and this makes the whole scene seem more realistic. For my bloom shader I tried to make the effect intensive and noticable but still smooth, so without having a brightness overkill 
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: 3run]
#415705
01/22/13 15:57
01/22/13 15:57
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Nice man, are you going to share this?  the object shader?yes, of course. That's why I created it. my bloom shader?yes, but that probably needs some time and it won't be 100% the same. (the one I'm using is pretty complex, because it's using multiple bloom layers) my pp-shader pipeline?no. I'm sorry but I just won't share the whole thing.
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: Kartoffel]
#415706
01/22/13 16:00
01/22/13 16:00
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
my pp-shader pipeline? no. I'm sorry but I just won't share the whole thing. No man, I don't need your whole pipeline  And I don't need bloom as well, only the glow shader.
|
|
|
Re: Tron effects :
[Re: 3run]
#415707
01/22/13 16:48
01/22/13 16:48
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
okay, here you (two) go: download (~1.14 Mb)...and what it includes / supports: - per pixel lighting, diffuse and specular (blinn-phong model)
- all light types (directional- [sun], point- and spotlights)
- normalmapping, 2nd skin is used as normalmap
- some little stuff like overall-light-brightness and alpha-clip
- ambient lighting; the material's and the entity's ambient values are added together
- and the self illumination effect, of course; controlled by the alpha value as I've explained before
All the settings can be done by using the #defines in the shader file so have a look at it. To disable normalmapping for example just comment the line: #define EnableNormalmappingI also generated a quick normal-map to test it and for showing you the effect  At the moment it doesn't support fog I still have to do this, but for now this should be enough for you to start using the shader.
Last edited by Kartoffel; 01/22/13 16:56. Reason: my bad grammar...
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: 3run]
#415743
01/23/13 09:31
01/23/13 09:31
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
@Kartoffel: Thanks a lot, that really kind, specially for the time you put on it  The shader is not for me also, and i hope it to be in the official 3DGS shader library soon. I don't think i'm the only one that would like to use Glow on a game. ---------- I tested it, and it's good, but i don't see a lot the bloom factor , perhaps i will use it combined with a lot more Glowing one for special objects ? On the image upper, as you can see on horizontal platforms you can run on them, the white rectangular parts are really glwoing a lot , perhaps it comes from a big Bloom effect on the scene ? ( I'll test your shader in some basic flat poly models to see how it runs already on a game scene )
Last edited by ratchet; 01/23/13 09:53.
|
|
|
Re: Tron effects :
[Re: ratchet]
#415770
01/23/13 13:56
01/23/13 13:56
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
What I've uploaded is just the objectshader, no bloom. It 'only' illuminates the glowing parts and adds no bloom effect to it.
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: ratchet]
#415778
01/23/13 15:12
01/23/13 15:12
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Yes. Or you wait some days and I'll create you some custom post process shaders with bloom if you want.
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: Kartoffel]
#415780
01/23/13 15:30
01/23/13 15:30
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
Ok i just tried with HDR, but well it was not like in the game i put pictures. Anyway adding , bloomBlur shader i have interesting effect, perhaps i'll use that for this special Retro simple game. Don't put too much time in this shader if you have your own project already to manage 
|
|
|
Re: Tron effects :
[Re: ratchet]
#415782
01/23/13 15:51
01/23/13 15:51
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Don't put too much time in this shader if you have your own project already to manage  Well, my current "project" is a complete overhaul of my HDRR shader-pipeline, nothing too important. ...and it's actually fun to create custom shaders for other users  I think I'll do it on the weekend 
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: ratchet]
#415977
01/26/13 16:54
01/26/13 16:54
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
hey, I've got your post-processing shaders ready  it includes bloom, a zoom-blur effect ( I guess it's nice to have it, especially for the type of game you're working on  ) and some little features like a vignette effect is there anything else I should add?
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: ratchet]
#415983
01/26/13 19:05
01/26/13 19:05
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Perhaps you could make some glowing shader that would need no alpah or Glow special maps ?
I'm sorry but I don't understand what you mean. Where should the information about what has to be illuminated come from?
btw. is anybody else interested in this? If so I'll upload it, create a new thread and give some how-to-use-information there.
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: Kartoffel]
#415984
01/26/13 19:27
01/26/13 19:27
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
I mean for that style of game (not for me personnaly !) : I htink it's perhaps some over Bloom effect ? speaking of Bloom, 3DGS don't have any simple bloom full screen effect ? i don't have seen any on the shaders folder ? Perhaps you could have fun making some bloom shader so, if you have some free time ?
Last edited by ratchet; 01/26/13 19:29.
|
|
|
Re: Tron effects :
[Re: ratchet]
#415989
01/26/13 20:15
01/26/13 20:15
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
So you mean this neon-effect? Well the purpose of bloom is: Bright parts bleed over dark parts. And that's exactly what my shader does an what's beeing done in the screenshots you've posted (except the 1st one, I think this are simple 2d textures). Let's take the last screen as example. ( love that game btw.  ) To get that effect simply use sprites and add a bloom shader with very low threshold. That's all. You probably need 3 Bloom passes to get that radius with a good quality but in theory that's all you have to do. edit: as you can see it's possible (and easy)  I took the bloom shader and turned down the threshold. ( and I discovered that using pow on the alpha causes early bleeding which is perfect for a neon-effect  )
Last edited by Kartoffel; 01/26/13 20:22.
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: ratchet]
#415994
01/26/13 21:13
01/26/13 21:13
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Sharing the shaders? Well... the shader(s) you're seeing above are custom made for you, so, yes I think I'll share them with you 
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: Kartoffel]
#415998
01/26/13 21:53
01/26/13 21:53
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
So, at the moment the shaders still need some work, especially making them more userfriendly is important. I think I'll finish this tomorrow. Until then, some more screens  (click on the image to see in original resolution) no postprocessing:  postprocessing enabled:  zoom blur effect:  comparision between HDRR and non-HDRR (with hdrr color and brightness stay accurate resulting in much better visual quality)  EDIT: @3run, I didn't ignore you  ...and that I said I'll share the shaders with ratchet I didn't mean I'll only share them with him, sorry if you misunderstood this.  If I'm finished I'll create a new thread so everyone who's interested can use it
Last edited by Kartoffel; 01/26/13 21:56.
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: Kartoffel]
#416028
01/27/13 12:40
01/27/13 12:40
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
Amazing results  Here is simple test i made (the scratches have been part of alpha by inadvertance :() But i can begin the game now. Iµ think this shader will help making graphic eye candy stuff with simple bitmaps or models. I tried to put all code inside my main level code, but it bugs ? Strange i put effect file, and the code of your main in some action ?? It seems my main don't see the effect file perhaps ? Straneg they are in same folder and my main have the import line ?
Last edited by ratchet; 01/27/13 12:53.
|
|
|
Re: Tron effects :
[Re: ratchet]
#416029
01/27/13 13:04
01/27/13 13:04
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Okay, I'll do some improvements in the next days but the shaders can already be used now. You can download it here (~1.51 MB)About the blur and the glow shader in general: these shaders support HDRR, so you're not limited to the color range of 0 - 255. Use bright glow-colors to get a nice, bloomy effect. Regarding the demo: I've made 2 demos. One showing the glow effect with the 2 cubes and one showing a neon-style effect (with graphics from the game 'GridWars') have a look at 'main_cubes.c'. In this file there's a lot of stuff explained and commented. In the demos you can enable / disable the postprocessing with the p-key, move with wasd & mouse (hold right mouse button to rotate the camera), use the zoom-blur effect by holding enter, and toggle the cubes rotation with the space-key. EDIT: regarding your problem: it seems like the object is not using the shader. Make sure you set the right material and .fx file EDIT#2: in the example you uploaded the object-shader's file was called "glow.fx" or something like that. I chaged the name to "object.fx" maybe that's the problem
Last edited by Kartoffel; 01/27/13 13:12.
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: Kartoffel]
#416072
01/27/13 21:09
01/27/13 21:09
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
Few suggestions man: * radial blur, should be able to find the center of the screen it's self (if we change during the run-time resolution, there is an offset). * same for the HDRR I guess, cause I have a black line at the bottom of the screen, if I change the resolution, maybe I need to reload effects? I use AMD, you maybe going to hate me for that  Otherways, it looks really professional man! Could I ask you to add one simple post shader to the HDRR via PM (I need it for my current horror project)?
|
|
|
Re: Tron effects :
[Re: ratchet]
#416078
01/27/13 21:40
01/27/13 21:40
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
You still plan to make a game like the one you have posted a video of in the first post?
For this type of game I would suggest you to keep far away from PhysX. This will only make things harder. A game like this doesn't need precise and ultra-realistic physics-interaction between objects.
Last edited by Kartoffel; 01/27/13 22:17.
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: Kartoffel]
#416083
01/27/13 22:24
01/27/13 22:24
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
In fact i am in two projects now : I keep the glow to make some similar game as the shooting picture, but with very different and diversified gameplay. I think i'll make lot more simple models and stuff, but they will be lot more diversified and you'll have lot more gadgets and gameplay/ treasures. ------------------ The second i think it's always a run platform game, but i won't copy and won't go for Glow caus this type of game already exists. The idea will be some sort of rock, wood platforms. With several characters like in racing games, with each it's own specific speed,jump and special power effect. Perhaps i'll put glow on some caves circuit or for some special Tron character bonus  It will be PC game, but the goal is mobile platform.
Last edited by ratchet; 01/27/13 22:34.
|
|
|
Re: Tron effects :
[Re: 3run]
#416161
01/28/13 14:31
01/28/13 14:31
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Few suggestions man: * radial blur, should be able to find the center of the screen it's self (if we change during the run-time resolution, there is an offset). * same for the HDRR I guess, cause I have a black line at the bottom of the screen, if I change the resolution, maybe I need to reload effects? I use AMD, you maybe going to hate me for that  Otherways, it looks really professional man! Could I ask you to add one simple post shader to the HDRR via PM (I need it for my current horror project)? I somehow didn't see this post, sorry for that. ( or you've edited it  ) * radial blur, should be able to find the center of the screen it's self (if we change during the run-time resolution, there is an offset) * same for the HDRR I guess, cause I have a black line at the bottom of the screen, if I change the resolution, maybe I need to reload effects?The Blurshader uses a factor as coordinates, usually (0.5, 0.5) which is the center on every resolution. ...and it seems like you didn't read the discription in detail?  PP_Run(); // Enables the PostProcessing-Pipeline (set your resolution before using this) PP_Stop(); // Disables it again PP_Renew(); // Renews the PostProcessing-Pipeline, do this after changing your resolution if the pp is already enabled
I use AMD, you maybe going to hate me for that  I'm using AMD aswell, there's nothing wrong with it Otherways, it looks really professional man!Thank you Could I ask you to add one simple post shader to the HDRR via PM (I need it for my current horror project)?I'm not sure if I can manage to implement it but yeah, I'll try.
Last edited by Kartoffel; 01/28/13 16:17. Reason: correcting my bad grammar
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: ratchet]
#416171
01/28/13 15:41
01/28/13 15:41
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Thanks, but the shader is written in GLSL (OpenGL) - which is different from HLSL (DirectX) Anyway, from what I can tell the shader is a simple bloom shader, nothing very special. ...I really don't wanna sound egomaniacal but I have to say the shaders that I gave you are a lot "better"  EDIT: I just saw that there are other shaders shown, too (SSAO f.e.) I guess I'll have a closer look at them 
Last edited by Kartoffel; 01/28/13 15:43.
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: Kartoffel]
#416188
01/28/13 20:36
01/28/13 20:36
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
I made some improvements on the blending and the way how shader handles colors which are out of the visible range. As you can see, the bright orange (~3x higher than the maximum visible brightness) blends over the dark model and creates a weird effect. This has been fixed due to a new blending mode which also has a nicer color gradient:  After some more tests (and maybe some improvements) I will upload the newer version, I think in a new thread. For this I will have to make it more user-friendly and I need to add a better explanation of the features and on how to use this stuff.
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: ratchet]
#416195
01/28/13 21:33
01/28/13 21:33
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Maaan nice screens  The shader will look like the second sphere, of course. On the first one you see some ugly dark lines which are there because the bloom blending-mode couldn't handle very bright areas next to dark ones.
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: Kartoffel]
#416220
01/29/13 10:01
01/29/13 10:01
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
Perhaps we chould choose the shader style we want ? why not ? With dark ugly lines or not ? --------------- Anyway , i played the game, it's really; for the planet it seems to be a SIMPLE skybox, and with very far effects on some transparent polygons : The result it's it works just great. I perhaps i've played too much RPG games LOL  caus when i playde this space game i felt a great joy controlling a ship and blasting things and the music, graphics , voices are great. they put the minimum for character faces on screen for video transmission, but again it works just great. I'm now motivated to make a space shooter or space RPG game lol ( and that's lot lot more simple than a game with a character to animate indeed )
|
|
|
Re: Tron effects :
[Re: ratchet]
#416235
01/29/13 14:07
01/29/13 14:07
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
Perhaps we chould choose the shader style we want ? why not ? With dark ugly lines or not ?
I don't really know why? The dark lines are not a feature. They are an unwanted and bad looking effect caused by the "old" blending mode.
Last edited by Kartoffel; 01/29/13 14:19.
POTATO-MAN saves the day! - Random
|
|
|
Re: Tron effects :
[Re: ratchet]
#417170
02/09/13 15:44
02/09/13 15:44
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
@Kartoffel : Is your last shader update enought optimize if we could say in terms of speed ? We can consider it as final and ready for projects ? (personnaly i don't mind a lot and will use it as it works)
Last edited by ratchet; 02/09/13 15:44.
|
|
|
Re: Tron effects :
[Re: ratchet]
#417174
02/09/13 16:56
02/09/13 16:56
|
Joined: Jun 2009
Posts: 2,210 Bavaria, Germany
Kartoffel
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
@Kartoffel : Is your last shader update enought optimize if we could say in terms of speed ? We can consider it as final and ready for projects ? (personnaly i don't mind a lot and will use it as it works) Yes it can already be used for projects and it's already optimized. But I've got 7 free days ( no school  ) and I'm going to make some final adjustments and efficiency optimizations in the next one or two days and I will make it more userfriendly.
POTATO-MAN saves the day! - Random
|
|
|
|