Giter VIP home page Giter VIP logo

saba's People

Contributors

benikabocha avatar brainrom avatar otita avatar shinomoririnonn 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

saba's Issues

how you get the mmd file format

Did you use the infomation here.https://mikumikudance.fandom.com/wiki/MMD:Polygon_Model_Data
I want to know where to find the pmd pmx file format detailes.
As a un opensource software miku miku dance. I don't know how 樋口优 design the bin format.
I try to use python to parse pmd file.
But meet a problem at here
image

I see your code. I did not find the data about index section.
So pmd file do not have this section?
image
I have complete use python to parse vmd file .
And I will try to parse model file .

Fail to load texture

The log panel shows that load texture(.jpg) file success, but the model is still white model.
图片
图片

Cmake compilation failed

cmake -G "Visual Studio 17 2022 Win64" ^
    -D CMAKE_INSTALL_PREFIX="C:/Users/mj/source/repos/saba/build" ^
    -D INSTALL_LIBS=ON ^
    -D USE_MSVC_RUNTIME_LIBRARY_DLL=On ^
    -D BUILD_CPU_DEMOS=Off ^
    -D BUILD_OPENGL3_DEMOS=Off ^
    -D BUILD_BULLET2_DEMOS=Off ^
    -D BUILD_UNIT_TESTS=Off ^
    ..

I made an error when compiling the command you mentioned.
The error is as follows:

CMake Error: Could not create named generator Visual Studio 17 2022 Win64-T

Generators
* Visual Studio 17 2022        = Generates Visual Studio 2022 project files.
                                 Use -A option to specify architecture.
  Visual Studio 16 2019        = Generates Visual Studio 2019 project files.
                                 Use -A option to specify architecture.
  Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 11 2012 [arch] = Deprecated.  Generates Visual Studio 2012
                                 project files.  Optional [arch] can be
                                 "Win64" or "ARM".
                                 ......

How can I solve it?

Kotlin Support

This project is perfect, and I am trying to port it to kotlin (without cpp), and I stucked on animation and physics calculation, but the base loader is finished and available in Minecraft
mmdbase (loader lib): https://github.com/PrimogemStudio/mmdbase
Minecraft interface (framework): https://github.com/PrimogemStudio/Adavanced-Framework
Thanks for implementation this on kotlin! (I hate cpp of its poor crossplatform and new features after C++ 11, I have to build libs for every platform and operating system)

What to do without CMakeLists.txt in GLFW

Could NOT find GLFW (missing: GLFW_LIBRARIES)
CMake Error at external/CMakeLists.txt:8 (add_subdirectory):
The source directory

D:/test/saba-master/saba-master/external/glfw

does not contain a CMakeLists.txt file.

What to do without CMakeLists.txt in GLFW

Could NOT find GLFW (missing: GLFW_LIBRARIES)
CMake Error at external/CMakeLists.txt:8 (add_subdirectory):
The source directory

D:/test/saba-master/saba-master/external/glfw

does not contain a CMakeLists.txt file.

Problem in importing saba as a library

Hi, I'm trying importing saba to my own OpenGL project. I followed the instruction in wiki, and the code in simple_mmd_viewer_glfw.cpp. But I could only get a twisted model, which I had no idea why.

Here is my model class: pastebin
The rest program is like:

mmdModel = new MmdModel("pmx", "vmd");
mmdModel->init();
while (1) {
    mmdModel->draw(mmdShader);
    mmdModel->idle(deltaTime);
}

I also noticed that changing m_mmdModel->GetUpdatePositions() to m_mmdModel->GetPositions() would make the model renderred properly but with no animation.

Any help will be appreciated. And thanks for developing this fantastic repo since assimp only support poor pmx feature.

Bug in loading bone morph data

At Saba/Model/MMD/PMXModel.cpp line 739:

boneMorphElem.m_rotate = glm::quat_cast(rot1);

the internal order of the quaternion seems inconsistent with that returned from node->GetRotate(), so it goes wrong at PMXModel.cpp line 1268

glm::quat q = glm::slerp(node->GetRotate(), boneMorph.m_rotate, weight);

when interpolating the quaternion.
I tried two versions of glm, the one in this repo and the newest version, and they both have this problem, and the order of the quaternions is not even the same between the two versions.

Issue in reading PMXModel

I'm converting your code from C++ to Kotlin, but i see this in your code.

limitMin.y = -ikLink.m_limitMax.y;
limitMin.x = -ikLink.m_limitMax.x;
limitMin.y = ikLink.m_limitMin.z;

