Giter Club home page Giter Club logo

monster-mash's Introduction

Monster Mash: New Sketch-Based Modeling and Animation Tool

Introduction

This is the open-source version of Monster Mash.

Monster Mash is a new sketch-based modeling and animation tool that allows you to quickly sketch a character, inflate it into 3D, and promptly animate it. You can perform all interactions in the sketching plane. No 3D manipulation is required.

The web demo (http://MonsterMash.zone) and its source code that is available here accompanies a paper Dvorožňák et al.: Monster Mash: A Single-View Approach to Casual 3D Modeling and Animation published in ACM Transactions on Graphics 39(6):214 and presented at SIGGRAPH Asia 2020 conference. (See the project page for more details.)

The demo uses a combination of web technologies (mainly for UI) and C++ code.

Disclaimer: This is not an officially supported Google product.

License

The source code in the "src" directory is licensed under Apache License, Version 2.0. See the LICENSE file for more details. Note that third party code located in the "third_party" directory may be licensed under more restrictive licenses.

Building

This project uses CMake (https://cmake.org) for building. Some third party libraries are not part of this repository and must be installed in advance:

You can build the complete web application using emscripten (https://emscripten.org/), or a simplified desktop version (i.e., only a canvas without a web-based UI) using clang (https://clang.llvm.org/) or gcc (https://gcc.gnu.org/).

Building on Linux

Instructions for building on Ubuntu 20.04

  • Download and install the necessary dependencies by running:
    sudo apt-get install build-essential cmake libsdl2-dev wget unzip git python3
    
    (You can remove python3 if you only want the desktop version.)
  • Clone this repository into your home directory and change directory to the repo:
    git clone https://github.com/google/monster-mash.git ~/monster-mash && cd ~/monster-mash
    
  • Download the Triangle library and unzip it into the appropriate directory:
    wget http://www.netlib.org/voronoi/triangle.zip && unzip triangle.zip -d third_party/triangle
    
  • (Skip if you only want the desktop version.) Download and install emscripten by following instructions on https://emscripten.org/docs/getting_started/downloads.html
  • Create a directory for building and change to it:
    mkdir -p ./build/Release && cd ./build/Release
    
  • Build the project:
    • For the complete web version, build the project using emscripten:
      cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=PATH_TO_EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake ../../src && make
      
      (Replace PATH_TO_EMSDK with the path to your emsdk directory.)
    • For the desktop version, build the project using clang/gcc:
      cmake -DCMAKE_BUILD_TYPE=Release ../../src && make
      

monster-mash's People

Contributors

dvoromar avatar sykorad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monster-mash's Issues

Export a sequence

Goal

To input a sequence of shapes and export a sequence of meshes.

Motivation

Taking 2d animation from a different sources and get out meshes that look plausible would be very interesting!

Implementation

Ideally this should work on the command line, so Monster Mash can be a background tool in a pipeline.

Build fails because SDL2 is not found

Running CMake on the src directory produces this output (on Mac OS):

CMake Error at CMakeLists.txt:85 (find_package):
  By not providing "FindSDL2.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "SDL2", but
  CMake did not find one.

  Could not find a package configuration file provided by "SDL2" with any of
  the following names:

    SDL2Config.cmake
    sdl2-config.cmake

The instructions don't mention this; the only dependency mentioned is Triangle, which I've copied into the specified place.

Cmake error when installing.

I'm getting this error when installing. Not sure if it's an error in the steps of the installation or a result of my lack of knowledge in Linux. Installed Linux in Virtualbox to try the program.

Cmake error at CmakeLists.txt

The Cmake_C Compiler.

Path_to_emsdk/upstream/emscripten/emcc

is not a full path and was not found in path

Tell Cmake where to find the compiler by setting
either the enviroment variable "CC" or the Cmake
cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in
the PATH.

Blender Plugin

Motivation

This was mentioned on the 2 minute paper video; https://www.youtube.com/watch?v=-Ny-p-CHNyM&lc=UgwGk_I_wLs7R0NSM2N4AaABAg

Thought that was a good idea, so this is to serve a discussion for making a blender plugin.

Implementation

It might not be possible to mirror all the functionality of Monster-Mash, because the Blender plugin framework only supports Python.

We could possibly make platform specific executables that accept command line input and output, so we can get results from Monster-Mash with Python.

How to set the current playback position with JS

Hello,

I am trying to sync it up with some music (:

Wondering on the JS side if it is possible to get the current playback frame, as well as set the playback frame.

I see _getNumberOfAnimationFrames but no luck yet having control of the playback position.

Thanks!

How to compile on windows?

I am trying to compile this on windows and got stuck. Any help would be appreciated. Although I set the path for SDL2, still asking for the correct path. Can someone send me windows build for this software?
image

Can't run with nvidia driver: GLXBadDrawable error

Hello, I hope I'm posting in the right place.
Thank you for this great program! the demo is amazing!

I tried installing it on ubuntu 20.04, with the latest nvidia driver to date (460.67),
it compiled well, but when trying to run it says:

GL version: 4.6.0 NVIDIA 460.67
X Error of failed request: GLXBadDrawable
Major opcode of failed request: 151 (GLX)
Minor opcode of failed request: 5 (X_GLXMakeCurrent)
Serial number of failed request: 273
Current serial number in output stream: 273

when I tried running it with the default driver nouveau, it runs,
but without any buttons. unless its supposed to be like that and only use keyboard shortcuts?
but I can't use this driver with my gpu and screen, so I had to go back to Nvidia's.
any idea how to solve this GLXBadDrawable error? maybe I need to compile the driver with a specific parameter? I couldn't find a solution for this.
Thank you very much!

Compiling instructions

Would be great to have stepped instructions on how to compile this project.

I'll be trying to compile this myself (although I've never compiled a c++ project before), so will document my process as I go along.

Further down the line it would be great to have CI generated releases for supported platforms.

Is it possible to integrate to the draw tool, scissors smart selection alike capabilities?

I'm not aware how much, or how easily or hard drawing tools are to integrate in a web based platform. But supposing there is the possibility of integrating this easily, or without much trouble, something that could help a lot it's if the drawing tool would have scissors smart selection alike capabilities, like many desktop softwares have like GIMP. In GIMP, when you select a shape with the scissors, the scissors smartly correct the mistakes you make when making the selection. In this tool, making mistakes in the selection is easy, and they lead to black areas/ spots in the 3d figures, which at least for newbies of 3D are hard to remove in Blender or other 3d softwares (and this tool with others is getting special attention among newbies of 3D)

Rated site-Rate the site

When the site is not rated it says not secure and you cant use it in school i would be very happy if you can rate the site

Record Stroke Pressure

It would be nice to record the stroke pressure of the designer, currently every line has the same thickness.

const int t = ceil(0.5 * thickness);

const int t = ceil(0.5 * thickness);

What would be the best way to approach this task? C++ or .js?

Can't run properly

image

I followed the instructions step by step, but it didn't work properly in the end, the result is like this, what could be the reason?

Fails to compile eigein3 on gcc13

lots of errors like this:

home/joelm/src/monster-mash/src/../third_party/tinygltf/tiny_gltf.h:895:47: error: ‘uint32_t’ does not name a type
  895 |           GetComponentSizeInBytes(static_cast<uint32_t>(componentType));
      |                                               ^~~~~~~~
/home/joelm/src/monster-mash/src/../third_party/tinygltf/tiny_gltf.h:895:47: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/joelm/src/monster-mash/src/../third_party/tinygltf/tiny_gltf.h:895:71: error: ‘tinygltf::GetComponentSizeInBytes’ cannot be used as a function
  895 |           GetComponentSizeInBytes(static_cast<uint32_t>(componentType));
      |                                                                       ^
/home/joelm/src/monster-mash/src/../third_party/tinygltf/tiny_gltf.h:900:42: error: ‘uint32_t’ was not declared in this scope; did you mean ‘ImageExternal::uint32_t’?
  900 |       if ((bufferViewObject.byteStride % uint32_t(componentSizeInBytes)) != 0) {
      |                                          ^~~~~~~~
      |                                          ImageExternal::uint32_t
/usr/include/bits/stdint-uintn.h:26:20: note: ‘ImageExternal::uint32_t’ declared here
   26 | typedef __uint32_t uint32_t;
      |                    ^~~~~~~~
In file included from /home/joelm/src/monster-mash/src/../third_party/eigen3/Eigen/Core:367,
                 from /home/joelm/src/monster-mash/src/exportgltf.h:21:
/home/joelm/src/monster-mash/src/../third_party/eigen3/Eigen/src/Core/util/Meta.h: At global scope:
/home/joelm/src/monster-mash/src/../third_party/eigen3/Eigen/src/Core/util/Meta.h:547:14: error: ‘uint32_t’ in namespace ‘std’ does not name a type; did you mean ‘int32_t’?
  547 | typedef std::uint32_t uint32_t;
      |              ^~~~~~~~
      |              int32_t
/home/joelm/src/monster-mash/src/../third_party/eigen3/Eigen/src/Core/util/Meta.h:549:14: error: ‘uint64_t’ in namespace ‘std’ does not name a type; did you mean ‘int64_t’?
  549 | typedef std::uint64_t uint64_t;
      |              ^~~~~~~~
      |              int64_t
make[2]: *** [CMakeFiles/monstermash.dir/build.make:205: CMakeFiles/monstermash.dir/exportgltf.cpp.o] Error 1
make[2]: Leaving directory '/home/joelm/src/monster-mash/.build/Release'
make[1]: *** [CMakeFiles/Makefile2:86: CMakeFiles/monstermash.dir/all] Error 2
make[1]: Leaving directory '/home/joelm/src/monster-mash/.build/Release'
make: *** [Makefile:94: all] Error 2

Path error

"is not a full path to an existing compiler tool"
I get this message for both "CMAKE_CCX_COMPILER" and "CMAKE_C_COMPILER" when i tried building on a AWS EC2 instance.
Can you help me?

Screenshot_error_message

Create Layer From Mask

The web demo got an awesome update to create layers from a mask images back on August 28, 2022, but it seems like this update hasn't been open sourced here yet. It would be wonderful if it was!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.