Page 1 of 1

Anochece effect

Posted: 03 Dec 2014, 02:23
by TheDrDocter
Hello, I am a beginner at programming and don't know HLSL really at all. I make all my effects with the help of friends who have experience, but I am looking for anyone who can point me in the right direction to make this effect called "Anochece." It is the bright gradient haze around the sun, a good example is this one by Unreal : https://www.youtube.com/watch?v=GMydsM9K-00

Right now I am using a sunsprite by Kyo, but I really want to replicate Unreal's work.

Kyo's sunsprite: http://i.imgur.com/Jqvh4Ib.png
http://i.imgur.com/tWImRvb.png

Can anyone help?





BTW: Where did you guys learn your HLSL skills? I would like to know for I only really know C/C++(mildly), CSS, and Java & Javascript.

Re: Anochece effect

Posted: 03 Dec 2014, 05:50
by kingeric1992
Hi,
If you wish to draw a gradient haze around the sun, you can set a quad offset at sun position with VS and draw color gradient form center in PS. something like this

Code: Select all


VS_OUTPUT_POST   VS_Anochece(   VS_INPUT_POST IN  )
{
    VS_OUTPUT_POST OUT;

    float4  pos = float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
    pos.xy     *= Scale;  //scale
    pos.xy      -= LightParameters.xy;//offset    
    pos.y       *= ScreenSize.z;//screen ratio fix
    
    OUT.vpos        = pos;
    OUT.txcoord.xy  = IN.txcoord.xy;
    return OUT;
}

float4 PS_Anochece(   VS_OUTPUT_POST IN, float2 vPos : VPOS ) : COLOR
{
    float2  coord   = IN.txcoord.xy;
    float4 res = lerp( Tint, 0, saturate(length(coord - 0.5) * weight));
    return res;
}

However, I doubt it will be any thing but close to what you want to achieve, nor will it be practical due to the limited resource in enbsunsprite.fx.

Re: Anochece effect

Posted: 03 Dec 2014, 08:39
by --JawZ--
Bloom coupled with Sun rays, Volumetric Rays and DoF are all the effects I see that causes or can cause those visuals, along with a intense, colorful sun and colorful sky gradient.
Last time I checked Kyo used a "simple" texture draw with some color filters and intensity controls, much like parts of his bloom effect file.

About HLSL skill learning, if ou know C or C++ that's a good starting point, HLSL is very similar as far as I've been able to tell. HLSL is all about mathematical computations and little about the actual code which is fairly easy to understand.
I have no past experience in coding, unless you count Oblivion script language as one source, I just grabbed a .fx file and started working on it with a very basic every day math knowledge, +, -, * and all that.
I'll see if I can find some godd resources to link here later on, but simply doing a Google search like: HLSL tutorial, or HLSL tonemapping, HLSL bloom or what kind of effect you are searching for to start with will give you good examples of how such effects can be done, and then you go from there, small steps and all.

Re: Anochece effect

Posted: 03 Dec 2014, 16:53
by prod80
Not much easier to just create a sunglare.dds file and using tes5edit/CK to edit the colors and intensity on each weather and using ENB for the rest of it?

You could make pretty bizarre effects using just sunglare.dds and ENB... these are shot with different ENB's back in the days

Image

Image

Image

Re: Anochece effect

Posted: 03 Dec 2014, 21:51
by TheDrDocter
--JawZ-- wrote: About HLSL skill learning, if ou know C or C++ that's a good starting point, HLSL is very similar as far as I've been able to tell. HLSL is all about mathematical computations and little about the actual code which is fairly easy to understand.
I have no past experience in coding, unless you count Oblivion script language as one source, I just grabbed a .fx file and started working on it with a very basic every day math knowledge, +, -, * and all that.
I'll see if I can find some godd resources to link here later on, but simply doing a Google search like: HLSL tutorial, or HLSL tonemapping, HLSL bloom or what kind of effect you are searching for to start with will give you good examples of how such effects can be done, and then you go from there, small steps and all.

Thank you JawZ for that, I am currently just reading off of this microsoft website about HLSL: http://msdn.microsoft.com/en-us/library/windows/desktop/bb509635(v=vs.85).aspx

I only really have trouble with knowing all the code functions and commands/syntax. I think once I prefect that then I'll be golden.

Re: Anochece effect

Posted: 04 Dec 2014, 21:30
by Aiyen
If you know C/C++ then HLSL is just learning a bit more syntax... but if you do not then it can be quite tricky since it is more low level coding then most other graphical programming languages.

My advice is to just start small, write small subroutines for saturation, contrast etc. Create something that will paint just one row of pixels a given color etc. Eventually you can just build up your own library of functions etc. that you can call and use to create crazy stuff.

Speaking of that.. which is something most places do not mention since they just focus on creating single shaders.... learn to use the #include statement, you will thank yourself later!