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.

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 

"For I testify unto every man that heareth the words of the prophecy of this book, If any man shall add unto these things, God shall add unto him the plagues that are written in this book:
And if any man shall take away from the words of the book of this prophecy, God shall take away his part out of the book of life, and out of the holy city, and from the things which are written in this book.
He which testifieth these things saith, Surely I come quickly. Amen. Even so, come, Lord Jesus.
The grace of our Lord Jesus Christ be with you all. Amen."
Revelation 22:18-21

"Add thou not unto his words, lest he reprove thee, and thou be found a liar."
Proverbs 30:6

King James Version, Public Domain

Ultimate Glory

I give glory to, acknowledge and remember God for this website. He enabled me to do all this and this website belongs to Him. Thank You!


Make a free website with Yola