i think it should be the code below, but i can't sure is this right, cuz my C++ skill is bad :(

 limitMin.x = -ikLink.m_limitMax.x; 
 limitMin.y = -ikLink.m_limitMax.y; 
 limitMin.z = ikLink.m_limitMin.z; 

how to build it with vcpkg install lib

for this part https://github.com/benikabocha/saba#required-libraries
I install OpenGL/Bullet Physics/GLFW with vcpkg:

vcpkg install glfw3
vcpkg install OpenGL
vcpkg install bullet3

and execute the follow
cmake .. -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake

get the error:

mingy@DESKTOP-BR5BKAC  ~\source\repos\saba\build   master ≣ +2 ~1 -0 !                           [01:09]
❯ cmake .. -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22621.
-- BULLET_ROOT=
CMake Error at C:/Program Files/CMake/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Bullet (missing: BULLET_DYNAMICS_LIBRARY
  BULLET_COLLISION_LIBRARY BULLET_MATH_LIBRARY BULLET_SOFTBODY_LIBRARY
  BULLET_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.23/Modules/FindBullet.cmake:83 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:833 (_find_package)
  CMakeLists.txt:23 (find_package)


-- Configuring incomplete, errors occurred!
See also "C:/Users/mingy/source/repos/saba/build/CMakeFiles/CMakeOutput.log".

How can I pass vcpkg installed libraries to cmake Correctly ?

Also, does the cmake command here need to add two ., because there is no CMakeLists.txt file in mkdir/cd build , an error will be reported.

Segfault when loading model

For some models, Saba segfaults when doing PMXModel::InitializeAnimation(). m_ikTarget isn't initialized, and program finally crashes at MMDIkSolver::SolveCore(). Same behavior in saba_view, examples and direct library usage.
I could post an example model, which I try to load.

Crash in latest MacOS such as Mojave

I'm impressed by your awesome code.
I found Bullet which is installed by brew has crash problem in high Sierra and Mojave.
This is the solution from googling. I hope this can be a help for updating your installation document.

  1. Comment out SIMD related definition in btScalar.h
    https://pybullet.org/Bullet/phpBB3/viewtopic.php?t=9443
  2. Build Bullet without double precision. For this modify build_cmake_pybuild_double.sh as following.
    cmake -DBUILD_PYBULLET=ON -DBUILD_PYBULLET_NUMPY=ON -DUSE_DOUBLE_PRECISION=OFF -DBT_USE_EGL=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="your installation path" ..
  3. After build, run "make install" in the build_cmake folder.
  4. Link built Bullet with Saba viwer.

CMAKEでのvisualstudio2015作成でのエラー

はじめまして
こちら確認させていただきましたところReame.jp.MEでの
cmake -G "Visual Studio 14 2015 Win64" ^
-D SABA_BULLET_ROOT=<bullet のインストールディレクトリ> ^
-D SABA_GLFW_ROOT=<GLFW のインストールディレクトリ> ^
..

を実行したところ
Does not match the generator used previously: Visual Studio 15 2017 Win64
がでてしまい2017でしか動かないようですが
こちら2015ではできないのでしょうか?

how it can support loop animation?

i try to modify vmdAnimation.cpp to check if the animation has ended,and then replay it...but the key frame at the last index seems not the end of the animation.....can you give me a example or ....release a new version.thanks. : - )

how to render animation?

thanks for this wonderful lib. How to make Saba able to render animation driven by vmd animation keyframes?

how to setup glfw and bullet on windows

Does the lib glfw bullet means include file and libs(.dll,.lib),or just source code ,then cmake will call cl.exe to compile?
I meet some problem on github actions.(I have succcessfully compiled Godot Game Engine and suika2(Visual Novel)Engine with github actions.)
Also tries use linux vm (on actions)to compile saba with mingw/mingw-w64,I installed " mingw-w64-dev ",but it says there's no <windows.h>.
You can see my work here:https://github.com/little-game-and-simple-software/saba

simple_mmd_viewer_dx11でのエラー

お世話になっております
新しい更新が入ったと思って最新をpullさせていただきましたが
simple_mmd_viewer_dx11にて以下のエラーが出ております
エラー C2275 'IDXGIDevice1': この型は演算子として使用できません simple_mmd_viewer_dx11 D:\prog\pmx\saba-master\example\simple_mmd_viewer_dx11.cpp 1397

どうやらstructとして判別しているらしく->が使い得ないみたいです
hr = m_device->QueryInterface(&dxgi);
Cmakeでは前回と同様にVs2015と2017を使っていますが両バージョンにて同様のエラーで出ております
なにか設定するものはありますでしょうか?
ご教授お願いいたします

