The blog is being migrated and merged with multiple Imphenzia blogs so the format and content will be inconsistent for a while.


First week of "normal" work following my paternity leave is now in the past and I am enjoying a very welcome weekend.

Motocross practice at Uringe

Today I spent a few hours at Uringe, a great sand track south of Stockholm, where I tried to improve my motocross skills. It went fairly well with only one minor crash but plenty of fun. Bike collected some sand as you can see in the picture below - quite easy to clean with the pressure washer though....

Making Exlusive Music for Three Games

I've also recently had requests to create exclusive music for three different games. Two games for the mobile platform (Android + iPhone) and one game is aimed at computers and consoles.

Quite exciting because the music needed is of very different genres and it's a lot of fun to let the creativity take over and see where it leads.


As for Astrofighter.Net I've managed to make slight progress here as well. I've imported the low poly ship versions into Unity and I'm currently placing all the thruster and weapon mount points. Next will be texture mapping the ships and adding script code for the remaining weapon types.

Ränneslättsloppet 2011

Yesterday I participated in an enduro race called "Ränneslättsloppet". It's a competition with thousands of participants in different classes. I raced the recreational class for men aged between 30-39.

The weather was great and the trail was dry but not dusty. I got a decent start but my lack of experience in competitions such as these lead me to ride defensively in the beginning so I more or less just joined the flow. During the first lap we saw some traffic jams and no less than two bikes catching fire =)

Note: The thumbnail is linked, not copied, and it leads to the photographer's site (www.bildeffekt.se) which contains many great photos from the event.
One lap was 20 km in length and the goal is to do as many laps as possible during 155 minutes. The winner of my class did 5 laps and I am very satisfied with the 3 laps I completed being so novice at this.

My only other previous experience was when I participated in Stångebroslaget earlier this year and that was a truly painful experience trying to get my motocross bike (KX450F) to take me through extremely muddy forest terrain and it kept stalling and draining my energy having to kick start it all the time. For this race I had bought a WR250F enduro bike instead and that made all the difference in the world. I didn't stall it once while riding, only 3-4 times when I crashed.

Pre-race activities

05:30 - Alarm clock goes off. Time to get some stuff out of the fridge and pack it into the cooling bags to meet up with my race mate.
06:30 - Trailer with bike hooked up to the car and we head off on the 320km journey down to Eksjö where the competitions is being held.
10:00 - Arrival at Eksjö. Registration and carried all the stuff to the pit area for the service stops. We brought 2 spare wheels in case of flat tires, petrol, water, power drinks, tools, extra gloves, extra goggles, environmental mats, and some other bits and pieces.
11:30 - Rode our bikes to the inspection area where they were approved for the race. Then headed off to the start area where we lined our bikes up along side another 1000 bikes.
12:15 - Got dressed and packed our camel backs. I skipped my motocross top and just had a t-shirt and body armor. I overheated big-time at Stångebro so I needed to to all I could to keep the temp down. I also packed an extreme amount of fluids. More than anyone else with a small backpack filled with 2 x 2L water and 2 x 0.5L Powerade. I wasn't going to dehydrate this time!
12:30 Arrived back at our bikes at the starting line. 15 minutes to go.

The Race

I was placed in the last line of the 30-39 year-olds, and then we had the 40-49 and 50-65 year old riders starting 5 minutes after us. As the start went I got a clean launch and settled into the tempo fairly well. It was quite a few traffic jams and pileups the first half lap so I got to eat some mud, watch a bike on fire, and pushing and shoving my way past every here and there.

The terrain was quite dry but also quite rocky. Sometimes the front wheel would catch a rock nearly sending me off the bike but I completed the first lap without any crashes. I also found out that my new bike, a WR250F, was extremely kind to me and I didn't have to work nearly as hard as at Stångebro which also meant that I didn't have to drink any water during the first lap... Great, 5L fluids on my back for nothing =)

I skipped the service stop on the first lap. I had all the water I needed and the bike didn't need any petrol yet so I decided to press on and save myself from pushing the bike through the service area in the blazing sun. Better to stop somewhere in the shade later on to drink saving me energy and time. So I did, about half way into lap 2 I found a nice shaded area just off the trail so I stopped there, drank water and a Powerade, then continued.

