benikabocha / saba Goto Github PK
View Code? Open in Web Editor NEWOpenGL Viewer (OBJ PMD PMX)
License: MIT License
OpenGL Viewer (OBJ PMD PMX)
License: MIT License
You can add this to readme.md,I think my commit are too much ,and it is not clean , so can you add about it?
a page about how to build with msys2: https://blog.csdn.net/weixin_43539313/article/details/122094269
(This page is written in Chinese)
saba/src/Saba/Model/MMD/VMDAnimation.cpp
Line 398 in 899381f
1.0f / 30.0f
should be changed to
1.0f / frameCount
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
I see your code. I did not find the data about index section.
So pmd file do not have this section?
I have complete use python to parse vmd file .
And I will try to parse model file .
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?
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)
why not yaw-pitch-roll?
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.
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.
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.
Where is your entry definition of saba?
Thanks.
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.
Can the world coordinates of human skeleton be extracted for each frame according to vmd and pmx files
I'm converting your code from C++ to Kotlin, but i see this in your code.
saba/src/Saba/Model/MMD/PMXModel.cpp
Lines 669 to 671 in 51561d0
limitMin.x = -ikLink.m_limitMax.x;
limitMin.y = -ikLink.m_limitMax.y;
limitMin.z = ikLink.m_limitMin.z;
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.
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.
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.
If I want to save and download the rendered video, what should I do?
Is the model in saba editable?
Thanks for your answers.
はじめまして
こちら確認させていただきましたところ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ではできないのでしょうか?
or compile saba on window with msys2.
I want to use saba as a lib support for godot engine to load mmd model files
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 export the pmx and vmd to fbx?
When building with Xcode, directories such as Debug and Release are created one level below and executable files are generated there. Currently, the resource directory is not copied to each directory, so the startup fails at the point of font loading.
thanks for this wonderful lib. How to make Saba able to render animation driven by vmd animation keyframes?
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
お世話になっております
新しい更新が入ったと思って最新を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を使っていますが両バージョンにて同様のエラーで出ております
なにか設定するものはありますでしょうか?
ご教授お願いいたします
Link of readme.md expired
http://www.geocities.jp/higuchuu4/ -> https://sites.google.com/view/vpvp/
I found that such bones is not supported, but widely used.
I take quick look and found implementation of this bones here:
https://github.com/VegetableAvenger/SEngine
https://github.com/newpolaris/Mikudayo
https://github.com/hkrn/MMDAI
https://github.com/r1cebank/ofxMMDX
まず、sabaライブラリを使って、自分のMMDデスクトップマスコットプログラムを作ってみたのですが、窓の背景と枠を透明にしてみたら、モデルがalphaを持っている限り!=0とすると,2つの問題が存在する:
1.もし,外層が半透明であれば,中にまったく不透明なものがあっても,デスクトップの背景の内容が透過してしまう。
2.背景が薄いとモデルが明るさを増しておかしくなる。黒一色の背景でのみ正常に表示される。
sabaのライブラリの面で相応の修正をして、この問題を解決できますか?ありがとうございます。問題の具体的な表現は次の2つのスクリーンショットです:
左正規モデルの場合のcharamin OMPの効果。
I found that some function parameters are different from the MinGW header file type.
It seems that the build artifacts have expired. Is it possible to provide a windows binary on github release?
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.