Now that the embargo has been lifted, what new features have been found that aren’t listen on the coming soon page?
Random number generator (used by Random class) will be changed from linear congruential one to a XorShift one.
That’s probably the greatest feature of all time! Of all time! Right? ![]()
function SarcasticResponse(){
if(Random.Value >= 0.5){
print("Yes, it is the greatest feature of all time");
}else{
print("Son, I am Disappoint");
}
}
what a waste of lines if you could have used a C# 3.5 anonymous function to make it a one liner ![]()
You can make it one line in JS too!
function SarcasticResponse(){if(Random.Value >= 0.5){print("Yes, it is the greatest feature of all time");else{print("Son, I am Disappoint");}}
far easier ![]()
function sarcasm(){print(Random.value>=0.5?"GreatFeat!":"BigLetDown!");}
Another feature coming in 3.0: much easier to write shaders that are per-pixel lit. If you ever tried to write a per-pixel lit shader in 2.x, you know what I’m talking about.
For example, he’s a full Rim Lighting shader for Unity 3.0, that works in both Forward Deferred rendering, supports all light shadow types, and works on Windows, Mac, iPhone, Android, 360 PS3 (well ok, I did not actually try it on iPhone, Android, 360 nor PS3…):
Shader "Surface/Rim" {
Properties {
_MainTex ("Texture", 2D) = "white" {}
_RimColor ("Rim Color", Color) = (0.26,0.19,0.16,0.0)
_RimPower ("Rim Power", Range(0.5,8.0)) = 3.0
}
SubShader {
Tags { "RenderType" = "Opaque" }
CGPROGRAM
#pragma surface surf Lambert
struct Input {
float2 uv_MainTex;
float3 viewDir;
};
sampler2D _MainTex;
float4 _RimColor;
float _RimPower;
void surf (Input IN, inout SurfaceOutput o)
{
o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb;
half rim = 1.0 - saturate(dot (normalize(IN.viewDir), o.Normal));
o.Emission = _RimColor.rgb * pow (rim, _RimPower);
}
ENDCG
}
Fallback "VertexLit"
}
If I wanted to add bump mapping support to this shader? 3 more code lines (one to declare texture property for Material Inspector, one to declare sampler2D for Cg/HLSL, one to actually sample per-pixel normal).
Re-posted my question concering GUI and 2D sprite engine in a new thread here.
That is good news but to be honest I still don’t get it. So will there be some extensive tutorials for shaderprogramming in Unity 3.
I know there are lots of us stupid artist who wants to unluck the power of shaders so please help us along, pleaaaaaase ![]()
Just yesterday I went from zero to my first finished shader in about 7 hours of reading other shaders, the documentation and doing tests. I combined the DiffuseDetail with the Specular.
So I wasn’t doing it from scratch I was just combining the two.
Now I have to learn the new way.
There’s a tree creator.
And programmers who need help with the shaders…
cough.
Yeah I have been programming in unity for 3 years now, and I have never touched shaders except for once when I took the fog effect off of a default one. I don’t know what it is about them, but they scare me…
I would love some shader tutorials.
P.S. Is there some new standard shaders in 3.0?
I think shaders in general are kind of a complex/advanced topic… at least the Cg/GLSL parts. I think Unity T has done a great job of combining the whole selection of textures, setting up blending, texture combiner stages thing into one nice and fairly easy interface. I haven’t found it too difficult to get some fairly complicated fixed-function-pipeline shaders to work.
The part I think most people would need more help with is the Cg/GLSL programming, and most serious people would probably buy a book on the subject or follow some tutorials on some other sites. Dealing with the kind of stuff you typically see in custom shaders is quite advanced and still quite low-level.
What I wonder is why Unity 3 isn’t going to have a nice flowchart visual-programming-style shader builder like the one which was being worked on around the forums - that would open up a lot of functionality and customizability without having to get too technical.
Because:
-
First we need to decide, at which level of “abstraction” that shader graph would work. The experiments we did a couple years ago were a wrong abstraction level, I think. That is, having a shader graph where the final output is “color on screen” is wrong; because you have to deal with all the lighting details in the shader yourself. Instead, for 95% of shaders, what you should be describing is “material properties”, with lighting handled automagically somehow. We’re trying to do exactly that for 3.0, just without a graph (write shaders in plain old text format, but much simpler than in 2.x).
-
A quality graph UI takes a lot of time to implement, and we’re totally busy trying to ship 3.0 this summer already.
why not just add more options to the current shaders that are available? I’m sure there are plenty of shaders out there already that could be repurposed and simplified by you guys and used by us. Seems like most of us just don’t have the skills for that kind of thing.
the surface shader concept makes it seriously easier.
and yes many might not have the capability to create them, but a few have and you can always higher them or look out for shader packages for example.
with hte new system, some configurable editor aspect for creation actually becomes a possibility too
Because each new built-in shader or a new option to built-in shaders increases size of the web player installer. Due to the way shaders work, any new “option” to a shader basically means making twice as many shaders behind the scenes. So for example, add 5 independent “options” that can be turned off or on - boom, your shaders just got 32 times larger (2^5).
Speaking of more features that are coming in Unity 3.0: I went through feedback.unity3d.com and marked some as “planned”, see here: http://feedback.unity3d.com/forums/15792-unity/topics/15792-unity-needs-/filter/accepted
Things that were not mentioned yet I think:
- Rotation support for Particles
- Ability to render fonts from TTF files at runtime. Which means you can change font sizes, bold/italic etc. and actually support Asian fonts.
- Input Method Editor (IME) input support for Asian languages
- Surround Sound
- Vertex Snapping and other goodies in the Scene View
- “Thick” raycasts (i.e. capsule casts)
- Ability to define MonoBehaviours/ScriptableObjects in a precompiled .NET DLL
- Scripting documentation examples in JavaScript, C# and Boo!
Thank the lord… Particle rotation in particular was always a curious omission.
EDIT:
So I read on that page than Physx is being upgraded to 2.8.3, just curios, what version does unity have right now?