Flipping trough the pages…

by | Jan 18, 2019 | Blog, Show Off, Unreal Engine 4

I am going on an adventure with my buddy Mons. We are currently in the process of creating a game. Trying to keep it limited for now since we both have other stuff to do in our life. Anyway, we talked about have as little as possible gui elements in the game and rather create a book where the player takes notes of puzzles, and story elements. The player can find a not or see something worth while and you write it in your notebook. I found the idea cool and started to create it it right away. You can see the result in the Youtube videos below.

Flipping trough the pages.

I started by creating two skeletal meshes, each one representing one side of a page, then I animated them to look like they were being turned over. They were done in 3dsmax and exported out to Unreal Engine.

You can flip trough the book by pressing left and right mouse button. Right mouse button to go back to previous page and with left mouse button you can go to the next page.

This is where things took a lot of time. I had to first figure out how to turn one page, then figure out how to tell what page you were on and what the next page was, also how to spawn new pages.

I dealt with projecting text and images onto the pages by spawning a scene 2d capture looking at a widget. Added a bunch of page textures from cgtextures.com to give the pages some variations.

Adding pages runtime

The effect turned out pretty cool and we are quite happy with the result. There are still some things I need to do like pre-spawn pages. (Every page now is currently spawned when hitting a key.) Maybe I will separate out pages and add them as child objects.

I haven’t really figured where to take this yet, but I will give an update as I go along. I wont write a tutorial on this. The cool thing about this is that the text that you write in a widget element is what is going to end up on a page, so you can change the pages in your book as you go along. Its not a texture that is changed in Photoshop, its a projection and it can be edited real time and in the editor.

In the video to the right you can also see how I add pages in realtime.