Unity 5 released

Knytestorme_sl

shitlord
532
0
With UE4 going free yesterday we now have Unity 5 releasing today with the biggest news being that all the features that used to be pro-version only in 4.x are now baked in to the free version, only reason for going with pro version now is if you make $100k or if you also want to do mobile development

Unity - Game Engine
 

kyle_sl

shitlord
26
0
WebGL is HUGE news for Unity.

Webplayer is gonna be worthless soon with chrome blocking native code via plugins.
 

Tenks

Bronze Knight of the Realm
14,163
606
Does Unreal have a comparable IDE integration like Unity does with a complete graphics pipeline?
 

Kharza-kzad_sl

shitlord
1,080
0
The surface shader feature is a nice idea. They sort of do a bunch of lighting stuff, your code goes here, then more built in stuff, and spit out the result.

My first attempt lost the mesh uvs somewhere in the vertex shader, which they write so I couldn't really fix. Looks like it has some bugs.

The other way is to do your own full vertex and pixel shader combo. That works just fine. I got one of those going quickly and hooked various things into it. It works but you get no built in shadows or fancy light. Have to do all that yourself if you want it.
 

Kharza-kzad_sl

shitlord
1,080
0
So I'm a couple months in to this unity gig and it has been a fun adventure.

Unity suffers just as badly as Unreal on the bad info from google searches. When you look into how to do something there's always lots of "Sorry we don't support that". Then later you find out that they listened to the complaints and added a feature to do what you wanted.

Really in hindsight, I should have just sat down and read through all the docs but that is just zzzzzzzzzzzzzz

Also the mono stuff seems really badly slow, but is greatly sped up by optimizations. I cut some big 14 second processing times down to half a second with unsafe and pointers.

The path I'm going has been like ComputeShader->Buffer->Material->DrawProcedural->Vert shader->Geom Shader->pixel Shader. With all that you have full control over vert formats and such, but lose built in automagical lighting and shadowing and such.

Pretty easy to do your own though. Unity has a bunch of built in shader vars that are already set up for you.
 

Kharza-kzad_sl

shitlord
1,080
0
Discovered something interesting / crazy in Unity yesterday.

For awhile I've been noticing in the shaders I write that sometimes incoming data is unexpectedly already in world space. If I do the usual model transform, it doubles it, placing it doubly far away from the origin with double the rotation. Then oddly later I'd find something rendering at the origin because I took the model transform out.

Turns out they bake the overall transform of the game object into the root node of a skinned mesh. That means if you are doing a skinned shader, when you do the weighted skin transforms you go directly from model space to world space, skipping the "skin space" you'd usually have.

If you want to use the same shaders for static and skinned, you have to check for bones, then send an identity matrix for the model matrix.

The really crazy thing though, I'm not really sure why they do this baking, or if it always happens. Since skinned stuff is so built in and they never anticipated anyone messing directly with bones, there's very little info out there on this. The only related thing I've found is the mecanim stuff (which I haven't touched yet) apparently uses animation to translate the game object. So they might be baking the root bone to support this.

I've been on one project where we tried that (animation driven movement) and it was a total disaster that we ended up abandoning. Apparently it is a common practice these days so I guess they have worked out all the issues.