Search Unity

[New Release]MegaBook 2 Released - 3x Performance & Loads of New features

Discussion in 'Assets and Asset Store' started by SpookyCat, Jan 30, 2023.

  1. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    MB2 banner big.png
    logo1.png
    MegaBook 2
    allows you to quickly and easily create books with page turning animation in Unity. MegaBook will create pages and other objects for your book. You can choose to provide your own page meshes as well and they will be animated as well. You have complete control over the textures and materials 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.

    This is version 2 of our popular Book creater and animation system. It has been rewritten to take advantage of the big peformance gains that Unity Jobs and Unity Burst can add, giving a reduction in CPU usage of between 200% to 300%.

    We have also added a Book Cover skinning system to make it easy to add your own custom book cover meshes. The skinning is done in a couple of clicks inside Unity, or you are free to make your own skinned meshes in your 3d package and import them or use any normal mesh and the built in Cover Skinning system to easily create your own covers.

    The page turn animation system has been improved with numerous more controls to allow you to tailor the animation effect the way you need.

    Also new is the Headband and Spine Fabric systems where custom meshes will be generated and applied to the book for you and they will deform correctly as the book is read.

    And a new Book Maker wizard so adding a new book is just a couple of clicks. Pick a book style and cover style and click Create.

    Also you can make books with objects that appear or popup on each page to make interactable books simple. Full control on how the objects appear and vanish. And with the Message system the objects can receive messages to say they have been turned on, and the state of the page they are attached to for even more control of the content.

    The Book Builder inspectors have been improved making them easier to use with full Undo support. Also added are gizmos in the scene view for changing various params of the book as well as turning the pages.
    If you have ever needed an animated book in your game then MegaBook 2 is what you need, it is a complete procedural book builder and animator with an advanced page turning animation system and content builder.
    And an all new Demo Scene with a numerous books included.

    MegaBook 2 also includes several ready to go Book styles and sizes with different cover options. Also included are a few page textures and several textured props such as table top, Candlestick, Pewter Mug, Quill, Prop books, Rum Bottle, Inkwell. And a few extra scripts such as a Book Shelf filler.

    Note: The Pirate Ships, Chest, Guns and music shown in the videos are not included in the Asset but apart from the guns are Free assets and links are below.
    Fluyt Pirate Ship
    Pirate Ship
    Pirate Music
    Amada Chest
    Flintlock Pistols


    Features in MegaBook 2
    • Megabook 2 rewitten to use Burst and Jobs for big speed improvements.
    • Editor code rewritten for better performance.
    • Undo fully supported.
    • New demo scene.
    • All code for older versions of Unity removed streamlining the code.
    • Code all in MegaBook namespace
    • Includes example old books in different styles to get you started.
    • Books can now use the new cover system which uses skinned meshes for much nicer looking books.
    • Built in skinning of your own book covers utility.
    • Adjust the cover pivot locations, rotation axism scaling to suit your needs.
    • More control over the page spread animation for better looking books.
    • Added a Turn slider for finer control of page turn while editing the book.
    • Attached object system improved, can now add scaling, translation and rotation to have objects appear and vanish nicely.
    • Attached object offset can be controlled by a curve as the page turns to stop poke through off objects.
    • New 'BookAppeared' and 'BookVanished' messages for when attached objects are turned on and off by the book.
    • New 'BookAppear' and 'BookVanish' messages which pass the amount the object is appearing or vanishing so you can control effects like fade in/out something.
    • Can add Unity UI world space elements to pages using the attach system.
    • All key params have tooltips to explain what they do.
    • The spine radius can now be controlled via a curve as the book is read so the curve of the pages at the binding can change.
    • Added headbands option so the ends of the pages at the spine can have a decorative cover as found in old books.
    • The headband will deform to match the pages spine radius so will change along with that.
    • Added Spine fabric option so you can cover the ends of your pages nicely, deforms corectly when the book is read.
    • New animation option control the max and min angles as the book turns.
    • Example scripts showing use of book messages to control objects attached to a page.
    • Noise option for page mesh creation to add rough look to pages, full control over how much and where noise is added.
    • Create Book wizard, select a few options and click create. Select from book styles and cover styles.
    • Easily add your own book and cover styles to the system.
    • Improved page edge UV options.
    • Autofit covers from one size book to another book
    • Autodisabling of page turners so no CPU used it pages not turning, have dozens of books in the scene with no extra CPU usage.
    • Includes old antique style blank page textures
    • Several 3d assets included, such as book props, table, candlestick, inkwell etc.
    • Numerous other small improvements and optimizations.
    • Book Shelf Filler Helper Script
    • Works with all Render Pipelines
    • Fully Animated 3D pages
    • Add any mesh objects as page content
    • 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
    • Full source code included

    Screenshot 2023-01-30 123012.png Screenshot 2023-01-30 123424.png Screenshot 2023-01-30 123250.png
     
    MikeUpchat and Mike196 like this.
  2. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    First couple of tutorial videos ready, first shows the simple process of making a New Book and adding a cover, the second is an in depth dive through all the params in the 'Mesh Options' section.




     
    Last edited: Feb 9, 2023
  3. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757

    Will be a new tutorial videos available later today, showing what all the various options in the 'Mesh Options' do. Will also be a small update that adds a few extra bits to make editing the books easier and will be a couple of small bug fixes.
     
    Last edited: Feb 9, 2023
    wetcircuit likes this.
  4. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Submitted a small update to the Asset Store. This fixes a few small niggles and adds some nice new features. There is now support for Video content in the book, this will see some new features added in future updates.


    Changes in v1.01
    • Put limit of 1 on low values for the height,width and length seg counts
    • Fixed a small bug if spine radius set to 0 causing headband to go wrong
    • Added a wire gizmo to show the new size of the book when dragging the size handles
    • Fixed error if Use Hole Mesh option was turned off
    • New option to highlight the page being edited.
    • Added Scale Mesh Width option to the page param, this is used if you select a custom mesh for the page, useful for say a torn out page.
    • Added support for video content for pages to the system
    • You can now select a PhysicMaterial to apply to any page colliders
     
    Last edited: Feb 6, 2023
  5. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Next video guide, this one showing the simple process of making your own skinned covers for your book.
     
  6. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Screenshot 2023-02-03 124852.png Been adding to an improving the Mesh content system for MegaBook 2 making it easier to use and allowing for more interesting content. For example the image above uses Text Mesh Pro for the text but also has two videos playing both with a mask blend border to blend it nicely into the page, and as it is mesh content it will all deform nicely along with the page as it turns. Also attached are Unity UI buttons to stop and start the videos and a button to turn the page.
     

    Attached Files:

    Last edited: Feb 3, 2023
  7. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Quick video showing Text Mesh Pro, Unity UI and Video Players added as content to a book. The videos used are from the game Rise Of Piracy which you can Wishlist on Steam now and even follow the dev on Twitch

     
    Last edited: Feb 6, 2023
  8. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    Oh wow, what an amazing update, thanks for much for this. I can't wait to try this out in my project. The only thing that let my previous books down was the covers as I don't have the skills to rig up a skinned mesh and all that, but I can just use the covers included or find a model on line and skin up with your system, so cool.
    You will be offering any more covers in the future? Would love a spell box style.
    And the video content is perfect for me as well, really really cool and so many thanks for an amazing update.
     
  9. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Another quick update, this fixes a couple of small bugs, and adds some new fatures. You can now override the segment counts to make the page meshes per page if required now. Also MegaBook will detect which pipeline you are using and will automatically change the Texture name it uses when sending the texture content to the materials, you can still override this if you are using custom shaders with different texture param names.

    Also added fading support if you attach a Unity UI object to a page and it has a Canvas Group component attached so you can easily fade UI elements in and out as well as the usual scaling, roation and translation.

    Also improved the Mesh Content system so now you can pick per page, front and back, a root object whose meshes and its child meshes will be merged and added to the page mesh. Will be a video on this system in the next couple of days.

    Changes in v1.02
    • Fixed a bug when using the 'Set' buttons for Object visibility when editing the first page, the values would be set wrongly.
    • Added support for fading in and out UI objects if the object has a CanvasGroup component attached
    • Add options to the Page settings to control the Width and length segs used to make a page mesh. If values are > 0 then those values will used for that page, if 0 or less then the book values will be used
    • Fixed false message regarding memory leaks when entering and exiting play mode
    • Automated the detection of which Pipeline is being used and setting the texture name value accordingly, this can be overruled by the shader texture name still for custom shaders
    • Relocated the 'Use Alpha as Mask' check box to its correct position under the Back textures section
    • Changed and improved the Mesh content system, no longer have to add MCComplexPage to an object to get the content, now each page allows you to pick the objects you want to add and each one can have its own scaling, rotation and position
     
    Last edited: Feb 6, 2023
  10. megatonmedia

    megatonmedia

    Joined:
    May 9, 2015
    Posts:
    15
    A compatibility request. Can you please remove the dependency on Post Processing? My VR project exploded when I imported Megabook 2. I uninstalled Post Processing, then had to edit your code to prevent project compile errors.

    You could move the demo files to their own separate package file. That would prevent the compile errors that will come back when I upgrade.

    G--
     
  11. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    I will look at that, but if you you just dont import the 'Scenes' folder then the PostProcessing is not required as it only for the demo scene and the scripts that make use of also wont be imported.

    As a side note I have in other assets removed things like Post Processing and demo scenes and that generally results in bad reviews as people expect a scene that looks like the images and videos.
     
    Last edited: Feb 5, 2023
  12. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Been working away improving the workflow with MegaBook so updated the layout of the inspector a little, made a few things more automated added some new features and fixed a few small bugs and issues. So there is a Cancel Progress bar when updating the all the Page textures for the book. The Page options have been updated to have more values that can override the book settings per page making it more flexible. More tooltips added to the Inspector.

    I have also done the next tutorial video that guides you through what all the 'Page' values do, this is where you can change the look of the texture content, add video content and add Mesh content.


    Changes in v1.03
    • Added a cancel progress bar to the 'Make Pages' button as it can be a little slow.
    • Each page can now have its own Mask texture if making textures for that page is on.
    • Improvements to the layout of the 'Page' section of the inspector to make it clearer
    • Each page can now override the Book collider option to can set per page if collider is generated and updated
    • Option to subdivide Text Mesh Pro meshes, useful if large text is clipping through a turning page.
    • Each page can override the book Text Mesh Pro setting
    • If using custom meshes for pages added a Pivot value in case your custom mesh has a pivot position in a differnt place
    • Mesh content can now be added to pages that use custom meshes
    • Fixed a rendering issue where wrong edge material could be shown of pages in middle of book.
    • Added Custom page meshes effected by Noise values.
    • Added tooltips the various buttons in the inspector and a few other params that were missing them.
    • Page textures now automatically update when you change their properties
     
    Last edited: Feb 6, 2023
  13. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Thanks. Yeah we are going to be adding a few book covers as options in the near future, a Spell book is one for sure.
     
  14. megatonmedia

    megatonmedia

    Joined:
    May 9, 2015
    Posts:
    15
    @SpookyCat I have an issue when using 1.03 with timeline. Couldn't find an appropriate board for bug reports, so reported here.

    When I animate the Page parameter using Timeline, the cover does not stay in sync with the pages. When scrubbing in the animation window it will snap to the correct rotation, and then back to the wrong rotation.

    I'm using the book in a cut scene, thus the need to use Timeline.

    Megabook2TimelineBug.gif

    In the gif I added two keys to the Book. One set to page page -1 and the second set to page 6ish. Then I play it back. You can see the cover takes the entire time to open, while the pages are flipping over. It kind of looks like the cover is being updated by the percentage position between the two keys. 0 to 1f.
     
  15. megatonmedia

    megatonmedia

    Joined:
    May 9, 2015
    Posts:
    15
    Found the issue with timeline. When I change the page value it creates keys for 6 variables. Including the Cover angles. The issue can be manually fixed by moving the cover keys, like I've done in the attached picture.

    This seems like it's going to be a complex issue to fix, but now we have a work around.


    upload_2023-2-7_10-49-52.png
     
  16. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Yeah seems to add curves for the front and back cover angles, you can just remove those properties, actually just remove all the properties except 'Page'

    Another solution would be to have a simple controller script for the book which has it's own 'Page' float which it sends to the book?
     
    Last edited: Feb 7, 2023
  17. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Just done a tutorial on the 'Page Objects' options.
     
  18. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    I have stopped that from happening now, I will put up an update later tonight after a wee bit more testing.
     
  19. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Submitted a new update to the store, sees some more general small improvements to the workflow and inspector. Also a few small bug fixes. Tooltips added to the various buttons, so everything should now have a tooltip explaining what it does. And fixed the issue when recording animations of the book being read not playing back nicely. Should be one maybe two more tutorial videos this week as well, now nearly 40 minutes of tutorial videos available.

    Changes in v1.04
    • PageParams follow copied when making a new page
    • Fixed hole mesh being shown if prev page was a reduced width custom page mesh
    • Further tooltips added to Foldouts, buttons and other missing params, each value, button etc now has its own tooltip to explain it.
    • Further improvements to workflow and inspector
    • Adjusted inspector sensitivity of some params for easier editing
    • Fixed when undoing headband and spine fabric changes the meshes would update to the new values
    • Fixed an issue when recording an animation of the book being read with the Page value not playing back correctly.
     
  20. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Another quick update and another short guide video, this one shows adding UI objects to a page and a little bit on the new Layer system added to help control which objects are shown at any time on a page useful if you have complex setups.
    Also submitted a small update which adds the Layer ID system as well as a toggle to turn objects on and off that are attached, and also a small fix. I noticed at very low page turn values and very slow turning of the page the mesh deformation would jitter due to floating point precision erros so added a new deformer that works of doubles which is automatically enabled when needed to stop that.



    Changes in v1.05
    • Added an 'active' option to the Page Objects, if you need to control the object in somewhere set this to active to stop the book controlling it
    • Added a Layer system for the Page Objects, allowing you to have different layers of objects that can be turned on and off by using the page front and back layerid values
    • Noticed a jitter in the mesh when turning a page very slowly when it first starts caused by large bend angle values, now def system will auto switch to a double instead of float job if it needs extra precision
     
  21. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    And the last general tutorial video on the sections Generla, Binding Objects and Cover
     
  22. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    Thanks for the guide videos and the updates, only been out a week or so and already new features. Great stuff.
     
  23. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Another quick update this makes MegaBook 2 fully compatoble with Unity 2022 and 2023 beta.

    Changes in v1.06
    • Made MegaBook 2 compatible with Unity 2023
    • Made MegaBook 2 compatible with Unity 2022
     
  24. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    Quick question, I see there is a fade option for things appearing and vanishing, what is that?
     
  25. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Hi Mike, that is used for fading Unity UI in and out. If you want to use it add a GameObject to the page in the normal way but have a CanvasGroup component on that object, the Book will then send the fade values to the Canvas Group alpha value so any child UI objects such as buttons attached to the object will fade in and out.
     
  26. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    A new version in the asset store. This fixes a couple of small issues.

    Changes in v1.07
    • Removed the GameObject/Create Other/MegaBook option left over from MB1, to create a book use the 'Window/Create Book/ window.
    • Cover finder now doesn't use a fixed folder for finding cover styles in the project will find them in whole project
    • The above issue meant the MegaBook folder could not be moved in a project without causing an error that is now fixed.
    • If you are not using the builtin pipeline the BookCamera.cs script may give errors about PostProcessing, if comment out the first line to fix that
     
  27. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    There is a small update in the store, in very large projects the Create Book window would take a long time to open, the code behind that delay has been rewritten so should not be any issues any more.
     
  28. Razouille

    Razouille

    Joined:
    Jan 25, 2013
    Posts:
    44
    Hello @SpookyCat, before bying the asset I would like to know if it's possible to build stuff at runtime ? Actually I would like to create a roguelike based on this asset but it implies to create the book procedurally at least before each run (ideally I would also like to modify already built pages based on player choices). Thanks in advance for your answer.
     
  29. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    You can change the values for the book and have it rebuild at runtime, so you can change any texture, or move any object. Not sure what you mean by roguelike, but if you could say what you want to change in a bit more detail then I can give a fuller answer.
     
  30. Razouille

    Razouille

    Joined:
    Jan 25, 2013
    Posts:
    44
    Hey thanks for your answer, actually I would go with 1 double page = 1 ScriptableObject, where the scriptable contains the title, the desc, an image, some 3D props ... But the given scriptable could change based on previous player choice. So basically when the game starts the book is "empty", as I want to build the next content just before turning the page, which seems totally possible based on what you said. Actually I would also have one last question : should the total page amount be fixed at the start ? Or could it also change during runtime ?
     
    Last edited: Apr 10, 2023
  31. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Razouille likes this.
  32. Quantumstorey

    Quantumstorey

    Joined:
    Jun 1, 2017
    Posts:
    9
    @SpookyCat I know forums are mostly for complaints, so I wanted to say this is amazing. Really really good work. You have saved me the incredible pain of making a proper interactive book.
     
  33. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Thanks for that :) Always nice to hear when an asset has been useful, if you have anything to show please do post or send me an email, even nicer to see the use the assets are put to :)
     
  34. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Submitted a small update to the asset store which adds support for RenderLayerMasks for the page meshes.

    Changes since v1.07
    • Added support for RenderLayerMask for the page meshes.
    • Fix an issue with the Create Book window where it was looking twice for all the book styles and cover styles in the project.
     
  35. findon

    findon

    Joined:
    May 4, 2023
    Posts:
    2
    Having a really subtle issue that we can't get to the bottom of. As the pages turn, the content on the front of the revealed page (right hand side text in this instance), seems to be affected by some sort of fading/reflection from the content of the opposite page (the image in this instance). It's less obvious if the opposite page is blank, but still there.



    The page content itself is generated by using the SetPageTexture method
     
  36. findon

    findon

    Joined:
    May 4, 2023
    Posts:
    2
    Solved I think. A post processing issue.
     
  37. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    A small update in the Asset Stoore, this fixes a bug when you you do a runtime rebuild of the book and the pages would be in the wrong position. Books should now rebuild just fine at runtime.
     
  38. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    MegaBook 2 is in the Unity Asset Store at 50% off.
     
  39. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    A new version is in the Asset Store now, this fixes a couple of small issues that were reported. First one being if a book was rebuilt at runtime the page value would not be correct until it is changed. And second when using the Book Create window setting the page count to 31 or more would cause an exception.

    Changes in v1.11
    • Fixed an exception which would happen if you set the number of pages to more than 30 in the Book Create Window.
    • Fixed a bug where if the book was rebuilt at runtime the pages would not be set to the correct position until the page value was changed.
     
  40. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Another quick update which fixes an error you might get if you try and add mesh content and the mesh has no uv channels.

    Changes in v1.12
    • Fixed an issue if you tried to add a mesh as content that had no uv mapping at all.
     
  41. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    A small update that fixes an error if the inspector is set to super wide and the logo will cause an exception. And also added warnings to the Pagemesh option if you try and set a mesh which has less than 3 materials applied or is not readable, before it would just cause an exception, now the mesh will be ignored and the inspector will tell you the problem.

    Changes in v1.13

    • Fixed an error if the inspector was made wider than the MegaBook logo image.
    • Added warnings for when you use a custom page mesh to inform if the mesh has enough materials and is readable.
     
  42. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    A small update, MegaBook now defaults the Textue name to _BaseMap instead of _BaseColorMap when using URP or HDRP, so when you convert the materials over after importing the asset the textures should not be blank after a rebuilf.

    Changes in v1.14
    • MegaBook now defaults the Texture name for content to _BaseMap instead of _BaseColorMap, so the books should work fine in URP and HDRP after the materials have been converted.
     
  43. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,757
    Added a small update which adds a method that has been requested where you can pass in a point on a page and it will return the deformed positon of that point. For example:
    Vector3 pagePos = book.MapPoint(4, new Vector3(0.2f, 0.0f, 0.1f);

    Will return the point on page 4 for a point 0.2 in from the spine and 0.1 towards the top from the centre line.
    There is also a UV version where you can pass in normalized values instead of positions.
    Vector3 pagePos = book.MapPoint(3, 1.0f, 1.0f);

    Will return a point on page 3 on right hand edge and at the top edge of the page.