Blob Shadow

img
Nov
10

In the game there is a directional light for simulating sun light, this is also the light casting the shadows on ground. It happens that when the car runs onto shaded ground, its own shadow become invisible, so, the car seems unattached from the floor.

For this reason we needed to add a sort of ambient occlusion under the car’s body.

A first attempt was by using a second directional light set perfectly perpendicular to the ground. This trick was working on most situation but gave strange artifacts under trees foliage, arcs, bridges and when the car was jumping. Other negative side effect was the computation cost of such solution.

For the above reasons we switched to blob shadow for faking AO under the car. We made a first try by using light projector but it was an unlucky try: light projector is broken or it expects some kind of image we are not aware of. At the end we back to the old glorious mapped poligon. A first intersect_ray, cast fom the center of the car, returns a point used for set the position where to place the plane under the car, then, a second intersect_ray, casted a bit ahead, returns a second point for aligning the blob with the ground. the code used for the positioning/aligning of the the shadow looks like this:

blob.look_at_from_pos(point1.position, point2.position, point1.normal)

blobshadow

  • img
    google adwords api reports Reply
    Feb 29, 2016 @ 20:32 pm

    Wow, that’s what I was looking for!
    thanks for this web page.

  • img
    google plus app for android Reply
    Feb 29, 2016 @ 20:33 pm

    Hello there, You’ve done an excellent job.
    I’ll certainly digg it and personally suggest to my friends.

  • img
    paintings Reply
    Apr 5, 2016 @ 5:47 am

    Do you mind if I quote a few of your posts as long as I provide credit and sources back to your site?

    My blog site is in the very same area of interest as
    yours and my visitors would certainly benefit from some of the
    information you present here. Please let me know if this alright with you.
    Thanks a lot!

  • img
    mp3juice Reply
    Jun 13, 2016 @ 9:43 am

    Great post. I was checking constantly this blog and I’m impressed!
    Extremely helpful info specially the last part 🙂 I care for such information a lot.
    I was looking for this certain information for
    a very long time. Thank you and best of luck.

  • img
    JoeAMccort Reply
    Sep 25, 2016 @ 13:31 pm

    I like the valuable information you supply within your articles.
    I am going to bookmark your weblog and check out once more below regularly.
    I’m somewhat sure I’ll learn many new stuff proper here!
    Best of luck for the following!

  • img
    MelonyZKelln Reply
    Sep 30, 2016 @ 12:39 pm

    Hi everyone, it’s my first visit at this website,
    and paragraph is actually fruitful for me, keep
    up posting these articles.

  • img
    JeanYKetring Reply
    Oct 2, 2016 @ 10:22 am

    I’m amazed, I actually have to admit. Rarely will i encounter your blog that’s both educative and interesting, and without a doubt, you’ve hit the nail around the
    head. The issue is something not enough individuals are speaking intelligently
    about. Now i’m very happy that we came across this during my look
    for something in regards to this.

  • img
    ChangELamora Reply
    Oct 6, 2016 @ 2:54 am

    Valuable info. Lucky me I found your web site unintentionally, and I am stunned why this twist
    of fate didn’t happened earlier! I bookmarked it.

  • img
    SoniaAYork Reply
    Oct 12, 2016 @ 13:02 pm

    Hey There. I found your weblog using msn. This
    is certainly an extremely well written article. I am going to be certain to bookmark it and come back to learn extra of your own useful information. Thanks for
    that post. I will certainly comeback.

  • img
    Bruno Forlivio Reply
    Nov 10, 2016 @ 8:52 am

    Hey, I think your site might be having browser compatibility issues. When I look at your blog site in Ie, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, superb blog!

  • img
    LuigiBDeever Reply
    Nov 15, 2016 @ 8:56 am

    Simply desire to say your article is as astonishing. The clearness to your submit
    is just great and i can suppose you are an expert in this subject.
    Well along with your permission let me to grasp your RSS feed to keep updated with imminent
    post. Thanks one million and please continue the rewarding work.

Popular posts

  • No popular posts!

Follow us!

"@nunodonato @reduzio often a single color is not enough for make to gracefully disappear tall objects like building… https://t.co/4Ao6ZrZGE7"
"@reduzio what about an option for blending objects affected by the fog with the skybox/panorama? It would be useful for outdoor scenes"
"good news from Godot team https://t.co/2OFCL74xRd"
Skip to toolbar