Mega Book - Easily create working 3D books Comics


Introduction
If you have ever needed an animated book in your game then MegaBook is what you need, it is a complete procedural book builder and animator with an advanced page turning animation system and content builder.

MegaBook allows you to quickly and easily create multiple page books with page turning animation in Unity. You can have any number of pages and have the system generate the page meshes for you or you can provide your own custom page meshes or objects and the system will animate those and create a complete book for you. You have complete control over the textures used for the pages and there are options to allow you to have background textures and content textures merged with a mask option. You also have complete control over the generated page meshes with options to control the size of the page and how many vertices are used to build it. Also included is a system to swap pages out for ones with holes in so for big books overdraw is greatly reduced.

The page turning animation can also be controlled so you can define how much a page turns, where it starts to turn etc, MegaBook has dozens of parametes you can tweak to change how the book works all of which can be changed in Editor mode or at runtime if you need. You can also attach objects to each page so it is easy to add GUI elements or even 3d objects to each page and the book system will manage those for you, turning them with the page and disabling them when they cant be seen.

There is an API of methods you can use to easily control the book such as NextPage, PrevPage, SetPage also methods to replace content textures per page or even download new textures direct to a page from the internet or from files.

Features
Some of the features of MegaBook

  • Fully Animated 3D pages

  • Control where and how pages turn

  • Natural Page turning with extensive controls

  • Create a book in a couple of clicks

  • Any number of pages

  • Easy control of book thickness

  • Masked texture content

  • Procedural page meshes

  • Option to use custom page meshes

  • API for controlling your book

  • Attach system to stick objects to pages such as NGUI objects

  • Unity GUI objects can also be attached to pages

  • Add mesh content to pages

  • And more

Masked Textures
One of the features of the content system is the ability to apply your content textures over a background image with the option for using a mask, this difference can be seen in the two images below

Get it now

You can out more about the features of the system by visiting our MegaBook Website and below is a video showing some of the features of the system. The system is available now on our Website or on the AssetStore The early adopter price is $40.

Video
This video shows some of the features of the book system in action.

Adding complex mesh data content

2 Likes

At last you could do the perfect 3D book !!! Wonderful !!!
6R

Looks fantastic SpookyCat. Just to check does it work OK with Unity Free?

Yes works just fine with Unity Free.

I have started to play with your Megabook. Great asset !

  • When I modify some values Unity becomes very very slow.

  • If I understand well, the objects attached to the book are not movable anymore !?! They become “inactive” and are visible only where we positioned them through the inspector at start. I have tried with :

  • a 3D cube : Unsueful to add a simple transform.rotate script because it doesn’t work. We can rotate it with an animation !
  • a 2D animated sprite : I can see the animation on the page (great) but the spite is fixed at the predefned position !
  • Generally you include all we can see in your videos…
    Where is this ? (I don’t know the name in english !?!)

1635126--100937--$megabook.jpg

6R

Thanks for the purchase :slight_smile: I will look at the slowdown, not seeing it here, as a matter of interest how many pages do you have in your book as the system will rebuild the pages depending on which settings you change. You can move attached objects by changing their pos values but the best thing to do is just attach an empty game object and have you animated objects as a child of that, then they are free to do what ever you need and the empty game object just becomes the anchor to the page.
The object you are pointing at is the spine of the book, it is just a simple mesh with a bend modifier on it from MegaFiers, as MegaFiers isnt part of the book system it didnt get included.

If you could submit a support ticket at the website with some steps so I can see if I can recreate the slow down issue that would be great. Also which version of Unity are you using and what system and OS

I actually simply use YOUR book for testing and learning : my textures, attached 3D objects or 2D sprites, and so on…

Ah ? OK ! I will try with an empty gameobject and a child… Thanks for the tip ! So, you mean with your trick we could click on a sprite for example to animate it or to instantiate a particle system or others !?!

I have Megafiers : So I could add this object at the spine ! How to do that ??? To allow this object follow the book changes !?!

I use Unity 4.3.4 Free, on Windows 7 (64). Maybe you have a more powerful computer !?!
Could you add a simple script to click on the right side of the book (and the left side) to turn (and back) the pages, please ? So, no need of buttons or slider…

Thanks,
6R

It seems to work with an empty gameobject and children… I will test further…

I would like to be able to use the book vertically (for the Unity physics !). Actually a vertical book rotates and rotates if I click on the Next (page) button !?!

With your plugin the Inspector panel doesn’t appear correctly anymore (not full !!! For example I can’t see the z transform case anymore !?! It doesn’t adapt to the size I give it !?!)

If we attach a gameobject on a back of a page, the gameobject disappears after the page has completely turned !?! Or what are the right value in this case ???

Thanks,
6R

There is nothing special that happens to an object when it is attached so you are free to do anything you like with it, the only thing that happens is the objects transform is changed so it sticks to the turning page, so whatever you want to do with it and its children is up to you. The NGUI elements in the video for example all have child objects which animate and change color etc when you click on them.

I will add in a simple next and prev page script but it really is very very simple you just have to call the NextPage() or PrevPage() methods of the BookBuilder component.

If you need a vertical book then again ts just best to create an empty game object and make the book the child of that then you can rotate the book however you like using the empty object transform.