There is a section of the track called "Berget" (Mountain) which is a steep and very slippery section which is definitely the most challenging part of the track. The first lap I chose to take the "easy" way around it because it was heaps of traffic and I didn't want to get stuck in it, or cause additional jams for that matter. Now, on the other hand, I decided to go for it on the second lap and I cleared the hard path quite easily.

Not long after "Berget" my front wheel caught a rock on a descent which sent me and the bike flying. I tried to stay on the bike but failed and my knee got twisted to a point where it hurt a bit, but not excessively much. When I picked the bike up and carried on I tried to lift my leg back to the foot pegs and it felt really really strange... I couldn't make out if the bike had been damaged or if my leg was totally messed up. Maybe adrenaline was keeping me from feeling that the leg is wrecked I thought...

The awkward feeling remained and something just didn't feel right. I managed to turn my foot back and forth, wiggle my toes, and lift my leg despite the strange feeling and as I rid another few km I came to the conclusion that it must just be a combination of the bike having had a slight deformation by the foot peg and me being tired that caused the awkward feeling.

I reached the service area after lap two and as I got off the bike I contemplated whether to call it a day and be satisfied with completing two laps or go into the service area and fuel up me and the bike for a third lap. I chose to the latter. I didn't come all this way to give up with time to spare.

I stayed in the pit area for about 15 minutes. Dropped my backpack and replaced it with a single camel back with 2L of water. Ate a snickers bar and some "Dextrosol". Poured half a bottle of water over my head and took off again.

On the third and final lap I was starting to get really exhausted. My arms weren't strong and my legs started to cramp up when I was standing so I had to sit down a lot more which meant my ass took a beating on the rocky sections. I can feel that today (the day after.) I kept quite a slow tempo but managed to speed up every now and then. A lot of riders completing their 4th and 5th lap were lapping me at this stage and I always knew when they came as they shouted from behind to make their presence known.

I reached "Berget" for the last time and I had already decided to take the easy route - but for some reason I didn't. I launched myself up the hard section of slippery rocks and about half way up the bike slid to the side and I had to jump off. No harm done to me but the previously awkward feeling foot peg was standing straight up and I though, great all this way to mess up the bike so close to the finish... turned out it was just stuck a bit so after giving it a good kick it was back to just being awkward again.

Not long to go now... I can hear the speaker making announcements in the background. I come to a long whoop section along a concrete barricade where I had done some wheelies over the whoops the previous laps. Shifted up to fourth and gave the throttle a good twist. I saw two spectators standing by the concrete barricades about 100m ahead of me and just as I approach them I jump off a whoop just to see my front wheel hitting the next one sideways... I wobble big time and nearly go over the handlebars. In the corner of my eyes I see the two spectators jumping back to avoid potentially being hit by a bike and an exhausted rider. Somehow I regain control over the bike and I managed to glance over at the spectators and give them a nervous smile just as I pass them. That's it now - no heroics from now on.

I rolled over the final whoop sections and I enter the last windy section on the big grass field that leads up to the checkered flag. I did it... and despite being very far from the top of my class I am happy with my result. The winner did 5 laps in 2 hours 58 minutes and I did 3 laps in 3 hours and 18 minutes. I finished in 232 place.
Here is a helmet camera that someone wore during the first lap in my class. The rider wearing the camera finished in 250th place but I can't spot myself anywhere in the footage. "Berget" can be seen at around 24 minutes in to the video. And it always looks easy on video - try it before you decide whether it really is easy or not =)

Redeemed myself today

I'm happy to day that today I redeemed myself from yesterdays failures.

Getting the missing parts

After today's daily pickup [of my child at daycare] I set off to buy the toilet seat, the front brake disc, and the hand guard mounts that I failed to get yesterday. My son only threw up once on the journey as well, that's not bad. Also, he refused to exit the huge plastic car attached to the shopping cart at Bauhaus so we were stuck in the parking lot for a god 10 minutes convincing him that it's much more fun traveling backwards in our real car so he can throw up properly again.

Raycast my bullets please

I also managed to implement a great Raycasting bullet script in Unity3d. My previous bullets, or projectiles, were using rigidbody physics and a collider but even with continuous collisions enabled my fast moving bullets went through obstacles. This is not uncommon in Unity from what I understand which is why I had to switch to Raycasting instead.

