Hi, I am still trying to figure out an artistic style for this, but looking at some screenshots.. Does anyone know of any shaders in the marketplace that could produce this kind of effect? or have any nice ideas for microbes / bacteria. I am still not sure a realistic approach is best, but its for an evolution simulator / game. I have had a play around with a subsurface scattering shader but so far have't been able to get the result I wanted. The base mesh for the microbes is just a sphere or capsule. This is what they currently look like, without a background... I already have depth of field on, not that you can tell from that screenshot. Any help, ideas or direction pointers would be appreciated.
A look like that should be fairly easy to create with a fresnel rimlight shader, and some image filters like bloom and dof. Do a search on assetstore after rimlight/fresnel and you should be able to find something. Maybe also on the unity wiki, its a pretty easy shader to make.
Ok, i just made something quick for you. I think you should be able to replicate the look in that reference you posted. Here's the shader, it is a bit more costly than it has to be. It has a fresnelmodified cubemap, if you want to test that instead of just using the basic rim color. Or you can combine both. Set color to Reflection to black if you dont want to use it. You need a normalmap for the bumpiness, and I would suggest adding some more detail to the meshes as well, not just having them as spheres. Code (csharp): Shader "Blink Studios/Microbe" { Properties { _MainTex ("Base (RGB) RefStrGloss (A)", 2D) = "white" {} _Color ("Main Color", Color) = (1,1,1,1) _SpecColor ("Specular Color", Color) = (0.5,0.5,0.5,1) _Shininess ("Shininess", Range (0.01, 1)) = 0.078125 _ReflectColor ("Reflection Color", Color) = (1,1,1,0.5) _FresnelColor ("Fresnel Color", Color) = (1,1,1,0.5) _Fresnel("Fresnel Exponent",Range(0.001,16)) = 1 _Cube ("Reflection Cubemap", Cube) = "" { TexGen CubeReflect } _BumpMap ("Normalmap", 2D) = "bump" {} _Boost("Fresnel Boost", Float) = 1 } SubShader { Tags { "RenderType"="Opaque" } LOD 400 CGPROGRAM #pragma surface surf BlinnPhong #pragma target 3.0 sampler2D _MainTex; sampler2D _BumpMap; samplerCUBE _Cube; fixed4 _Color; fixed4 _ReflectColor; half _Shininess; half _Fresnel; half _Boost; fixed4 _FresnelColor; struct Input { float2 uv_MainTex; float2 uv_BumpMap; float3 worldRefl; float3 viewDir; INTERNAL_DATA }; inline float Schlick2(float Rzero,float3 lightDir,float3 normal,float exponent) { return Rzero + (1 - Rzero) * pow((1 - dot(lightDir,normal)), exponent); } void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); fixed4 c = tex * _Color; o.Albedo = c.rgb; o.Gloss = tex.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); half3 worldRefl = WorldReflectionVector (IN, o.Normal); fixed4 reflcol = texCUBE (_Cube, worldRefl); reflcol *= tex.a; half fresnel = Schlick2(0,normalize(IN.viewDir),o.Normal,_Fresnel); reflcol *= fresnel; o.Emission = reflcol.rgb * _ReflectColor.rgb; o.Emission +=fresnel * _Boost * _FresnelColor; } ENDCG } FallBack "Reflective/Bumped Diffuse" } Here's a superquick test, but as I mentioned, with proper models textures, and maybe a blurry noisy green cubemap for the background you should get something that looks like your reference picture. I used bloom and dof, and a single directional light. ------ Kjetil Hjeldnes TD www.blinkstudios.com
Oh Wow that looks great, thank you, I will have to play around with this tonight. Yes one of the things I am working on is a really basic procedurally generated mesh that will be driven from the "DNA" code to change the shape, I did think about soft-body physics but that really limits the number of these I can simulate.