Friday, 4 March 2011
Node Groups
Epic excitement, just got a build from GraphicAll that has the new node groups in and they are amazing! Literally can't wait to actually get around to using them.
Wednesday, 23 February 2011
A Very Simple Approach to 2.5D Relighting in Blender 2.56
Inspired by the work of Francois Tarlier on 2.5D relighting using a spherical harmonic based approach (here), which was in turn inspired by a video on the same subject in Nuke (see Francois' blog for the link and details), I realised that a much simpler approach could be used to do some basic relighting. This can be done much more simply that the spherical harmonic approach which means it should be a bit faster. At the present time its a slightly difficult thing to use, mainly because node groups in blender are quite underdeveloped, something which I hope will change in the near future with the work of Lukas Toenne. Anyway to business...
The Method
So what's the basic (semi-physical) idea behind this? Well, take a look at the image on the left. Imagine the camera is at the surface normal shown as a dotted line, with light rays shown as thick black lines.
So in case:
a) The light ray is parallel to the normal we should get a large light intensity reflected.
b) The light ray is at small angle to the normal so we get a reasonably strong reflection.
c) The light ray is at a large angle to the normal so we get a weak reflection.
Now actually this image is pretty misleading because it illustrates specular reflection not diffuse reflection which is actually what we want to do. Diffuse reflection implies that any reflection scatters light in all directions so what we want to do is simply attenuate the light according to the angle between the surface normal and the light ray(which we will call δθ). We also have that when δθ = 0 there will be no attenuation and the light will fall off as δθ increases in either a positive or negative direction. This leads us to realise that we can use a vector dot product of the light ray and the normal to give us the attenuation of the light ray. The dot product is defined for 3D vectors as a∙b=a1b1+a2b2+a3b3=|a||b|cos(θ) where θ is the angle between the vectors. This gives us all the properties we need by simply taking the dot product of the normal and the light ray vector.
We also want to define the light direction in polar coordinates so we need to do a coordinate transform from polar coordinates into the Cartesian coordinates which is what the normals are specified in, in the normal pass. This is a trivially done by a well known formula. The normal pass is already produced by Blender so requires no extra calculation.
The setup produced could probably be streamlined a bit especially with the new group structure being worked on. If it could be amalgamated into one relight node that simply takes the normal pass and the variables intensity, theta, phi and colour then it could become a very useful tool that could be instanced many times in a compositing set-up. The node set-up is shown below.
Results
So here is a simple examples of the techniques in action. The first image in the render, the second is just the 2.5D relighting and the third is the two together. This is a nice example where a compositor might want to add some lighting to add definition which can easily be done with this technique in 2D. If there's interest I can post a .blend file.
Wednesday, 28 April 2010
Climbing Training
Just a quick note, for anyone following the training regime I posted about where you hang for around 7 seconds and them rest for 3 then repeat 7 times I made a little mp3 with beeps in the right places to practise to, quite effective, if people want it I'm sure I can find a way to post it.
Dolichostenomelia
Is a condition in which the limbs are unusually long, wild stuff eh! I know nothing about it except that... but a cool word I think.
Tuesday, 27 April 2010
Revision
I'm back!
Did you miss me?
No of course not. SO I'm revising for what is basically my finals - at least that's how I'm thinking about it. Its comprehensives, exams on all the core of the course form the first 3 years. They focus on getting us to "think", putting different bits of physics together in each question. It's a right pain...
Wednesday, 6 May 2009
Oh Bugger
So I broke my heel.
Damn.
No climbing for a while then. 4-6 weeks to walking and then god knows how long until I can land comfortably from the top if a boulder... So since I've got loads of spare time sitting in bed for a week, might as well write some blog! Since I've been immobile and unable to do anything I have OBVIOUSLY been thinking about extreme sports. The usual climbing and the idea of skydiving, wingsuits and BASE. My logic is that I always seem to get injured in everyday life and not while doing sports where I'm actually focused on the danger. So its like 100 skydives+ before you're alowed to even think about BASE jumping so I'd better get on with that. IC Parachute and Skydive club here I come.
Once my heels healed I mean...
Damn.
No climbing for a while then. 4-6 weeks to walking and then god knows how long until I can land comfortably from the top if a boulder... So since I've got loads of spare time sitting in bed for a week, might as well write some blog! Since I've been immobile and unable to do anything I have OBVIOUSLY been thinking about extreme sports. The usual climbing and the idea of skydiving, wingsuits and BASE. My logic is that I always seem to get injured in everyday life and not while doing sports where I'm actually focused on the danger. So its like 100 skydives+ before you're alowed to even think about BASE jumping so I'd better get on with that. IC Parachute and Skydive club here I come.
Once my heels healed I mean...
Sunday, 26 April 2009
Training
So I attempted my first ever climbing training session on Thursday. It was quite interesting. Kind of thinking along the lines of this, which is pretty intense I did 10 sets of repeaters on top joint pockets. Some were with French pull ups some not. It felt pretty good nice climbing style pump. This week is going to be climbing oriented; I think I might try for everyday and see if I can do it. Because I'm still pretty weak I reckon 1 intense training session a week is probably safe for now.
Subscribe to:
Posts (Atom)