This site uses cookies! Learn More

This site uses cookies! uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.


  • Content count

  • Joined

  • Last visited

Community Reputation

278 Excellent

About willywill

  • Rank
    Shader God

Profile Information

  • Gender
  • Location:
    Location.State = "Ohio";
  • Interests
    Programming shaders, and making games look awesome.
  1. Hey guys! I am having a bit of trouble affording college. Some of you may remember me as the "shader god". I am letting you guys know I am looking for work officially and as I see many of you have some awesome games, I'd love to help you make them better by making them visually attractive as well as functionally outstanding! Here is my post on the official Unity forums. Please check it out and PM me or email me with the info provided there if you are interested. Thanks -Will
  2. I was gonna say that Hello Dennis! Welcome to the armedunity forums! Make yourself comfortable and feel free to ask any questions in the appropriate places
  3. Yes it is exactly like that. With this I'm not limited to anything and I have access to anything I make. The only issue is I have to do all the rendering from scratch. But this is good because I can now do some of the things I couldn't do before. Like a fast-ish global illumination, advanced physically based rendering and more. I have to make my own AA, I think that's one of the last things on my to-do-list
  4. Hey guys, I'm back again with some exciting news. I've been working on a small project of mine, that takes a lot of work for one person. As you might already know, Jove branched out and decided to create not only a PBS pipeline but an entire new DX11 renderer in Unity. The method he is using to get such nice results is something called Deferred Shading. Deferred Shading is slightly different than Deferred Lighting, which Unity 4.x uses. I and many others find Deferred Shading to be superior because of its ability to create great materials with great performance. So I am presenting my very own renderer I made in Unity, in DX9 for now. Please leave suggestions on what to add!!!! This is very helpful to me! I will consider all responses! This is the reason why I am making the post essentially, is for your feedback Please note that this is very early progress. i'm talking like, less than a weeks worth of work. But enjoy!
  5. Thank you! I just wanted to say thanks for this amazing community. It has truly been a pleasure being apart of the community and I cannot stress the gratitude I express for all of you here. Many of you may know me as the "shadergod". I am a student in high-school that had discovered these forums by accident a little bit over 2 years ago. I started off doing shaders in Unity with the hopes of creating an experience for all that is unique, creative, and visually incredible. I came to these forums to eventually enlighten, share, inspire many other users here. As a way to express my gratitude, I want to not only say thank you again, but to give you all something very special . Unfortunately, it wont make it by the holiday season as I have my birthday and several other life changing things in the way. But it will be something I hope you all look forward to. I try my best to do what I can in helping you guys, informing you all, and giving back to the community. As I have taken on a lot of roles in life and with other hobbies, it has become a challenge for me to do things like complete the advanced shader tutorial, fix some of the broken shaders I may have posted, create things I wanted to make for the community but haven't gotten around to. I'm hoping this will make up for it and I will still try and get to those things. For now, enjoy some of the work I have done while I haven't been "as active" as before. And I wish to have more free-time to hang around more. All of the following work is still WIP:
  6. Its known as the sin city effect. You just sample the red parts of the image while everything else is grey.
  7. No problemo mi homie Im excited to see what he can do, he was my initial inspiration for a while before I was pushed to actually begin it, I did want to focus on improving the lighting because that can always be easily transferred over to a new renderer
  8. Raymarch and raytrace are similar, the term raymarch comes from usually dealing with volumetric things, this just sends rays in theory in the direction of the sky, from the sample points on the screen and figures out if the light has been occluded or not. Edit: Misread what I typed
  9. I've been in and out these past few weeks doing lots of advanced things, most of it including research. I'm also working on a complete custom renderer inside of Unity using Deferred Shading. If you've seen Jove 2.0 [1] or Dolkar's forum post [2] on the Unity forums, then you'll know what I'm talking about. I made the commitment that I was going to do a huge overhaul to my shaders, it was time to take things to the next level. I also needed to consider speed and making sure the shaders were able to be used on more than just high end computers. During my research on ambient occlusion I read in ShaderX7 [3] that ambient occlusion is an approximation, that assumes conditions of overcast weather, meaning all light is uniform or constant. In a normal outdoor scene this is NOT the case. I decided to consider the skylight light as a source of incoming radiance of the occlusion to make things more accurate of a non-overcast day. I also found out that I wasn't the first to try this [4]. Also note that the code still has more things to be added and considered and that this is just a step in the right direction. In truth, its not bad to have an overcast lighting HBAO, its just not accurate to have this in daylight. One thing you can do is this. Assuming you have raymarch : float3 SkyRadiance = float3(0.0f, -1.0f, 0.0f); float3 HorizonTangent - this is computed in HBAO. float Directional = max( 0.0f, dot(SkyRadiance, HorizonTangent)); Raymarch here for(int rays; rays < maxRays; rays++) { if(Directional > 0.0f) { // Yes, go ahead and calculate the AO, otherwise don't } } You can also smoothly fade into the original overcast based HBAO depending on the cloudiness, where _Cloudiness is a global linked float that ranges from 0-1, linked to your cloud shader, assuming you have one. SkyRadiance = lerp(SkyRadiance, float3(0.0f), _Cloudiness); References: [1] "Jove 2.0 - Replacing the rendering pipeline" [2] "The Wish for an Alternative Rendering Path" [3] "ShaderX7: Advanced Rendering Techniques" [4] "Sonic Ether Facebook, Directional HBAO"
  10. Thank you so much for this, can someone point me to a tutorial that helps me with learning how to do advanced things with Dictionaries and Lists I struggle with those the most.
  11. Under the CalculateLight function, making sure its not inside any #define of #if statements, then add (+) ImageBasedLighting to " = " You must access these variables such as [_SkyLightColorFromShader] like this from script: Shader.SetGlobalColor("_SkyLightColorFromShader", SkyLightColorFromScript as Color)
  12. Here is my opinion, in a nutshell. Do not use "Physically motivated" bloom that's based from a camera, in a first person game based from a persons eyes. His bloom doesn't use an Airy disc method anyway, kinda lied. Airy disc is a PSF (Point spread function) that requires a lot of math and double precision. His shader has none of that. So its an approximation of an approximation to camera bloom. Not an approximation of eye bloom. Very different things to be used in very different situations. Now besides all that his bloom looks nice. Although with better bloom out of they way you should focus on proper materials, better textures and lighting.
  13. elance
  14. I'll be updating the post by tomorrow sorry for the delay
  15. Welcome, to a very long tutorial on how to make your Unity3D games look "better". I say "better" because not everyone's art styles appeases to realism and I will respect anyone's artistic style here. Now this post will cover the following topics and will be updated on a day-to-day basis so make sure to stop by and read up on the updates. The Unity Pro related topics will be highlighted with PRO next to them. Directional Lighting Ambient Lighting Global Illumination H.D.R. Tonemapping Bloom Image Processing Reflections Textures Anti-Aliasing Translucency Miscellaneous Materials Physically-Based Rendering Alright, so these topics will not be typed up in any particular order. The first topic I will cover will be an easy one, which is directional lighting. Directional Lighting in Unity3D is simply a light vector in 3D space, more specifically in world space, disregarding shadows, that cast lighting on all objects. This form of lighting is approximated with the function NdotL, or the dot product between the light vector and the normal of the objects. Where θ is the angle between them known as the angle of incidence. Without using the cosine function, we discovered the dot products of these two vectors are equal to the cos(θ). This NdotL is a very cheap approximation of subsurface scattering, also known as diffuse. Diffuse meaning scatter or spread. It is a way to account for the Sun and is often tinted with a light color to give artist freedom in what color the "Sun" is. This is commonly known in video games as Lambertian shading. It can be coded as such (Cg) : //pseudo code float3 NormalVector = normalize(NormalVecFromVertexShader); //normalize means to make all the vectors a unit length of 1 float3 LightVector = if you're using Forward Rendering - normalize(; if you're using Deferred Rendering - normalize(; float3 NdotL = max(0.0f, dot(NormalVector, LightVector)); //Can't have less than no light being reflected on a surface. so at most no light. With a "Sun" in our games giving us an approximation to diffuse lighting, it also gives us the opportunity to create shadows. Shadows are a crucial part in video games. You are allotted 1 Directional Light with Hard Shadows in Unity Free so make sure your taking advantage of the opportunity! Example of Directional Lighting: Attenuation is the gradual loss in intensity of any kind of flux through a medium. The way Unity attenuates light is based somewhat off of the typical approach in 3D games and not a physical approach. See [physically based rendering] to see how we can get a far more physically-based results using the Inverse Square Law. Now, enough of the physics and math, with this we will figure how we can use the knowledge to our advantage. As you may already know, you can fake ambient light using multiple directional lights. This will lead us into our next topic, ambient lighting. Ambient Lighting in the simplest terms is everything that's not directional lighting. Ambient lighting in the real world is what is known as global illumination where every surface absorbs, (diffuse global illumination), obscures, (ambient occlusion), reflects, and/or refracts light (specular global illumination). In video games, it is common to use a constant color as ambient lighting. Its easier! Rather than calculating some expensive GI you just say that entire scene has a blue ambient color. But, there are better ways to solve for ambient lighting in ways that are much more accurate. [All pertaining to the first image inside the example] Notice the occlusion, and the absorption of the ambient lighting. There isn't very much reflection or refraction going on. When it's reflected or refracted the objects would be shiny. I will show a comparison. For now take note of the following. Ambient occlusion only exist within ambient light The diffuse term of the ambient light is not a constant color There is not ambient specular lighting within this scene Example of Ambient Lighting: AMBIENT LIGHTING IS KEY TO A GREAT LOOKING GAME! Far Cry 3 for example uses an excellent ambient lighting system that I highly recommend you all check out. Now, the question is how do I get better ambient lighting? How do I replace Unity's crap of an ambient lighting system (that will be replace in Unity 5 )? Many many ways. Very small filtered or blurred cubemaps for example a 4x4 size cubemap. You can take these cubemaps in Photoshop and paint them how you please. Get creative! Hemispherical Ambient Lighting. Use fake lighting vectors multiplied by an attenuation term which is what I use in conjunction with cubemaps. Spherical Harmonics although this one isn't practical in real-time just yet. Importance Sampling, what Unreal Engine 4 uses to filter cubemaps, what I will be using in the future. Global Illumination techniques Light Probes I will give a quick tutorial on Hemispherical Ambient Lighting based from this article here: Sky light for simple reasons can just be computed as the dot product between the down vector and the normals of the surface, multiplied by a sky color and sky intensity value. PRO It's best to apply this to all objects in the scene, you can do this via post process by using sampler2D _CameraDepthNormals or by adding it into the deferred rendering and applying it to the global normals there. float3 SkyLightVector = float3(0.0, -1.0, 0.0); //Fake light pointing down float3 GroundVector = float3(0.0, 1.0, 0.0); //Fake light pointing up float3 BouncedLightVector = -LightDirection; //Opposite of the light direction float3 _SkyColor; // - passed in from via script float SkyIntensity; //The others are very similar, just replace SkyLightVector below with the others and multiply by separate colors and intensities float3 SkyLighting = dot(normals, SkyLightVector) * SkyIntensity * _SkyColor; float3 ImageBasedLighting = SkyLight + GroundLight + BouncedLight; ImageBasedLighting *= AttenuationTerm; // This can be halflambert like in the reference or any other attenuation term ImageBasedLighting /= PI; //See below why we divide by PI We divide by PI at the end for Physically-based reasons. I called it image-based lighting because I was lazy and copied and pasted Read this here - - and check out the [ physically based rendering] section as well. I will probably come back to this because ambient lighting is a very in-depth topic but my internet connection being throttled. [stop Tom Wheeler, save the internet!] Directional + Ambient Diffuse