Not sure what is going on with you inspector panel. I suspect it is the wonderful Unity bug of converting older projects to 4.3 which generates the Mesh Serialization errors which inturn seems to lead to internal issues in Unity. If you save the project then restart Unity it should go away but again not seeing that here and not had any reports from other users of any inspector issues.

Again if you could use our support ticket system on our wesbite, Unity forums dont always send out new post emails so you may not get an answer quickly here all the time. Also if you submit a ticket I can send you the spine mesh. To make a spine object turn with the book you just need to make it a child of the book object.

To adjust when the objects attached to the pages appear and disappear you just need to change the Visible Low and Visible high values.

Just submitting a new version to the store which does greatly speed up the inspector when changing any params to do with attached objects. Also added the spine object fbx as a helper and added a simple script to show how to the use clicking on colliders to turn the pages. Just so you know there is also a script called MegaBookControl.cs which has key controls as well as a GUI slider and GUI buttons to change pages. I have attached the simple script below as well.

using UnityEngine;

// Very simple script to allow mouse clicks to turn pages
public class MegaBookMouseControl : MonoBehaviour
{
    public MegaBookBuilder book;
    public Collider            prevcollider;
    public Collider            nextcollider;

    void Update()
    {
        if ( book )
        {
            if ( Input.GetMouseButtonDown(0) )
            {
                if ( prevcollider  nextcollider )
                {
                    RaycastHit    hit;
                    if ( Physics.Raycast(Camera.mainCamera.ScreenPointToRay(Input.mousePosition), out hit) )
                    {
                        if ( hit.collider == prevcollider )
                            book.PrevPage();

                        if ( hit.collider == nextcollider )
                            book.NextPage();
                    }
                }
            }
        }
    }
}

Changes in v1.01

  • Greatly sped up the inspector when changing params for attached objects.

  • Added helper spine object

  • Added simple script example for clicking to change pages MegaBookMouseControl.cs

Thanks Spookycat for all of this…
I thought my questions/your answers here could help other customers !?! But if you prefer the ticket system, no problem…

6R

I dont mind questions here it is just I can’t promise a quick response here :slight_smile:

Yeah there does seem to be a problem with the very last page and objects turning off when the book is fully closed, I will get that fixed and a new version submitted today.

New version in the store which does fix a bug when adding new attached objects I managed to introduce in the previous update. The object visibility setting does work it is per page so for the last page you would just need to change the high value to be say 3.0 then the objects will stay on with the book fully read, same for the first page make sure that the visibilty low setting for that is -2 or so, just a case of tweaking the values as they will need to change depending on the height of objects that are on the page to avoid objects poking through the page above.

Changes in v1.02

  • Fixed exception error when adding new attached objects.

  • Fixed object visibility setting not being updated.

OK ! It works fine with the Mouse Control script. Thanks a lot !

(No changes with the inspector size !?! Unity issue ?)

I have no issue to attach 3D or 2D objects on the first page (funny to see your cup turn with the page !) but issues with the cover and the second one for example !?! (I didn’t test with the other ones !)
Not easy to find the right parameters (offset and X, Y Z) to place a sprite !
Maybe it’s different with an horizontal book !?!

6R

The attach pos values are quite simple the range is from 0 to 100 on each axis, the x and z values control the position on the page with x = 0 being the left edge and 100 being the right edge, save for z being the top of the page and bottom of the page, so to put the object in the middle of the page set the values to x:50 z:50 The y axis controls the side of the page though doesnt really matter but usually 0 is for the front of the page, and 100 for the back. I can look at improving the coordinate system for the next update but if you know the size of your page which is easy if you are using the procedural pages then positioning is just finding the normalized position on the page and multiplying the values by 100.

Not get any problems with the inspector on my machines here, if you could send a ticket with a grab so I can see what is going on but I dont do anything special, the object just has a custom inspector and that’s it.

The more I use your Megabook the more I find it great and clever. I need a few seconds to create my comic book for example.

Thanks for the infos…
I think it isn’t good for sprites but for 3D objects.
Don’t you think you could add a hard cover as an attached gameobject for example !?! With the front and back pages invisible or disable !?! With a boolean to check or not an hard cover !?!

6R

1 Like

I have not used Sprites in Unity but I will take a look and see what I can do. I will be adding a spine and hard cover system in upcoming updates as well as possibly dust covers. If you have any other ideas please do let me know, as ever it is always interesting to see the systems get used in different ways that shows up issues or new uses.

Great to know you will look at Sprites/2D Objects and you will add a spine and hard cover system !!!

  • I would like to reach the number of the actual opened page per script (or when it is closed) from another script to add events following the opened page or not… Could you add here some lines of code with the “if”…
    I have to use “public MegaBookBulider book” like your script above to reach the right script but what’s the “if” for this or this page ???

  • Is it not interesting to add visible Low/high values for each attached objects ? For example an object next to the spine can’t “disappear” at the same time as an object at the right side of the page !?!

6R

Yeah could be useful to have a per object override for visibility I will add that in. A simple bit of code is below that shows how to get the page number an to see if a book is fully read.

float page = book.GetPage();    // Position in your book, whole number is page, fraction part is how far through a page turn to the next page it is
int pagenum = (int)page;    // Get the actual page number as an int
if ( pagenum > book.pages.Count )    // Will add a method to get page count in next update
{
    // Book fully read
}