"He who knows not, and knows not that he knows not, is a fool...shun him.
He who knows not, and knows that he knows not, is willing...teach him.
He who knows, and knows not that he knows, is asleep...awaken him.
He who knows, and knows that he knows, is wise...follow him."
- Chinese Probverb
More pages: 1 2 3 4 5 6 7 8 ... 11 ... 21 ... 31 ... 41 ... 48
MakeID - Unique ID generator
Tuesday, December 31, 2013 | Permalink

It's been a while since I posted anything here; between family life and a computer that was broken for a month or two there hasn't been much opportunity to post anything, but now at last I can offer an update. Yay!

So here's a piece of code that I have probably spent a little too much time tweaking considering the relatively narrow scope. It's a simple header-file only library for generating unique IDs at runtime. The reason I conjured up this from the beginning was sort of a problem I encountered at work. Basically our sort-IDs that we use in the rendering system are 64bit. Typically we would throw in a pointer to a "RenderBlock" as they are called in our system, which more or less corresponds to the data for a draw-call. In 32bit this was fine, as we still had 32bits for encoding other stuff, like shader permutation, state flags etc. 32bits for distinguishing things that are basically in the order of tens of thousands is a bit of a waste. And now with 64bit pointers, it's eating the entire sort-ID, except the bottom 4 bits because of 16byte alignment. So I wanted to create unique IDs for these that are much smaller, say 16bits or so. So I made a lib to manage a pool of IDs and always returns the smallest free ID. So if you allocate 5 handles, you'll get 0,1,2,3,4, and then if you free 3 and later ask for a new ID, you'll get the 3 again.

Beyond this particular use case I can also see some other uses. For instance as replacement for hashes, handles or resource pointers at runtime. It can also be used for managing a pool of shared resources, where the ID can be used as an index into an array. The underlying storage can be reallocated without a need to update IDs handed out as handles elsewhere. And all IDs bunched up at the bottom of the array is of course also great for memory and cache behavior.

There may be other uses as well that I haven't thought of. In any case, the code is released in public domain, so feel free to use any way you want. Any feedback is of course also welcome.

Update 2014-01-23:
There's now a 1.01 version available. No dramatic changes, mostly minor code review fixes.

[ 1 comments | Last comment by Denis Gladkiy (2014-01-08 18:32:19) ]

Siggraph slides available
Sunday, July 28, 2013 | Permalink

At Siggraph I presented "Practical Clustered Shading" together with Ola Olsson. The slides are available here.

I also presented "Populating A Massive Game World" together with my colleague Joel de Vahl, and the slides for that can be found here.


Added another 5 cubemaps
Monday, June 10, 2013 | Permalink

I have uploaded another 5 cubemaps. Available on the Textures page.

[ 1 comments | Last comment by Käy Vriend (2013-10-02 23:39:41) ]

Nordic Game slides
Friday, May 31, 2013 | Permalink

The slides from my Nordic Game presentation Practical Clustered Shading is now online in the Articles section.

The slides from Ola Olsson's part can be found on his site.


Learning Chinese
Thursday, May 30, 2013 | Permalink

I make an appearance in the latest Skritter newsletter discussing my experience learning Chinese. I did not choose the headline though.

For anyone interested in learning Chinese or Japanese, I definitively recommend Skritter. I started using it almost exactly 6 months ago now, and I have picked up a bit over 2400 characters.

Talking with a friend about babies some time ago she mentioned that young kids pick up 10 words every day., which of course is amazing. It's generally acknowledged that learning languages is something that kids do much easier than adults, but thinking about it, I've been picking up 13 characters a day on average, and about 35 words a day at my current rate. As an adult, I find that mind-boggling. So language learning at a similar speed or even faster is certainly possible for an adult. Of course, I need to make a conscious studying effort, rather than just existing within an environment where a language is spoken around me. But even so, using an effective method, which Skritter does, can get you a long way, even as an adult. Of course, YMMV, and maybe the reason I ended up in the newsletter was because I was a power user well above the average, with a consistent learning curve. The average user may have a harder time. Certainly, having a Chinese wife and Chinese spoken around me on a daily basis kind of helps. And I also believe you need a traditional school course as a basis to get going. Words and characters is great, but you do need grammar too.

[ 9 comments | Last comment by Chinese A (2013-10-14 10:29:15) ]

New cubemaps!
Saturday, April 20, 2013 | Permalink

It's been a while since the last time I uploaded new cubemaps, but that doesn't mean I haven't been shooting any since then. I've just not kept up with uploading new ones. And not too long ago I also discovered that I had unsorted source material for over 20 cubemaps lying around that I hadn't touched. Some of those are in this batch of new cubemaps. Today I'm adding another 11 cubemaps, but I have more in the pipeline coming soon.

[ 2 comments | Last comment by Augusto (2014-04-14 20:41:54) ]

GDC slides
Thursday, April 4, 2013 | Permalink

The slides from my GDC presentation Low-Level Thinking in High-Level Shading Languages are now available for download in the Articles section.

[ 7 comments | Last comment by Abnormalia (2013-05-07 16:15:41) ]

Head of Research
Wednesday, March 20, 2013 | Permalink

A little while back I was appointed Head of Research at Avalanche Studios, which is now also official externally. What this means is that I will focus mostly on forward-looking R&D going forward, sometimes going down paths that aren't necessarily always going to result in anything useful in the end, but hopefully also sometimes yielding results that are worthy of publishing in peer-reviewed journals. I'm very happy that our studio is prepared to spend resources outside of the safe zone and aim a bit further. It's truly a great privilege.

In addition to research and publications I will also try to increase our presence on conferences. As I mentioned earlier, I will speak at GDC next week. Hope to see you all there. I also hope to be able to contribute on many more conferences and hopefully even dragging a few of my coworkers along once in a while.

[ 7 comments | Last comment by lim (2013-05-03 11:46:34) ]

More pages: 1 2 3 4 5 6 7 8 ... 11 ... 21 ... 31 ... 41 ... 48