The Blog

About Me


Marius Oberholster Hey! I'm having an incredible learning experience, not only learning how Blender works (yes, still learning), but also about Open-Source and the incredible software available. Stick around!

Keep your shadow on

Posted by Marius Oberholster on Tuesday, December 17, 2013 Under: Quick Blog Tutorial
Good day all!

Coming at you with another QBT today and yes, we're sticking to the BGE theme! Hey, soon we may have all the stuff set-up to make an entire game, front to back! haha

Now, I know a lot of you are very familiar with texture baking and have learned that you can even bake other things, like shadows and ambient occlusion, but this is not always practical. For example, if your game requires real-time shadows, then you need a sun lamp with shadows enabled, in order to have them.

This presents another problem. In the game engine, the shadows are limited, not unlimited. In other words, the lamp's shadows only stretch so far. That means your shadow has to travel with you and by association, your sun.

Recently, I saw a stunning car game made in BGE and I saw that no matter where he drove, the shadow stayed and so I asked and they were kind enough to tell me how to do this; vertex parenting. Vertex parenting allows an object to follow another, without affecting it's rotation. Thus, the sun follows, but the sun points the same way, so your shadows travel with you. Bear in mind that it is still only a small area that the sun casts shadow on.

Here's the video he posted:


In order to vertex parent in this case, you select you sun, then your character (so both are selected, but the focus is on your character), then press Tab, to enter edit mode. Select a vertex, and press Ctrl+P to finish the parent and ta-da! Your sun moves with you!
Note: For rotation not to occur, it has to be a single vertex only.


Credits:
How to parent to a vertex and how it works - Blender wiki
The solution to use vertex parenting - Roylen John and Juninho Silva - FB group post
Thank you everyone!

Thank YOU for enabling me to share this post with people and to enable people to use this technique too!!

In : Quick Blog Tutorial 


Tags: jesus  vertex  blender  object  sun  shadow  follow  parenting  vertex parenting 
Social
(+27) 073 104 2834   |   marius.oberholster@gmail.com   |   Contact

Make a free website with Yola