Basically, raycasting is when you look ahead a certain distance to see if the bullet will hit anything whereas the rigidbody method just teleports the projectile forward and if the step is large enough to step from one side to the other in once fixed timestep, the bullet will just bypass the object. So - check out the link to the bullet script if you have no knowledge of Raycasting in Unity - it helped me out a great deal.

I did do one modification, however. When a rigidbody is hit, I apply AddForceAtPosition (instead of AddForce) in order to introduce torque on the object hit making them spin nicely:
hit.collider.rigidbody.AddForceAtPosition( transform.forward * 
impactForce,transform.position, ForceMode.Impulse );

Shader to make a shielf / forcefield

I also managed to give my spaceship a nice force field shield using a custom shield shader in Unity. Since my little game is top down view I didn't quite get the nice effect as seen on that page - so for the time being I apply a plasma texture that is animated across my ship and it looks quite nice.

Tomorrow is another day

Well sort of anyway. It's 01:59 AM and I have just queued up what to think about when heading off to bed. I'll use some of my brain's processing power to figure out how to best structure the assets for my little space fighter game. I'm hoping to get a prototype of the game up and running in a couple of weeks. It'll just have one space craft and one weapon - but most importantly - multiplayer must work!


I nearly did so many things today

I went to town today because I had to do three things. 1) Eat lunch with a mate of mine, 2) go to 24MX and buy a new front brake disc for my motocross bike and get a missing mount for the hand guards for my enduro bike, and 3) get a new toilet seat from Bauhaus. I had enough time for 1) and then I had to go back to pick up my son from daycare...

See it's not that sharp

I'm switching to C Sharp (C#) from Javascript (JS) in Unity3D and it's slowing me down at the moment. I'm switching because I kept being told that C# is so much better - but so far my experience is that you just have to write more code and find workarounds for stuff =) Still, I gather I'll find use of C# knowledge so I'll persevere. It'll also help me from snarfing code because most code is Javascript and if I manually convert it to C# I can understand it better... and improve it?

The bottom line is that I haven't managed to get very far today on my Space fighter project today. I've got my ship flying around with mouse and keyboard control, I can fire an animated blaster canon, and I found out the Dynamic collision detection in Unity can't really be trusted. Oddly enough the bullets collides with obstacles all the time, perfectly, in the editor - but not in the compiled version? I decided not to troubleshoot it any further because I use fast moving bullets and from what I gather I should be using raycasting instead so that's something I'll look deeper into tomorrow.

I nearly bought Harmor

[caption id="attachment_420" align="alignright" width="300" caption="Harmor VST - doesn't like 64 bit hosts"][/caption]

No, not armor. Harmor is an awesome sounding additive / subtractive synthersizer VST instrument. I mate of mine told me about it today and I downloaded the demo just to find out it's a 32bit VST instrument and I run Cubase 5.5.3 x64 (64 bit). Harmon crashes Cubase for me after only a few minutes of use, gah.

Well, before buying Harmon - I thought I'd contact Image-Line (developer of Harmon) and ask them about their plugin crashing in Cubase. Image-Line support have no contact details on their web page and they direct all technical inquiries to their technical support forum.... Well, their technical support forum only appears to be supporting "FL Studio" because after registering in their forum I found out I have no authorization to post any questions in their support forum (which is also titled "FL Technical Support".)

