|
|
Archive for 'unity'
Almost half a year ago I was wondering how to implement T&L in vertex shaders.
Well, finally I implemented it for upcoming Unity 2.6. I wrote some sort of a technical report here.
In short, I’m combining assembly fragments and doing simple temporary register allocation, which seems to work quite well. Performance is very similar to using fixed function (I know it’s implemented as vertex shaders internally by the runtime/driver) on several different cards I tried (Radeon HD 3xxx, GeForce 8xxx, Intel GMA 950).
What was unexpected: the most complex piece is not the vertex lighting! Most complexity is in how to route/generate texture coordinates and transform them. Huge combination explosion there.
Otherwise – I like! Here’s a link to the article again.
Posted on 2009-06-09 8:08 in code, d3d, gpu, rendering, unity, work | 4 Comments »
Continuing the series (see Part 1, Part 2)…
Got different lighting models (BRDFs) working. Without further ado, code snippets that produce real actual working shaders that work with lights & shadows and whatnot:
(more…)
Posted on 2009-05-10 17:24 in gpu, rendering, unity | 1 Comment »
I started playing around with the idea of “shaders must die“. I’m experimenting with extracting “surface shaders” for now.
Right now my experimental pipeline is:
- Write a surface shader file
- Perl script transforms it into Unity 2.x shader file
- Which in turn is compiled by Unity into all lighting/shadows permutations, for D3D9 and OpenGL backends. Cg is used for actual shader compilation.
I have very simple cases working. For example: (more…)
Posted on 2009-05-07 23:35 in gpu, rendering, unity | 9 Comments »
A couple of weeks ago Google announced O3D: an open source web browser plugin for low level accelerated 3D graphics. The website for O3D project is here.
Of course this created some buzz (hey, it’s Google after all). And it is in some way a competing technology with Unity. I think it’s going to be interesting, so I say “welcome competition!”
Preemptive blah blah: this website is my personal opinion and does not represent the views of my employer, former employers or anyone else other than myself.
Unity is one of the players in “3D on the web” space. 3D graphics in the browser are in fact nothing new. Unity’s browser plugin has existed since 2005 and is now in eight digits installations count. There is VRML, X3D, Adobe Shockwave, 3DVIA/Virtools, software rendering approaches on top of Flash and so on.
In my view, major advantages that Unity has compared to O3D:
- It’s not only about the graphics. Unity has physics, audio, input, scripting, streaming, networking, asset pipeline and whatnot. O3D is only about the graphics, and at a lower level.
- Unity runs on wider range of hardware. O3D requires Shader Mode 2.0 or later hardware, so about 30% of the “machines on the internet” can’t run O3D (based on our 2009Q1 data). Couple that with lots of compatibility workarounds that we have and it’s probably safe to say that Unity is more stable and mature at this point.
- Unity is not only about the web. There’s support for iPhone, Nintendo Wii, standalone games, and with time more console and mobile platforms will come.
- Creating and improving Unity is our primary and only focus as a company. In Google’s case, O3D is just another technology in their vast portfolio.
Of course, O3D also has advantages:
- It’s done by Google! When Google does
something anything, people notice immediately :)
- O3D is free and open source. Hard to beat the free price, and open source does have it’s benefits. O3D is not a “standard” of any sort right now, but it looks like Google would want it to become one.
- Only focusing on low level graphics has it’s benefits: it’s lightweight, it appeals to hackers and graphics programmers who want to be in control. Unity’s higher level is much easier and faster to use, but low level hacking can be fun.
Of course there are tons of other differences (I might have missed something important as well).
For me as a rendering guy, it’s interesting to see O3D taking similar decisions here and there (e.g. they don’t use GLSL on OpenGL either because it does not really work in the real world).
So… we’ll see where things will go. It’s going to be interesting!
Posted on 2009-05-05 14:01 in rendering, unity | 5 Comments »
Unity 2.5 is finally released. In summary:

Here’s what’s new. Here’s the download page.
My 11th Unity release since I joined 3+ years ago. This is quite a crazy release that involved almost complete editor tools rewrite and lots of other juggling. Was not exactly a walk in the park, but it’s done now. Meet me at GDC in San Francisco next week and I’ll tell you the war stories (Unity booth is 5110 NH).
Here’s the obligatory source code commits graph:

