Just like you read it, Real Time Shadows in Blender’s 3D View *and* in Blender’s Game Engine!

It uses Shadow Buffers, so is only available for Spot lights now, and it works with the same settings as for rendering, like OnlyShadow (very useful!), or ClipStart, ClipEnd, SpotSize, falloff, Bias, etc. They are not filtered (yet!, so don’t complain : ) so no Soft shadows for now.

I don’t like to take attention from other’s blogposts but this feature totally deserves it.

Made a quick video showing how it looks right now in both our game demo from Chris’s blogpost and in 3D View, is speeded up a little bit also for not to bore you too much.

This feature was made by our code hero Brecht and is still under development, so go compile your apricot branch, test, and share your happiness here with a nice comment.
That’s all folks! 😀

Watch in crappy quality at YouTube
Download/Watch the  AVI Video

94 Responses to “Real Time Shadows in Blender!”
  1. by the way, the game looks a little bit different in this video because i focused on showing shadows so didn’t enabled other stuffs, and the version of the file is a bit older than in Chris’s post.

  2. very nice.

  3. OK, so it looks like CS will be dropped in favour of BGE :) Can’t say that I’d complain about that :)

  4. Great! It’s more than anyone could have expected in such a short time!!!

    Though, I think that real-time Shadows being available only for spotlights isn’t an issue, but an advantage. After all, in a real game, making everything and anything cast a realistic shadow wastes a lot of resources that can be spent in many other things.

    As said, it was more than I could have imagined.

    Hey! Nice to see you again, venomgfx… never got to see you since the NicoDigital days!

  5. wow impressive
    very handy

  6. very nice work. The developments and the pace are MUCH appreciated.

  7. Muy Buenooo, terminen de una vez que quiero jugarrrr

    saludos a todos

  8. Fantastic work!

    Seeing as a lot of GE wishes are coming true, here are a few more :)

    – Allow existing particle system to be used in GE

    – Get the Web Player up and running again ( using Apricot as a way to get a lot of initial installs )

    Great work dudes!

  9. jojjo bueniiiiisimo, great.
    write code like no other

  10. Just remembered one other feature that would be great…

    – get Verse fixed, to the point where a team could collaboratively work on one of the Apricot levels ( eg 1 building environment, 1 texturing, 1 placing gameplay elements, 1 testing etc )


  11. Go 3ds Max, go! We will eat you alive. xD

  12. davidOmatic says:

    wow those shadows are really good. But are you going to develop the entire game in BGE?
    Congratulations to de devs 😀 they deserve more apricot cakes.

  13. Only one word. Great!

  14. :O

  15. Coppertop says:

    “OK, so it looks like CS will be dropped in favour of BGE :) Can’t say that I’d complain about that”

    Who said it’ll be dropped? The way i see it they want to upgrade both which is good. OpenSource is about choice and collaboration, not necessarily competition. I don’t think BGE can ever get as powerful as CS+CEL is, as well as i don’t see CS+CEL getting as easy to use as BGE seems to be (from what i’ve heard, i’ve never used it tho) so choosing between them is all about what u want to do and how. Besides, Apricot guys have said that also other engines (like The Biggest CS Competition ™, namely OGRE) can benefit from the changes made to Blender during this project. And CrystalSpace and CEL have already benefited from it. Don’t know why u react like “i want CS to be dropped”. They make TWO engines get better and that’s totally cool for OpenSource, developers and gamers imho. At least that’s the way i see it 😉

  16. BlenderLovingSquirrel says:

    So good I could eat it!

  17. I am still having problems with normal maps. I think I’m not using them in the right way.

  18. BlenderLovingSquirrel says:

    @Coppertop – the notion of the world’s most awesome 3d app and the world’s most awesome game engine being one and the same is way more attractive than the current state of affairs of having to export to all these independant engines with their quirks and such, such as Ogre’s refusal to be an actual game engine and instead a rendering engine with all the little pieces scattered all over the open source… in that case blender GE wouldn’t be competeting with CS or Ogre as neither of those two would actually be playing in the same playing field.

    CS = game engine
    Ogre = rendering engine
    Blender GE = All in one Awesomenes like ever before

    but I’m a blenderhead u see so I’m probably biased xD

  19. squareline says:

    fresh linux build (glsl shadow buffer)

  20. quibblingchord says:

    amazing work can’t wait to see more

  21. Realtime shadows in the GE?!

    Do you mind if I form a new religion around you Brecht?

    Pope Blendiac of the holy Brechtian Church

  22. Cool!

  23. Coppertop: While I agree that of course improving 2 pieces of software is better than improving one, I don’t understand why the Apricot project – which is VERY tight on time and budget for a project of its size anyway – is doing this double effort.
    As someone else said, tight integration is always a plus and thus if *I* were the project manager, I’d go for BGE exclusively, as I’m sure a better end result can be achieved with less resources this way. (I in no way intend to offend CS)

  24. Oh mon dieu!,
    Cela fait tant d’années que j’espérais des ombres portées en temps réel dans blender.

    Chaque fois que je travaillait sur des niveaux, des personnages,
    des machines, des fleurs, je fantasmais en silence dans la douleur et
    la frustration à ce manque essentiel de la géométrie et sa complémentarité
    par la sacro-sainte source de lumière et sa vertueuse calligraphie,
    qui fait danser ses flammes sombres dessinant des ombres chinoises
    Comme le reflet de l’âme de chaque objets adoubé par l’ultime

    (Bon, les gars, vous vous doutez bien que je vais prendre une aspirine…)

    SUPER! bonne continuation bande d’abricots! ON VOUS AIME!

    – – – – – – –

    Brecht our god, and you Chris’s our Jésu!

    Oh my God!
    This makes so many years that I hoped the shadows in real time in blender.

    Whenever I was working on levels, characters,
    machinery, flowers, I fantasmais silently in pain and
    frustration at the lack of essential geometry and its complementarity
    by the sacrosanct source of light and its virtuous calligraphy,
    which makes its dancing flames drawing dark shadows
    As a reflection of the soul of each object with the ultimate adoubé

    (Okay, guys, you doubt that I’ll take an aspirin …)

    SUPER! bonne continuation band apricots! AIME ON YOU!

  25. smokebox46and2 says:

    OMG! you devs and artists are insanely incredible =D
    Infinite thanks to you all.

  26. Deloince: Did you make that up or was that from some famous poet? 😉

  27. @Alexander Ewering – because the main idea was to use blender with something else than BGE, an external game engine. It’s like saying to developers “hey look you can make games using blender”. CS is opensource, just like Ogre, but if there were no license issues it could be unreal engine, source or else.

  28. Nice feature set is shaping for 2.5
    This is a nice comment :)

  29. Alexander Ewering: Sous le joug de la fougue, ce que j’espérai le plus et qui
    me faisait un enfer ma vie, ma fait écrire ces quelques lignes du poste 26 dans
    l’engouement d’une l’absolu libération.

    A présent, je peu reposer en pais sous une tonne de rose en dalle

    – – – – –

    Alexander Ewering: Under the yoke of passion, what j’espérai most and which
    I was a hell my life, because my writing these few lines of the post 26 in
    the enthusiasm of the absolute liberation.

    Now, I just rest in pais in a ton of pink Slab
    ((ton of pink Slab) only works in English)

  30. @Coppertop: In the last 2 weeks, I’ve been testing several open and closed source game engines. And from my experience, CrystalSpace -by itself- it’s mostly a rendering engine. It needs CEL to have “interactivity”, which enables you to make games. However, CEL’s main features can be “emulated” at different degrees by BGE, and right now, Blender’s graphic scripting has more capabilities than CEL!

    Anyways, from my viewpoint, the Apricot development team is using CrystalSpace as some sort of “milestone”, that is, as a reference point on graphical features that will eventually be integrated into BGE.

  31. Miles excuse
    Now, I just rest in pais in a ton of pink Slab
    ((ton of pink Slab) only works in french)

  32. Jean-Pierre: I understand, and while I also often have very poetic feelings about such stuff, I mostly don’t care to express them in such a detailed manner :)

    Anyway, you’re right about the significance of having real-time shadows in the 3d view (and of course engine) – I’m also amazed by this development.

    If only all of the developments and decisions in Blender Foundation were this useful…

  33. Et pour fêter dignement cela, une bonne recette!

    Tarte aux abricots à la crème abricot:

    Préparation : 60 mn
    Cuisson : 45 mn
    Repos : 30 mn
    Temps total : 135 mn

    Pour 8 personnes :
    # 750 g d’abricots bien mûr
    # 1 pâte feuilletée maison ou prête à cuire
    # 1/2 litre de nectar d’abricot
    # 6 jaunes d’oeufs
    # 100 g de sucre cristal
    # 60 g de farine
    # 50 g d’Apricot Brandy”
    # 100 g de confiture d’abricot
    # sucre glace

    1) Faire une crème pâtissière avec le nectar d’abricot, les
    jaunes d’oeufs, le sucre, la farine – Bouillir 3 minutes environ –
    Laisser tiédir puis ajouter l’alcool.

    2) Etaler la pâte feuilletée dans un cercle préalablement
    beurr̩ РGarnir le fond de tarte de cr̬me p̢tissi̬re abricot.

    3) Laver et d̩noyauter les abricots Рles enrober de sucre

    4) Ranger les abricots sur la crème pâtissière.
    Entreposer la tarte au moins 30 minutes au réfrigérateur pour
    qu’elle se détende – (si les abricots rendent un peu d’eau, cela
    n’a pas une grande importance – L’eau s’évaporera à la

    5) Préchauffer le four à 210°C (thermostat 7 à 8).
    Couper les bords de la tarte et cuire 45 minutes – A la sortie du
    four, préparer le nappage : Bouillir la confiture d’abricot, la
    passer à la passoire et l’étendre au pinceau sur la tarte –
    Laisser refroidir.
    Au moment de vous régaler, saupoudrer de sucre glace.

    – – – – – – – – –

    And to celebrate this, a good recipe!

    Tart apricots the apricot cream:

    Preparation time: 60 minutes
    Cooking time: 45 minutes
    Rest: 30 minutes
    Total time: 135 minutes

    For 8 persons:
    # 750 g of ripe apricots
    # 1 puff pastry home or ready to cook
    # 1 / 2 litre of apricot nectar
    # 6 egg yolks
    # 100 grams of crystal sugar
    # 60 g flour
    # 50 g of “Apricot Brandy”
    # 100 grams of apricot jam
    # Icing sugar

    1) Make a pastry cream with apricot nectar,
    egg yolks, sugar, flour – boil 3 minutes —
    Let cool, then add alcohol.

    2) Spread the puff pastry into a circle before
    buttered – Garnish the bottom of tart pastry cream apricot.

    3) Wash and d̩noyauter apricots Рsugar coat

    4) Ranger apricots on the pastry cream.
    Store the cake at least 30 minutes in the refrigerator for
    it will relax – (if apricots make a little water, celà
    is not very important – the water will evaporate

    5) Preheat oven to 210 ° C (thermostat 7 to 8).
    Cut the edges of the pie and bake 45 minutes – At the exit
    oven, prepare the topping: Boiling apricot jam,
    go to the colander and extend it to brush on the cake —
    When you eat, sprinkle with powdered sugar.

  34. Here (Spain) is summer, so I really appreciate these shadows to keep me fresh 😆
    Thanks guys!! 😉

  35. Hi, this looks great! ^^
    but I don’t understand, which engine the game will run on eventually ? BGE or CS?

  36. This has to be a dream… Real-time shadows? A commercial-quality BGE? Caronte, who seemed to answer questions and practice in Blender 24/7 in the first Blender spanish community?

  37. Cela dit je pense que les ombres douces ne sont pas indispensable
    immédiatement, mais par contre il serait intéressant de développer
    un système d’ombrage dynamique pour les lamps ou le sun.
    Il y aurait il des ombres colorés par l’influence de lumières

    – – – – – – –

    But I think the soft shadows are not indispensable
    immediately, but against it would be interesting to develop
    a system of dynamic shading for lamps or the sun.
    There would have it colored shadows on the influence of lights

  38. graphiccity says:

    Speechless !!! Is there any way around the intel video drivers on linux sistems? OsX drivers have support for GLSL and my big wish is to see this on other OSSes as well.
    I think that intel GLSL support will bring allot of new happy blender ussers.
    Go devs!!!Now it’s about time that we see all this new feature put to a good use by blender ussers.

  39. The development of last days is unbelievable. I thought that coders will just quietly re-code for Blender 2.50 during summer. But in fact tons of shiny new stuff come every other day.

  40. That’s great 😉
    Thank you apricot team.


  41. Thank you so much!

  42. Est ce que les ombres vont elles influencer les transparences alpha d’une
    texture et restituer par projection son dessin sur l’environnement?

    – – – – – – –

    Are the shadows they will influence the transparency of an alpha
    texture and return its projection by drawing on the environment?

  43. Realtime shadows thats amazing thanks Brecht you the best. and to the rest of the team this game looks amazing. keep up the good work. you guys rock. :)

  44. wow! this will be so cool for rendering playblasts and previews. :)

    will there also be point light support? with rendering the depth buffers into a cube map?

    will there be sunlight support with something like PSSM?

    will it be possible to disable shadow casting of the gui lines?

    wow, this is so amazing. i don’t even know any other 3d application which does such shadows in the viewports.

    having a game engine like this directly in the 3d application is totally awesome too of course.

  45. this is insanely cool!

  46. so far i always have been looking forward to the ogre3d and CS engine plugins for blender.

    but now with the new drive the blender internal engine has i don’t care that much for the other engine plugins anymore. i hope the blender engine will keep thriving. with an improved logic node system and an improved python API it could be so awesome!

    the web player would be cool too but i don’t know how feasible it would be to sandbox its scripting side? security is very important for web plugins.

  47. Francisco Ortiz says:

    Thank you! Thank you! Thank you!


    Every Architect in the world MUST remember and celebrate this date.

    Honor and health to Brecht! The great!

    ClapClapClapClap (aplause)

  48. horace: 3DS Max 2009 for sure does.

  49. @BlenderLovingSquirrel post 20

    I believe Crystal Space claims to be a Rendering Engine too, so does Irrlicht.

  50. chuzzy blue says:

    yes yes ye amazing. Things ive thought ill never see appearing in less than a couple weeks?!?! simply amazing. Does brect hve a paypal? ive already bought the dvd

  51. chuzzy blue, buy 10 more dvds to honor brecht!

  52. chuzzy blue, you can always have information in how to help, or click in the nice paypal icon below ED ad. :)

  53. –<>–

    Do you guys know you are pure-awesome?

    1.How many lines of code have you written?
    2.How many more lines are you planning on writing?

    real time shadows were my (one of my)dream(s)!

    keep up the good work

  54. Gerard Braad says:

    Will that Piranha also be in the game? Good job on the shadows, since that bothered me a little from your last published clip. The motion was fluent, but the shadows were so June 2008 :P.

  55. hey Gerard, yes the piranha will be in the game, already modeled and textured it, also made a couple of idle animations. hope to show it in-game soon.

  56. LetterRip says:


    the project was originally concieved as improving both Blender and CS, and proving Blenders ability to work well as a complete pipeline, not just a standalone tool.

    A number of CS supporters prepaid based on that premise, and thus the Apricot team has a responsibility to fulfill those terms.

    Secondly, there is likely already a lot of the more advanced logic done in CEL already, so porting it back into Blender might result in additional time.

    Thirdly, while it is a group effort, the dev group on the Blender side and the dev group on the CS side are essentially seperate entities. So the resources being used on the CS development can’t really be reallocated to Blender GE development and vice versa.


  57. I’m not really into games but I will pipe up to congratulate and thank the team and esp Brecht for this awesome development!
    (shouldnt there be a Blenderhead of the year award? with Brecht the honourary first recipient)

  58. There is only one thing I can say: AT LAST !!! :)

  59. Marvelous! GE is becoming powerful!

  60. The main difference between Apricot and a traditional business-driven project is that we don’t have to desperately try to achieve targets, like forced by publishers or defined by marketing/sales departments.

    When we, after more than 4 months, find out that some of the original targets cannot be met reasonably, we should acknowledge that. The main target – deliver an industrial quality game demo using the Blender-Python-CS integration – is just not feasible within the time limits.
    To prevent our project to fail, we better find ways to spend the final 1.5 month on targets we do know can be met still.

    So: the CS team here will complete the project based on CS engine development that has been achieved already, which is still substantial and very relevant for CS.
    In parallel to that, the Blender team will do the same in the Blender engine.

    So, we’ll end up with a couple of very cool demo levels of a game designed in and running in Blender, which is fully exported to something similar running in an external game engine. To me it sounds still quite close to our original targets… :)


  61. Joy to the world!!

  62. Ton:

    1) Il y aurait il donc à terme une fusion logiciel entre blender ge et cs,
    permettant l’usage spécifique dans un seul logiciel, ou resterait il un plugin
    d’exportation entre deux game engine bien distinct?

    2) Certaine rumeur ou simple inquiétudes mentionne la disparition des
    bricks logiques en préférence à l’écriture de code python, qu’en est il

    (je suis français et ne comprend pas toutes les traduction de google, merci)

    – – – – – – –


    1) There would therefore ultimately a merger between software blender ge and cs,
    for the specific use a single program, or it would remain a plugin
    export between two quite separate game engine?

    2) Some rumour or simple mention concerns the disappearance of
    bricks logic rather than writing code python, that he is

    (I am french and does not include all the translation of google, thank you)

  63. Awesome!!!!! 😀

    Mentioned by some other people:
    Getting a web plugin for blender would indeed be very nice. but it would probably be a lot of work too.

    A friend of mine did this kind of programming for work using the quest3d engine. http://quest3d.com

    The down side is that this works using ActiveX and only on windows/internet explorer.

    The things he build were quite cool though. bars, dancing, simulations for new apartments.

    If we were ever in the future to have a donated attempt to make this work ( win + mac + linux ) then you can count me in for paid support. ( perhaps the goal should be something like making a blender web game, so that people will feel that they get something for there donation )

    I don’t know if it doable tough. I’ve searched for a long time but there really isn’t something like a cross platform let alone open source alternative for this kind of work. It’s an entirely new terrain. And no one has yet been able to claim it.

    A well, just rambling,

    Great work guys!

  64. JP:

    – no merger of Blender and CS was ever scheduled. What we did keep as option was to make the Blender GE a plugin, to allow other engines to plugin easier.

    – logic bricks are even getting improved! A commit today shows a very cool result of analyzing logic with Benoit, the awesome game engine coder! We now have state-based logic.

    – please omit the french part of posts?

  65. Ton

    Sorry for this bad habit that I kept writing threads a
    blender artist, seeing that the translation of google translator
    did not allow a perfect reading for french which retraduisait
    again the texts in their language.

    In the future I’ll post in English

  66. Urm Mark, you’re aware of the fact that a Blender web plugin has always existed, and still works with some effort in recent browsers, both Mozilla and IE, yes?

  67. Are there any news about Crystalspace development? I think BGE does fine but a vid of CS in action would be interesting :-)

  68. Wow..! just take a moment to come here and read the great news and of course, grab my apricot build to make my own test 😉

    Nice! :)

  69. Uploaded the video to youtube (warning, crappy quality):

    some people reported problems with Vimeo.

    also you can always download the video from:

  70. Great Job!

    I have made another little test, to simulate a point Light:


    greetings from Germany!

  71. Coooolll!!! Go BGE!

  72. gnarfomat says:

    Looks great so far, but what’s new on the CS side of things? :)

  73. @moerdn

    Nice vid and really nice environment.

    Now, quit playing and develop this environment into the next Elder Scrolls RPG.
    I like something with a steampunk kind of feel 😉

  74. O, and while your at it, don’t forget a bazooka.

  75. SamCameron says:

    PLEASE !!! DON’T FORGET THE OPTIMIZATION !! now we have nice features but remimber… the most important is to be optimized or we wouldn’t play any game without an high end computer meanwhile the competitors use less resources to accomplished similar results.

  76. SamCameron, there will be options for enabling/disabling eyecandy, however a lot of optimization needs to (and will) be done.

  77. Tyrone_man says:

    Honestly, at this rate, the bge will be recoded to do more than the main render engine and faster too! (I wish)

    But, yea, now if we could only get the web player to work again (that thing was mint), then hordes of web developers would stream to it. I mean, a few of us up here in frostland were making an architectural visualisation in the bge (for school), and I was going to publish it on the school site, but the bge player went out of style about that time. Such a shame, it’s still sitting in my misc folder.

    Anyway, High five everyone!

  78. hello, it’s very good !

    Could you tell me until where could go the display with glsl (not necessarily for GE, but in general)? For example would it be possible to see raymirror, AO, particles? (could it be develloped)

    sorry my bad english

  79. Is there a way to see the intensity of light emitted by AO in the viewport, even if we did not see the shadows generated by it?
    Otherwise, when the AO is activated, the render is much clearer.

    sorry my bad english

  80. @Alexander

    I know the plugin exists,
    But because there is no maintenance it might very well stop working in the next great browser war. Its not something i would willingly walk in too.

    Another problem is that you can’t really ask people watching a site to spend some time getting the plugin to work. This doesn’t even work in the geek world :p

    The fact that you have to install a new plugin is already an obstacle in itself. so it really shouldn’t be more then a few clicks. otherwise nobody will view it.

    I did try the plugin, but it’s a bit to risky for my taste. other people might disagree though..

  81. Tyrone_man says:

    Well, the plugin worked fine with blender 2.2x and 2.3x, after that it was very partial and had a tendency to be wild. I mean, common, what’s the bge with no bullet? We’re talking ancient here.

  82. It’s amazing to see how Blender as a OpenSource 3D suite grows and grows to catch up or even to leave other application behind :)

    This is a really handy function. But it’s hard to understand why only 3dsmax (and now blender) had added this function to it’s own yet.. since videogames do all kind of real time shadowing for years.

  83. Mark Hannessen: Well, someone could port Blenderplayer to Flash. It might get a bit slow though 😉

  84. Hi,

    Can’t get to work. I’m using the Win version of blender posted on Graphicall in 22-06-2008.

    My scene is a ground plane and a cube lit by a spotlight with buffer shadows. It render with the shadow, but it doesn’t show on the viewport. All the objects have materials and textures, and I’ve tried the textured, shaded and solid views.

    Am I missing something?

  85. Miguel, did you remember to turn on GLSL from the game menu?

  86. do you have to be in game mode for it to work?
    I’ve tried it, but Blender hanged. Maybe my ATI 9700 Raedon doesnt suport it… can anyone confirm this?

  87. veary gooooooood

  88. Wa… But… I… How? How can I download? And Run? Is it free? Is it a plugin? Does it work on a Mac?

  89. Hello? Is anyone their?

  90. So… I downloaded The latest apricot Build, Apricot OS X 10.4+ [15942], and found the “Enable GLSL Materials” I turned it on, and used a spotlight to try and cast the shadow of a cube, on a plane. Why does it not work?

  91. And Could anyone please tell me how to export a rendered animation to a movie file?

  92. Hamsterhill says:

    hwey is this in the latest verion or is it still yet to be released?