I then found out that VST Bridge (the component that keeps crashing in Cubase when i use 32 bit plugins) is not to be trusted if I go by what forum users at Steinberg say. Instead there is a suggestion to either downgrade to 32bit Cubase (which I don't want to do because I have 24 GB Ram for my orchestral libraries and 32 bit Cubase would allow me to use about 3 GB of that memory at best), or use JBridge (or Bitbridge that I never found anywhere.)

[caption id="attachment_421" align="alignright" width="300" caption="jBridge"][/caption]

I downloaded the demo version of JBridge and it took me a few launches of the installer to figure out what to do, but I found a simple step by step instruction and using that the installation worked great.

Harmor seems more stable using JBridge, but it's not hassle free their either. Quite a few times during half an hour of use Cubase froze, the Harmor GUI turned white with nothing in it, but I found some features I could enable in JBridge that seems to have combated most of the issues. Just as I write this I get "IL Harmor.dll - Forcing auxhost termination due to an error. Dispatcher: 19; Audiomaster: 15" - and IL Harmor turned bright white again. Now I got "Dispatcher opcode 19 failed (IL Harmor (demo)/1229483375)." -but wait - I saw something in the help for that...  I have to enabled "I am getting a dispatcher opcode 19 error message" - great, I love it when I know what's happening.

Well, I'm not convinced JBrige will solve any stability issues - I just seem to get other types of stability issues.



  • I nearly bought the front brake disk and hand guard mount (but time ran out)

  • I nearly bought the toilet seat (but time ran out)

  • I nearly made some progress in Unity (but C# & buggy collision detection stopped  me)

  • I nearly bought the Harmor  VST (but it's 32bit and buggy)

  • I nearly contacted Image-Line support (but you can't)

  • I nearly bought JBridge (but it just changes the bugs around)

  • I nearly went to bed in time, but now it's 3:12AM

All the children get their own (voodoo) doll

I was told off today and rightly so! My son has been in daycare for two weeks now and "I STILL hadn't sewn his doll" one of the staff reminded me in a friendly but firm manner.

All the kids have dolls that their parents make for them in case they need comforting. They can also be used when resolving conflicts between children where they act / replay an event using their little dolls.

Me? I'm convinced it's a voodoo doll!! Since I'm the one who sewed it I'm sure my son will be able to inflict great pain even when he's at daycare.

Anyway, I had to give the doll full priority tonight and sewing isn't one of my strong skills. I just finished it now and I hope he forgives as he will probably have the plainest looking doll of all children. I overheard the mothers discussing the dolls last week. It was all about fashion, choice of fabric, what accessories to make them, and so forth. To make up for the lack of detail I gave the doll a superhero cape (and some awesome superhero powers.)

[caption id="attachment_413" align="alignright" width="620" caption="Superhero doll"][/caption]



3 New Non-Exclusive Music Loops Released

Tonight I added three loops to the non-exclusive music library.

What else did I do today?

Even though I am on paternity leave things are quite hectic at the moment - but in a good way.  I drop my son off at daycare at 08:45 in the mornings and then I have some time to spare for my projects until 13:30 when I pick him up again. He is only spending short periods of time there still as he just started last week but it's still a bit heartbreaking leaving him in the morning as he bursts into tears as I leave him. My wife is taking care of our new baby girl most of the time so I can spend the 4 hours on my projects most days. Today was an exception though, I had to spend 2 hours searching for my wallet (which I had apparently left behind at the daycare center) and another 2 hours cleaning my car.... so no time for my projects during the day today.

3DS Max and Unity

Render of final space shipI'm also spending some time in 3DS Max learning some low polygon modelling. I am making a little space game so I can learn both 3DS Max and Unity3D properly because I plan to make the sequel to the yet unreleased game "Performa Cars" using Unity's powerful 3D engine. I will still make the game very much 2D looking because my passion is top-down racing.


[caption id="attachment_364" align="alignright" width="300" caption="My KXF 450"][/caption]

Our local motocross track is open on Wednesday evenings (as well as weekends) so today I spend 3 hours there practicing. I rid my Kawasaki KXF 450 (2008 model) and it went fairly well until blisters in my left palm put an end to the session. I'll have to figure out a way to tape it up for the weekend. My goal is to ride twice a week all year around. In the winter I put on spiked ice tires and I actually prefer to ride in the winter because the grip is amazing... and I don't overheat as much as I do in the summer =)

Modern Warfare 2

I also managed to squeeze in a two hour session of playing Modern Warfare 2 with a mate of mine tonight.

Plan for the coming weeks

My plan for Imphenzia Projects during the coming weeks include:

  • Re-launch the Imphenzia Games web site with the new design (as Music and Soundtrack)

  • Release Performa Cars (a.k.a. project Computer Touring Car Championship) as freeware

  • Composing more music for release on Imphenzia Soundtrack

  • Continue to learn low poly modelling and Unity3D development for future Imphenzia Games projects

  • Keep this blog updated

Imphenzia aside, I also need to:

  • Spend time with my family

  • Practice motocross

  • Keep fit (run 3 times a week)

  • Buy another car... can't fit the new double pram in the boot/trunk...

  • Contact contractors for building plans... boring...

Now it's time for bed at 01:53 - should have no problem sleeping.