18 people involved in source code, 5315 commits, 18501 file changes. Of course, svn commits do not mean anything… I’m just fascinated by graphs and numbers.
Posted on 2009-03-19 15:13 in conferences, unity, work | 3 Comments »
A few weeks ago it was all calm in the source control. Now it’s crunchtime!

I’m the master of svn deception. I do tons of useless commits just so that the stats look good. Yeah!
…ok, back to work.
Posted on 2008-11-10 15:09 in rant, unity, work | 2 Comments »
Yesterday’s experience catching up with Unity forums, as I remember it:
Take a quick look at zillions of new posts.
Answer about five questions with “what’s the value of your camera’s near plane?”.
There should be some way to automate all of this. For every 20th question, reply with “increase your near plane!”, or something.
Posted on 2008-10-30 9:00 in rant, unity, work | No Comments »
Spent last week at our conference, Unite 2008. Lots of people, lots of stuff and goodness, tired as hell, but almost recovered already.
We showed a glimpse of Unity editor for Windows at the keynote, so it is public now – yes, we are working on Windows toolchain. About the time! This is the major area I’m spending time these days – Windows, Windows, Windows. Learning WinAPI as I cruise along :) Before Unity 2.1 I spent months fixing tons of small issues, now I’m spending months doing tons of small Windows related things. Someday I’ll get back to doing tons of small things on the rendering side.
Here’s a couple of random photos that I stoleborrowed from Mantas:

Keynote in front of a Sentinel from The Matrix.

Presenters talking.

People listening!

I don’t know that guy in the center. Probably some stupid outsider. Really!
Posted on 2008-10-29 22:24 in conferences, unity, work | 1 Comment »
I’m quoting awesome post by Charles Hinshaw from Unity forums:
I vote that we complain enough that they don’t share plans until everything is 200% done – I personally don’t want to know about a new version of Unity until after I have already shipped at least one game built with that version.
Alternately, UT could issue press releases that lack any information that might set expectations and/or require approval from third parties:
Unity Technologies ApS, announced today that they may be releasing an update to their popular game development software at an undisclosed future time.
From their offices in Copenhagen, Unity Technologies CEO and co-founder, David Helgason, said “We’re pretty excited not to announce anything specific about this potential upcoming release as we think that many of our users may be pleased by the addition of some number of features that may not have been present in previous versions of the software.”
Tom Higgins, Product Evangelist, added “The features in this software are making it possible for a number of undisclosed companies to work on various projects that may be released in the future. I think all of our users might be inspired by the things that may currently be under development with this future version of Unity.”
edit: Uhm, based on the replies that follow, apparently it wasn’t obvious that I am not seriously requesting this.
Way to go! :)
Posted on 2008-09-20 6:39 in random, unity | No Comments »
(if this sounds like a rehash of a blog post on blogs.unity3d.com, well, it is…)
Everyone knows the Valve’s hardware survey. But what if your target game players are not the traditional “big budget AAA game” type? For example, at the moment most Unity Web Player games are oriented to much more casual market, so hardware there might be very different. And indeed, turns out it is quite different.
Without further ado, here’s the data we have: Unity Web Player hardware statistics.
It’s about two million data points since we started gathering it earlier this year.
Some subjective points of interest (I’ll be using current data for 2008 Q3 here):
- Operating systems: Mac OS X is 2.5%, the rest is Windows. 64 bit Windows haven’t really picked up yet (0.7%). Windows 2000 is dying fast (0.7%). OS X Leopard already took over OS X Tiger.
- CPUs: poor Transmeta :) Dual core CPUs are becoming the norm (46%).
- Graphics cards: quite sad, in fact… top 15 cards are slow or horribly slow. Capability wise, they are quite good, with about 70% having shader model 2.0 or higher. Shader model 1.x cards are dead. “Can has DX10” is 2.7%.
- Casual machines don’t have lots of RAM. Nor lots of VRAM.
- Most popular nvidia driver? 56.73. Looks like this is the driver that comes integrated in XP SP2… Now, who says regular people ever update their drivers? Likewise, vga.dll (i.e. standard VGA) is 1.6% of machines; additional 1.5% don’t report any driver (not sure how that happens…).
So yeah. Casual machines: capabilities quite okay, performance low, low, low. That’s life.
Posted on 2008-08-28 20:32 in games, gpu, unity | 3 Comments »
|