Blog! Team! Forum! About Apricot! Press! Gallery! Development! Yo Frankie! Apricot Open Game Project mee!
Jun 21

Real Time Shadows in Blender!

icon1 venomgfx | icon2 Development, Media Gallery, Screenshots | icon4 06 21st, 2008

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

  1. chris on

    chuzzy blue, buy 10 more dvds to honor brecht!

  2. venomgfx on

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

  3. RH2 on


    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

  4. Gerard Braad on

    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.

  5. venomgfx on

    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.

  6. LetterRip on


    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.


  7. Big fan on

    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)

  8. Krzysiek on

    There is only one thing I can say: AT LAST !!! 🙂

  9. Sergi on

    Marvelous! GE is becoming powerful!

  10. ton on

    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… 🙂


  11. madman on

    Awesome 😛
    A little test:

  12. hmike on

    Joy to the world!!

  13. Deloince Jean-Pierre on


    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)

  14. Mark Hannessen on

    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.

    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!

  15. ton on


    – 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?

  16. Deloince Jean-Pierre on


    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

  17. Alexander Ewering on

    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?

  18. droinx on

    Are there any news about Crystalspace development? I think BGE does fine but a vid of CS in action would be interesting 🙂

  19. Mataii on

    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! 🙂

  20. Bmud on

  21. venomgfx on

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

    some people reported problems with Vimeo.

    also you can always download the video from:

  22. moerdn on

    Great Job!

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

    greetings from Germany!

  23. paan on

    Coooolll!!! Go BGE!

  24. gnarfomat on

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

  25. MrE on


    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 😉

  26. MrE on

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

  27. SamCameron on

    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.

  28. venomgfx on

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

  29. Tyrone_man on

    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!

  30. 3a on

    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

  31. 3a on

    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

  32. Mark Hannessen on


    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..

  33. Tyrone_man on

    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.

  34. Tim on

    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.

  35. Alexander Ewering on

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

  36. Miguel on


    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?

  37. blengine on

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

  38. Miguel on

    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?

  39. uae on

    veary gooooooood

  40. Killian on

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

  41. Killian on

    Hello? Is anyone their?

  42. Killian on

    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?

  43. Killian on

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

  44. Hamsterhill on

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