アルファチャンネル問題,モデルがalphaに存在する場合、表示がおかしい

まず、sabaライブラリを使って、自分のMMDデスクトップマスコットプログラムを作ってみたのですが、窓の背景と枠を透明にしてみたら、モデルがalphaを持っている限り!=0とすると,2つの問題が存在する:
1.もし,外層が半透明であれば,中にまったく不透明なものがあっても,デスクトップの背景の内容が透過してしまう。

2.背景が薄いとモデルが明るさを増しておかしくなる。黒一色の背景でのみ正常に表示される。

sabaのライブラリの面で相応の修正をして、この問題を解決できますか?ありがとうございます。問題の具体的な表現は次の2つのスクリーンショットです:
左正規モデルの場合のcharamin OMPの効果。
001_1
002_2

Provide windows build

It seems that the build artifacts have expired. Is it possible to provide a windows binary on github release?

Project failed to build.

I have some problems with building (running make):

[ 62%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/GL/GLShaderUtil.cpp.o
[ 63%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/GL/GLSLUtil.cpp.o
[ 64%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/GL/GLTextureUtil.cpp.o
/home/kirschrot/binz/saba-master/example/simple_mmd_viewer_glfw.cpp: In function ‘bool SampleMain(std::vector<std::__cxx11::basic_string<char> >&)’:
/home/kirschrot/binz/saba-master/example/simple_mmd_viewer_glfw.cpp:1245:18: error: ‘GLFW_TRANSPARENT_FRAMEBUFFER’ was not declared in this scope
 1245 |   glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GL_TRUE);
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
example/CMakeFiles/simple_mmd_viewer_glfw.dir/build.make:62: recipe for target 'example/CMakeFiles/simple_mmd_viewer_glfw.dir/simple_mmd_viewer_glfw.cpp.o' failed
make[2]: *** [example/CMakeFiles/simple_mmd_viewer_glfw.dir/simple_mmd_viewer_glfw.cpp.o] Error 1
CMakeFiles/Makefile2:463: recipe for target 'example/CMakeFiles/simple_mmd_viewer_glfw.dir/all' failed
make[1]: *** [example/CMakeFiles/simple_mmd_viewer_glfw.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 65%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/GL/Model/OBJ/GLOBJModel.cpp.o
[ 66%] Linking CXX executable mmd2obj
[ 66%] Built target mmd2obj
[ 67%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/GL/Model/OBJ/GLOBJModelDrawContext.cpp.o
[ 68%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/GL/Model/OBJ/GLOBJModelDrawer.cpp.o
[ 69%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/GL/Model/XFile/GLXFileModel.cpp.o
[ 70%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/GL/Model/XFile/GLXFileModelDrawContext.cpp.o
[ 70%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/GL/Model/XFile/GLXFileModelDrawer.cpp.o
[ 71%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/GL/Model/MMD/GLMMDModel.cpp.o
[ 72%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/GL/Model/MMD/GLMMDModelDrawContext.cpp.o
[ 73%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/GL/Model/MMD/GLMMDModelDrawer.cpp.o
[ 74%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/Viewer/Camera.cpp.o
[ 75%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/Viewer/Light.cpp.o
[ 76%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/Viewer/Grid.cpp.o
[ 77%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/Viewer/ModelDrawer.cpp.o
[ 78%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/Viewer/Viewer.cpp.o
[ 78%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/Viewer/ViewerCommand.cpp.o
[ 79%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/Viewer/ViewerContext.cpp.o
[ 80%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/Viewer/CameraOverrider.cpp.o
[ 81%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/Viewer/VMDCameraOverrider.cpp.o
[ 82%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/Saba/Viewer/ShadowMap.cpp.o
[ 83%] Building C object viewer/CMakeFiles/SabaViewer.dir/__/external/gl3w/src/gl3w.c.o
[ 84%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/__/external/imgui/src/imgui.cpp.o
[ 85%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/__/external/imgui/src/imgui_draw.cpp.o
[ 86%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/__/external/imgui/src/imgui_widgets.cpp.o
[ 86%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/__/external/imgui/src/imgui_impl_glfw.cpp.o
[ 87%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/__/external/imgui/src/imgui_impl_opengl3.cpp.o
[ 88%] Building CXX object viewer/CMakeFiles/SabaViewer.dir/__/external/imgui/src/ImGuizmo.cpp.o
[ 89%] Linking CXX static library libSabaViewer.a
[ 89%] Built target SabaViewer
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

my compiler:

$ gcc --version
gcc (Ubuntu 10.1.0-2ubuntu1~18.04) 10.1.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Am I doing something wrong, maybe?

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.