Friday, December 24, 2010

Covii Challenge part 2 update log: Friday

Day 5-Thursday:
Update 1(2:12):
  • The Final day! The Final Hour! The Final ... ok nvm
  • I finished the project about 15 minutes ago and sent it for review. I'm fairly confident they'll like it even though I personally would add some things like transition effects, DoF and Anti-Alias. I would probably rework my particle engine to allow particle area segmentation with which I could add some more realistic water effect to the second program (I ended up making two programs since I don't have much time and couldn't implement the transition effect).
    And Here are the screenies!
As you can see I fixed the low saturation problem!


Yeah, I know the trail doesn't look perfect, but believe me, it's not at all that noticeable  when it's running.

  • In retrospect I feel like I wasted far too much time resting, even though this project was a bit strenuous, as I must get used to working under such pressure if they are to keep me in the company for more than a few days. I also made a few rules that should help me survive and lead a healthier lifestlye when working:
  1. Sleep Early,Sleep a lot!
    8 hours of sleep a day is a must, even if it means not playing my games or watching movies before going to sleep. Sleep deprivation and lack of a standard sleep hours were one of my biggest mistakes I did during this challenge. An afternoon nap and a night's sleep is a must!
  2. Eat Healthy Food! (and longcat is long)
    As obvious as this sounds eating healthy things is actually a problem for me. Not because I don't like it, as I do enjoy a salad every once in a while, but because I don't find time to prepare proper food and resort to eating tuna or chocolate cream sandwiches all the time. I've noticed that in days I went out to eat in a restaurant I actually performed an incredible lot better than in the days I eat what basically is unhealthy garbage.
  3. A rest from programming is a rest from computerI've learned that if I work for a few long hours and then rest by playing games or watching movies, I don't actually rest as well as if I have taken a walk, it's also a lot more difficult to come back to . I still fall into the trap of playing games or browsing websites when I should leave the pc alone for an hour or two, so it's something I'll have to work on.
  4. Animation is Concentration! (but I'm programming!)Anyone who ever read Richard Williams "Animators Survival Kit" probably knows the quote "Animation is Concentration" inspired by Milt Khals' angry outburst  at Richard when he asked him if he listens to any music while working. This was Milt's response: "F-F-F-For Ch-CH-CHRIST'S S-S-S-SAKE, GG-G-GG-GODDamnit! WHAT A F-FF-F-FF SSSTUPID QUESSSTION!!! I'M NOT SMART ENOUGH TO THINK OF MORE THAN ONE THING AT A TIME!!".
    Yeah, Milt Kahl didn't listen to music while he was working and neither should you!
    Even though I'm a programmer this still holds. Music and any other sounds distract from work more than you realise and I've come to experience this first handed not only this week but along my life as well when I'm studying or working on my own projects.
    Turn off Messenger (or put it on busy and disable all notifications), close any youtube tabs you have open, close Winamp and listen to the silence.
  5. Get InspiredMy biggest problem when working is that I easily change focus, however this also comes with another trait of personality: I get inspired really easily. Every now and then I look for videos made by game "celebrities" like some of Chris Hecker's presentations where he talks about the tech they developed for Spore, or interviews with indie devs like the Wolfire team. Those videos always inspire me to work harder so one day I could achieve what those people have achieved. I also read a lot of tech presentations, especially those made by Valve. Those are also a good source of inspiration and you gain invaluable knowledge even if you can't replicate it at the moment.
  6. Keep things mixed up!
    There's one thing I'm prone to and that's fatigue. I can't work more than a few days on one thing. My solution to this problem was actually quite easy to come by: get a hobby in an area completely unrelated to programming. In my case I always liked to draw so this problem was solved by itself. Every now and then I grab Photoshop or Blender and just do something in it. Having activities spread in unrelated areas is really good for avoiding fatigue, and it even may bring advantages. I for example am more of an Game Engine fundamentals programmer, but being interested in modelling drawing and animation made me interested in graphical computing which in turn gave me this opportunity to work at CoVii!
  • I guess that's all of them. Those are the rules I set for the future. Some of them I've been following already, other will take a bit of time before I get used to them, but if I manage to follow them all I should perform my best at work and avoid procrastination while I'm home!
  • On Sunday I'll probably upload a video of the program in motion.
So, this series of updates is finally finished. I hope those of you that read it enjoyed it as well. From now on this blog is going to get a bit less active at least until Febuary which is when I'll move to a new apartement.
This was Mikolaj Kuta, AKA Spliter
Seeya!

Thursday, December 23, 2010

Covii Challenge part 2 update log: Thursday

Day 4-Thursday:
Update 1(2:49):
  • Almost  3 in the morning, I've been working for the last hour or so with brief rests to watch some youtube videos from my subscriptions. If I'm lucky Batman9502 will upload his LP videos for his Ocarina of Time and Megaman Legends 2 in less than half an hour, if not then it's off to bed  without a good-night cartoon :(
    Anyway, I digress. Here's what I've accomplished in the last hour and a half:
  1. Cubes that light up softly 
  2. When the mouse passes them not too fast and not too slow, they fly in the direction of the camera missing it by just enough not to notice any clipping.
  3. Trail effect on the cubes is finally noticeable.
  4. Added a very nice looking background that changes softly over time(only noticeable without cubes on the screen), I did this using a simple gradient background texture
  • So, not that much done but these are the new accomplishments. As usual I also fiddled with the framebuffer order and some colour and opacity, the colours look too desaturated for me in the current state; changed the bloom effect settings so it's a lot more subtle; changed the way the particles render so the final image looks softer, but at the same time allows me to illuminate the particles I need above their texture color. I also removed the specular highlight. It was far too strong even on the lowest settings, so I'll just stay with the very subtle sphere map.
  •  ANYWAY! Here's the product from few hours ago:
 Randomly Lit cubes with random rotations FTW!

  •  And here's the product from a few minutes before I started writing this entry:
 You see what I mean by too desaturated?

  • The background has a very nice color but the cubes, even though they have the same hue, are a lot more desaturated and I'm still trying to figure out why. I'll probably fiddle around with the light and the 2nd pass to add more red and blue
  • So! I'd say this part of the project is quite close to being done, all I have to add now is to make the cubes rotate when you pass over them with the mouse! Then it'll be off to the second part of the challenge where I'll have to add the same water-y effects to the particles as in the Yellow Submarine from the previous challenge and create another particle system that creates the particles near the mouse to give a similar effect to the one in the video they gave me. If I'm done in the early afternoon then I'll add some extra flavour like the screen shattering into a hundred of small cubes when changing from one effect to the other. This would be quite easy to do if I had the time since I render most of everything on Texture-bound FBOs.
  • I have one regret towards this challenge: I have to copy someone else's work. Not exactly, but since they gave me a reference I've been following it quite strongly so I don't sidetrack as I usually like to do. If I had more time I would've made some significant changes like adding Anti-Alias to the scene so it would look a lot more polished. I would've also added interesting physical effects to the particles, like visual effects like changing the hue of the scene or make the cubes actually behave "softer" using shaders (stretch them in the direction they're flying for example, and expand a bit when rotating really fast)
 Update 1(15:07):
  • I sent my (hopefully) future boss two of the screens I had here on my blog and he liked it! In fact he liked it so much that he said he wants to close the deal! I'm going there to work with them for one day and if they like me I'll be working!! I'll be part of a team that makes awesome projects and lets me get better and better at what I love to do! YEAH!
    Ekhem. Now we resume our scheduled programme:

  •  I added mouse speed dependent rotation to the cubes using cross product between the mouse current, and previous positions and the particle coordinates. Now the cubes rotate properly, if you pass the mouse over them slowly they'll rotate slowly in the direction the mouse is moving, if you pass your mouse a bit on the side it'll rotate on an angle perpendicular to the mouse movement in relation to the particle.
  • I also render the trail above the particles but with much more subtlety. This gives them the appearance of delicate semi-translucency especially when they move fast around the screen, it also helps softening the scene giving it a more...uh... ethereal(?) look?
    Here are the screenies:



  • There are still some thing I would like to try out like making a DoF effect using part of the blur shader but make the blur stronger the closer the particles get to screen, I'm not sure if I have time to do that since I still need to get working on the second part of this program which is making much smaller cubes that light up stronger the faster they go and behave like if they were in water. I would kinda prefer no to do that since I really need a good rest.
    Also I would follow my friends advice and add some anti-aliasing to the scene since it doesn't look that good on screenshots. Luckily this isn't such a problem when actually playing around with the program so most passers-by wouldn't notice any difference.
    One thing that popped up into my mind (even though unrelated to the challenge) is to make some effects using metaballs. I know it's made using the marching cubes algorithm but I'm curious how the actual mesh would be built from that.
  • I just noticed I wrote "Tuesday" instead of "Thursday" in the title.
    Whoops!

Wednesday, December 22, 2010

Covii Challenge part 2 update log: Wednesday

Day 3-Wednesday:
Update 1(2:10):
  •  Ok, I've spent three productive hours playing around with shaders, lighting, rearranging FBOs and generally playing around with everything. Here are the progress screenies:

Boring!


Basic textures, yay! Also, my eyes kinda hurt, red+blue=bad >:(


The beginnings of bloom. AUGH MY EYES!!!


MY EYES! MY EYES! MY EYES!!!


Ok, now it's not so bad, but still looks like crap.

  • As you can see I didn't do much. But only the last one is a true bloom effect. Even though it looks like crap, and isn't as strong/diluted as I would like it to be. I'm starting to get the hang of the shaders, since I've taken a nap I'll probably work another few hours before going to sleep, but I'll take a little rest now from the project.
  • Anyway, I updated my list of things to do. I also updated the list from the previous update here's the resume of what I did today:
  1. Finally Added real bloom (even though I'm not completely happy with it)
  2. 3D model particles
  3. Working quaternion rotation lib
  4. Added lighting
  5. Played around with various effects.
  • I can't say this is bad but I also would like to have made more both today and yesterday. Optimally I would have already achieved good looking bloom, added at least one of two physical particle effects and already added cube mapping. Still I'll probably achieve at least 5 out of 6 planned features by tomorrow noon so things aren't as hopeless as it seemed to me. However tomorrow is a big day since the basic functionality should be finished and I'll start making some more advanced stuff as well as fine-tunning.
 Mini-update: Disco Ball!! Well, sort of.

This calls for some awesome music:
http://www.youtube.com/watch?v=Awzrax7UcV8
Only link since youtube won't let me embed the vid :(
Watch it anyway :D

Update 2(11:44):
  • I fell asleep around 8:00, it's now 11:44. Damn cleaning ladies and their racket. Can't sleep now, I'll try to work, but probably I'll take a nap in the afternoon.
Update 3(14:55):
  • So, after some time feeling dizzy and with a minor headache from sleep deprivation I started blaying around with various effects. The current state of things looks pretty close to the video they gave me as reference. I noticed though that in the video the presentation also used DoF shader. I made some additions on my own of course, like subtle sphere mapping to give a more glossy appearance to the cubes, I also added an overlay texture which scrolls slowly enough not to be noticeable but still gives a faint effect of movement to the scene. Most probably my final work won't look as good as the original but hey! I'm competing against someone sponsored by Toyota, with quite a few years of experience in the field and I'm not that far behind!
The scrolling effect I mentioned earlier:

  • The sphere map is costing me some nasty bright seams on the chamfered edges I used to smooth the cubes, I'm not sure what to do, I'll either have to sacrifice smooth lighting or the sphere map... unless... hm... I might use the same model but with different normals for the sphere map pass, and a different one, with smoothed normals for the light pass!
  • Edit: No, I can't do that, stupid blender and its automatic normals!
  • Edit2: HAHA! being smart as I am I decided to export the cube model two times, first time with the chamfered edges but flat on the cube sides and another one with the rounded edges. Then I'll just copy the normals from the first one to the second one and voilĂ ! I have two types of cubes :]
  • Edit3: Once again: DAMN YOU BLENDER!!! I don't want any stupid optimizations! I want the normals and vertices exactly the same always!!! AGRH. Because of this I can't have fancy sphere map.
  • Edit4: The seams are caused by the light, now I'm mad >:(
  • Edit5: Ok! Finally got rid of the nasty seams, I removed some detail from the edges and it seems to work fine now and I didn't have to sacrifice neither the sphere map nor the smooth light!
  • Also: sorry for anyone stumbling upon this blog with a 56k connection. I really do feel sorry for you.
 Update 4(23:00):
  • I ended up taking a longer rest than I wanted, it's 23:00 now and I haven't touched the program :(
    I disappointed myself quite a lot with this, especially since I haven't even slept properly yet. I hope that I can at least have a productive night, or productive morning, anything as long as I can deliver the program by tomorrow afternoon!!

Monday, December 20, 2010

Covii Challenge part 2 update log

Long story short I'll be updating this post every now and then with the development info, thoughts and screenshots.
Edit: I moved the Wednesday updates to another post since the scrolling up and down to read anything is getting ridiculous.

Day 1-Monday:
Update 1(15:32):

  • Started working on the project yesterday but only had half an hour for it because of uni projects, I added support for FBOs, it's pretty sweet, also added some basic trail effects.
  • Today I woke up at 12, that's what I get for sleeping only 4 hours yesterday, I  started working on it almost immediately. Using a bit of tutorial help I made a blur shaders, works pretty sweet, today I should also be able to add true 3D objects to my particle system (so far it only supports 2D), this also means I'll have to rewrite the existing effectors.
  • Added the blur effect to my previous FBO rendering. My first post processing shader! It looks pretty sweet and it's quite close to the final look I'm going for in terms of trails.
Here's how it looks
  •  Damn, I noticed that if you look really close you can see a little crossing on the blur, it isn't noticeable in the movement through, but I'll once I finish the project I'll have to fix that.
  • Also wasted about one and a half hour trying to make the RECTANGLE textures to work... wasted because they still didn't work even though I used someone else's code. Either FBOs don't work with NPOT textures (which I think is odd since I've read somewhere they work fine) or my graphic card doesn't support them (which would also be odd since it's on the supported extension list) 
  • When starting to work on the new particle system I realized the particle rotation need to be quaternions to avoid gimbal lock. I don't have a quaternion lib compatible with my current math lib so I'm sad because I have to make one :(
Update 2(18:33):
  • Added the quaternion support and supposedly the particle system should work with 3D objects (it still supports all the existing features so I didn't had to rewrite the 2D effectors). I'm starting to get worried I won't make it for some reason even though it's not that difficult. I've been trying to relax and stop working for a bit but having to do this project all day and then work on uni stuff all night isn't good for me. I really need this job so I can't just rest for a day or two, I want this working Wednesday midday at the latest, after that it's fine tuning and Thursday I'll probably deliver it at least to see what they want me to change. They liked the first program I made for them but if I don't get this job I'll have to go back to Poland since I don't have any money left. Yeah, I'm kind of depressed right now, it'll pass after I take a rest.
Day 2-Tuesday:
Update 1(10:21):
  • I just woke up and I'm feeling a lot better now! Yesterdays depression most probably was only because I've been working on it a lot of hours straight without doing anything else. This is something I've learned to avoid in the past since it clouds your mind and you get into an Idea loop. Normally I rest every few hours for an hour or two to watch a movie, play a game or go for a walk to completely get away from my PC and get refresh my head. The reason I didn't stop yesterday is because this challenge is letting me a bit nervous since my life depends on this and all, but I should be able to avoid making the same mistake today.
  • I made  a small list of features I want implemented until tomorrow noon. Here they are:
  1. FBOs ready to write Post Processing shaders (done)
  2. Trail Effect (done)
  3. Particle System ready for 3D with quaternion rotations (done)
  4. Bloom (almost there)
  5. Requested particle effects (quarter way there, I could use my previous effects and add 3D support for them)
  6. actual 3D modelled particles (done)
  7. background movement highlight (I'm waiting for confirmation if it's necessary, I'll probably implement it anyway if I finish ahead of schedule)
 Update 2(14:24):
  • Finally added 3D, model loading, display, lights etc.
  • I discovered there's a problem with my quaternion lib and I'll have to redo most of it (on any rotation the entire scene disappears). I'm starting to wonder if I really need quaternions or would axis-angle be enough. Still I shouldn't have that much trouble since I know I had somewhere a working quaternion lib, I just don't know where. I'll have to go into my backup folder and spend some time looking....
  • Made a screenie so you can see how it looks now:
I know the cubes don't look like much so far but at least it's something! 

Also I still have the grids I used to orient myself
  • Can you believe me I spend over an hour before I could see anything? The beginning is always the hardest part for me when I don't know where I am and my references aren't drawn, since the problem could be anywhere from badly configured viewport with farclip too close, to camera orientation, to (in this case) drawing in a FBO instead of drawing to the screen!
  • I'm gonna take a break now. I need to eat and rest, luckily I don't have any uni projects today night so I'll have a bit more time to work later. I really hope I can finish this for tomorrow noon, otherwise I would be really disappointed with myself.
  Update 3(19:39):
  • I feel sick. Headache high temp and nausea... ugh... I don't think I'll be able to finish things until tomorrow. I'll take a nap and if I feel better when I wake up then I'll continue making the program, if not I'll wait until tomorrow.
  Update 4(21:56):
  • just woke up, I feel a lot better now even though still a bit drowsy. Time to work!
  Update 5(23:17):
  • GOD. DAMN. PRECISION. ERRORS!
  • also stupid c=sin(aangle.angle*0.5); It's supposed to be cos @_@. Bot h of those have cost me over one hour of work that could have been spent making shaders or particle physics or anything at all other than rewriting my quaternion library!!

Covii Challenge part 1 and other updates

Hello!
Another blog update (yeah, I've been doing that a lot lately haven't I?).
If you've seen the video on my last post to the end you'd know I'm desperately looking for a job right now.
With extreme amount of luck I've found a job offer for the C++/OpenGL programmer!!!
The company name is CoVii from Computer Vision Interaction.
Basically they develop applications that allow interactive surfaces like an interactive wall or floor where the content responds when a person walks by.
I went to an interview there on Tuesday and apparently they liked me (either that or they pretended to like me),  but they wanted to test my skills out since my portfolio isn't that impressive as I've let the university and lack of money consume my will and time to work on my projects little by little (if I didn't have any financial trouble I would probably have made by now a graphical equivalent of Crysis).

They gave me two projects and so far I've completed one of them, it took me about 2 days. Considering I had classes during both of them and uni projects to do, I'd say I've done it pretty quickly. Maybe barely over 8 hours of coding.
Anyway, I'm rambling. Here's the video of the project in motion:
 


 


As you can see it went quite well and I'm happy with the results (and luckily so are they) but they want me to do another one. Now the next one is a bit harder not only because I have a ton of uni projects to do, as well as being chrsistmass time for which I'll go spend a day or two with my friend and his familly (with whom I've spent last years' Christmas and it was awesome), but also the seconds project covers more advanced OpenGL topics such as post processing and shader effects.
Now I've done some simple vertex and fragment shaders before, unfortunately what I've learned from them is not as much as I would need for this project (I really hope the boss isn't reading this blog right now, even though he said he's read it when he interviewed me...at least I think he's the boss, I forgot to ask him...).

What will happen in the next few days is that I'll have a couple of day long working sessions during which I'll be furiously studying the advanced OpenGL aspects. Today I've learned how to use framebuffer objects (finally! I've been meaning to learn about them for weeks but the damn uni has me doing chat programs and encryptions and stuff). FBOs are damn useful, I've managed to create trail effects without even changing any existing code nor touching shaders!
So far I've planned using cube mapping for very subtle reflections, shaders on models for stronger light effect, I'll also use shaders combined with FBOs to create post processing effects like depth of field, blur for the trails and bloom.

That's a lot of things to learn in such a full week, but considering I've done kind of similar things before, and understanding how all of this works, I'd say I have a pretty good chance of making them want me in their team!

oh... btw, I know this blog is displayed on the LudumDare through RSS, so sorry for the fellow LudumDarians that I don't make any actual game updates! I hope you're ok with life ramblings and mild programming stuff!.

I'm off!
~Mikolaj Kuta AKA Spliter

Sunday, December 5, 2010

Urban Stroll

Hello!
Just a quick blog update to show I'm not procrastinating as much as it would seem.
This time it's actually a VIDEO blog update!
sooo... yeah
Enjoy


As I mentioned I'm looking for a job so until I get hired, or at least until someone will give me a job interview I won't be able to make a tutorial. I'm also extremely busy with university projects, If I want to do anything of my own it means to stay up till 4am.

That's all for this blog post.
I'll see you next time!