guillaumeblanc / ozz-animation Goto Github PK
View Code? Open in Web Editor NEWOpen source c++ skeletal animation library and toolset
Home Page: http://guillaumeblanc.github.io/ozz-animation/
License: Other
Open source c++ skeletal animation library and toolset
Home Page: http://guillaumeblanc.github.io/ozz-animation/
License: Other
We have ozz wrapped up so that it's mostly hidden away from the game directly. However, I would still like to expose small amount of ozz's surface area to the game.
It would be nice to setup dll import/export macros throughout the headers in order to optionally allow ozz to be dynamically linked.
I'm thinking we add the following to platform.h
#if defined(OZZ_DLL_EXPORT)
#define OZZ_DLL __declspec( dllexport )
#elif defined(OZZ_DLL_IMPORT)
#define OZZ_DLL __declspec( dllimport )
#else
#define OZZ_DLL
#endif
And then work through all of the necessary types and functions, decorating them with OZZ_DLL.
This will allow everyone to continue linking ozz statically without any changes to their configuration. While allowing anyone with a setup like ours to link ozz statically into our engine but expose it to anything using our engine.
Thoughts?
Thanks,
/ Kyle
In file included from D:\Projects\git\ozz-animation\include/ozz/animation/runtime/skeleton.h:31:0,
from D:\Projects\git\ozz-animation\src\animation\runtime\skeleton.cc:28:
D:\Projects\git\ozz-animation\src\animation\runtime\skeleton.cc: In member function 'char* ozz::animation::Skeleton::All
ocate(size_t, size_t)':
D:\Projects\git\ozz-animation\src\animation\runtime\skeleton.cc:87:71: warning: comparison between 'enum ozz::AlignOf::' and 'enum ozz::AlignOf<char*>::' [-Wenum-compare]
ozz::AlignOfmath::SoaTransform::value >= ozz::AlignOf<char*>::value &&
^
D:\Projects\git\ozz-animation\include/ozz/base/platform.h:47:57: note: in definition of macro 'OZZ_STATIC_ASSERT'
struct OZZ_JOIN(_StaticAssert, COUNTER) { char x[(_condition) ? 1 : -1]; }
^
D:\Projects\git\ozz-animation\src\animation\runtime\skeleton.cc:88:78: warning: comparison between 'enum ozz::AlignOf<ch
ar*>::' and 'enum ozz::AlignOfozz::animation::Skeleton::JointProperties::' [-Wenum-compare]
ozz::AlignOf<char*>::value >= ozz::AlignOfSkeleton::JointProperties::value &&
^
D:\Projects\git\ozz-animation\include/ozz/base/platform.h:47:57: note: in definition of macro 'OZZ_STATIC_ASSERT'
struct OZZ_JOIN(_StaticAssert, COUNTER) { char x[(_condition) ? 1 : -1]; }
So we're working on a couple different things right now which (I think) make sense to do with TRS transforms instead of matrices.
Animation powered physics. We have some model space varlet simulation which needs to be blended with/powered by sampled animation.
Motion interpolation without sampling animation. We're looking at solidifying our engine to use fixed time steps for all game logic which in some cases includes animation. What this means is that when our skinning system extracts animation poses, we'll need to keep around the previous pose in order to interpolate the skinned model between game updated.
I'm curious what your thoughts are on this feature, is it something that would be valuable or am I missing an obvious or subtle reason why doing everything in local space is just easier or better?
I just started to intergrate this library in my project and trying to do hardware skinning, however I noticed there is no texture coord information in the mesh data? This is a really big thing, without texturing support this library can't be used in a game :( Do you think you could add texture support soon?
Another thing is I noticed each job has validate() functions, are these really necessary in release mode? maybe we could have an #ifdef to check them only at debug builds?
Hello i build from branch master but errors are in extern in gtest.
Problem is in missing headers for compilation on freebsd.
I looked at your version gtest is obsolete (1.5.0 now is 1.7.0).
Version OS : FreeBSD pcbsd-8384 11.0-CURRENTFEB2016 FreeBSD 11.0-CURRENTFEB2016 #5 cbe5270(freebsd-base-graphics)
Version clang : FreeBSD clang version 3.7.1 (tags/RELEASE_371/final 255217) 20151225
~/Documents/ozz-animation/build% make -j8
---------------------------------------------------------
Default build type is: Release
The following compilation flags will be used:
CMAKE_CXX_FLAGS -Wall
CMAKE_C_FLAGS
CMAKE_CXX_FLAGS_DEBUG -g -D_GLIBCXX_DEBUG
CMAKE_C_FLAGS_DEBUG -g -D_GLIBCXX_DEBUG
CMAKE_CXX_FLAGS_MINSIZEREL -Os -DNDEBUG
CMAKE_C_FLAGS_MINSIZEREL -Os -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO -O2 -g -DNDEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO -O2 -g -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE -O3 -DNDEBUG
CMAKE_C_FLAGS_RELEASE -O3 -DNDEBUG
---------------------------------------------------------
-- Could NOT find Fbx (missing: FBX_LIBRARIES FBX_INCLUDE_DIRS)
Fbx SDK not found, FBX tools libraries and samples will be skipped.
-- Try OpenMP C flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Could NOT find OpenMP (missing: OpenMP_C_FLAGS OpenMP_CXX_FLAGS)
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/home/razor/Documents/ozz-animation/build
Scanning dependencies of target tinyxml
Scanning dependencies of target ozz_geometry
[ 1%] Building CXX object src/options/CMakeFiles/ozz_options.dir/options.cc.o
Scanning dependencies of target gtest
Scanning dependencies of target ozz_animation_offline_tools
[ 1%] Building CXX object src/animation/offline/collada/tinyxml/CMakeFiles/tinyxml.dir/tinystr.cpp.o
[ 2%] Building CXX object src/geometry/runtime/CMakeFiles/ozz_geometry.dir/skinning_job.cc.o
[ 2%] Building CXX object src/animation/offline/tools/CMakeFiles/ozz_animation_offline_tools.dir/convert2anim.cc.o
[ 3%] Building CXX object test/gtest/CMakeFiles/gtest.dir/fused-src/gtest/gtest_main.cc.o
Scanning dependencies of target ozz_base
Scanning dependencies of target ozz_animation
Scanning dependencies of target ozz_animation_offline
[ 4%] Building CXX object src/base/CMakeFiles/ozz_base.dir/memory/allocator.cc.o
[ 4%] Building CXX object src/animation/runtime/CMakeFiles/ozz_animation.dir/animation.cc.o
[ 5%] Building CXX object src/animation/offline/CMakeFiles/ozz_animation_offline.dir/raw_animation.cc.o
[ 6%] Building CXX object src/animation/offline/collada/tinyxml/CMakeFiles/tinyxml.dir/tinyxml.cpp.o
[ 6%] Building CXX object src/base/CMakeFiles/ozz_base.dir/log.cc.o
[ 7%] Building CXX object src/animation/runtime/CMakeFiles/ozz_animation.dir/blending_job.cc.o
[ 7%] Building CXX object src/animation/offline/CMakeFiles/ozz_animation_offline.dir/raw_animation_archive.cc.o
[ 7%] Linking CXX static library libozz_geometry_r.a
In file included from /usr/home/razor/Documents/ozz-animation/extern/gtest/fused-src/gtest/gtest_main.cc:30:
/usr/home/razor/Documents/ozz-animation/test/../extern/gtest/fused-src/gtest/gtest.h:2377:36: error: use of undeclared identifier 'isatty'
inline int IsATTY(int fd) { return isatty(fd); }
^
/usr/home/razor/Documents/ozz-animation/test/../extern/gtest/fused-src/gtest/gtest.h:2383:44: error: use of undeclared identifier 'rmdir'
inline int RmDir(const char* dir) { return rmdir(dir); }
^
[ 7%] Built target ozz_geometry
/usr/home/razor/Documents/ozz-animation/test/../extern/gtest/fused-src/gtest/gtest.h:2405:44: error: use of undeclared identifier 'chdir'
inline int ChDir(const char* dir) { return chdir(dir); }
^
/usr/home/razor/Documents/ozz-animation/test/../extern/gtest/fused-src/gtest/gtest.h:2419:27: error: use of undeclared identifier 'read'; did you mean 'Read'?
return static_cast<int>(read(fd, buf, count));
[ 8%] Building CXX object src/base/CMakeFiles/ozz_base.dir/containers/string_archive.cc.o
^~~~
Read
/usr/home/razor/Documents/ozz-animation/test/../extern/gtest/fused-src/gtest/gtest.h:2418:12: note: 'Read' declared here
inline int Read(int fd, void* buf, unsigned int count) {
^
[ 8%] Building CXX object src/animation/runtime/CMakeFiles/ozz_animation.dir/local_to_model_job.cc.o
[ 8%] Building CXX object src/animation/offline/collada/tinyxml/CMakeFiles/tinyxml.dir/tinyxmlerror.cpp.o
/usr/home/razor/Documents/ozz-animation/test/../extern/gtest/fused-src/gtest/gtest.h:2422:27: error: use of undeclared identifier 'write'; did you mean 'Write'?
return static_cast<int>(write(fd, buf, count));
^~~~~
Write
/usr/home/razor/Documents/ozz-animation/test/../extern/gtest/fused-src/gtest/gtest.h:2421:12: note: 'Write' declared here
inline int Write(int fd, const void* buf, unsigned int count) {
^
/usr/home/razor/Documents/ozz-animation/test/../extern/gtest/fused-src/gtest/gtest.h:2424:35: error: use of undeclared identifier 'close'
inline int Close(int fd) { return close(fd); }
^
[ 9%] Building CXX object src/animation/offline/collada/tinyxml/CMakeFiles/tinyxml.dir/tinyxmlparser.cpp.o
[ 10%] Building CXX object src/animation/runtime/CMakeFiles/ozz_animation.dir/sampling_job.cc.o
[ 11%] Building CXX object src/animation/offline/tools/CMakeFiles/ozz_animation_offline_tools.dir/convert2skel.cc.o
[ 12%] Building CXX object src/animation/offline/CMakeFiles/ozz_animation_offline.dir/animation_builder.cc.o
[ 12%] Building CXX object src/base/CMakeFiles/ozz_base.dir/io/archive.cc.o
[ 13%] Building CXX object src/base/CMakeFiles/ozz_base.dir/io/stream.cc.o
6 errors generated.
--- test/gtest/CMakeFiles/gtest.dir/fused-src/gtest/gtest_main.cc.o ---
*** [test/gtest/CMakeFiles/gtest.dir/fused-src/gtest/gtest_main.cc.o] Error code 1
make[2]: stopped in /usr/home/razor/Documents/ozz-animation/build
1 error
make[2]: stopped in /usr/home/razor/Documents/ozz-animation/build
--- test/gtest/CMakeFiles/gtest.dir/all ---
*** [test/gtest/CMakeFiles/gtest.dir/all] Error code 2
make[1]: stopped in /usr/home/razor/Documents/ozz-animation/build
A failure has been detected in another branch of the parallel make
make[2]: stopped in /usr/home/razor/Documents/ozz-animation/build
--- src/base/CMakeFiles/ozz_base.dir/all ---
*** [src/base/CMakeFiles/ozz_base.dir/all] Error code 2
make[1]: stopped in /usr/home/razor/Documents/ozz-animation/build
A failure has been detected in another branch of the parallel make
make[2]: stopped in /usr/home/razor/Documents/ozz-animation/build
--- src/animation/offline/collada/tinyxml/CMakeFiles/tinyxml.dir/all ---
*** [src/animation/offline/collada/tinyxml/CMakeFiles/tinyxml.dir/all] Error code 2
make[1]: stopped in /usr/home/razor/Documents/ozz-animation/build
A failure has been detected in another branch of the parallel make
make[2]: stopped in /usr/home/razor/Documents/ozz-animation/build
--- src/options/CMakeFiles/ozz_options.dir/all ---
*** [src/options/CMakeFiles/ozz_options.dir/all] Error code 2
make[1]: stopped in /usr/home/razor/Documents/ozz-animation/build
A failure has been detected in another branch of the parallel make
make[2]: stopped in /usr/home/razor/Documents/ozz-animation/build
--- src/animation/runtime/CMakeFiles/ozz_animation.dir/all ---
*** [src/animation/runtime/CMakeFiles/ozz_animation.dir/all] Error code 2
make[1]: stopped in /usr/home/razor/Documents/ozz-animation/build
A failure has been detected in another branch of the parallel make
make[2]: stopped in /usr/home/razor/Documents/ozz-animation/build
--- src/animation/offline/tools/CMakeFiles/ozz_animation_offline_tools.dir/all ---
*** [src/animation/offline/tools/CMakeFiles/ozz_animation_offline_tools.dir/all] Error code 2
make[1]: stopped in /usr/home/razor/Documents/ozz-animation/build
A failure has been detected in another branch of the parallel make
make[2]: stopped in /usr/home/razor/Documents/ozz-animation/build
--- src/animation/offline/CMakeFiles/ozz_animation_offline.dir/all ---
*** [src/animation/offline/CMakeFiles/ozz_animation_offline.dir/all] Error code 2
make[1]: stopped in /usr/home/razor/Documents/ozz-animation/build
7 errors
make[1]: stopped in /usr/home/razor/Documents/ozz-animation/build
*** [all] Error code 2
make: stopped in /usr/home/razor/Documents/ozz-animation/build
1 error
make: stopped in /usr/home/razor/Documents/ozz-animation/build
I know that Ozz has its own optimised format for runtime data. I'm raising this new feature request for greater adoption. I see two possible approaches; listed in increasing order of work:
Option 2 might be infeasible or more of a long-term goal. Nevertheless, glTF is gaining momentum and it'd be good to have support for it.
Would you please share the roadmap of ozz?
For example, next official release date, feature plan, etc...
Hello i build with gcc version 5.3.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project)
mkdir build
cd build
cmake -G "MinGW Makefiles" ..
make -j4
build is ok but compiler says :
make.txt
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:541:12: warning: narrowing conversion of '(((unsigned int)fi.ozz::math::internal::SimdFI4::i.SimdInt4Def::x) & 2147483648u
)' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-Wnarrowing]
fi.i.x & 0x80000000,
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:542:12: warning: narrowing conversion of '(((unsigned int)fi.ozz::math::internal::SimdFI4::i.SimdInt4Def::y) & 2147483648u
)' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-Wnarrowing]
fi.i.y & 0x80000000,
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:543:12: warning: narrowing conversion of '(((unsigned int)fi.ozz::math::internal::SimdFI4::i.SimdInt4Def::z) & 2147483648u
)' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-Wnarrowing]
fi.i.z & 0x80000000,
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:544:12: warning: narrowing conversion of '(((unsigned int)fi.ozz::math::internal::SimdFI4::i.SimdInt4Def::w) & 2147483648u
)' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-Wnarrowing]
fi.i.w & 0x80000000};
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h: In function 'ozz::math::SimdInt4 ozz::math::simd_int4::all_true()':
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:983:71: warning: narrowing conversion of '4294967295u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-Wn
arrowing]
const SimdInt4 ret = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff};
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:983:71: warning: narrowing conversion of '4294967295u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-Wn
arrowing]
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:983:71: warning: narrowing conversion of '4294967295u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-Wn
arrowing]
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:983:71: warning: narrowing conversion of '4294967295u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-Wn
arrowing]
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h: In function 'ozz::math::SimdInt4 ozz::math::simd_int4::mask_sign()':
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:993:71: warning: narrowing conversion of '2147483648u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-Wn
arrowing]
const SimdInt4 ret = {0x80000000, 0x80000000, 0x80000000, 0x80000000};
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:993:71: warning: narrowing conversion of '2147483648u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-Wn
arrowing]
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:993:71: warning: narrowing conversion of '2147483648u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-Wn
arrowing]
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:993:71: warning: narrowing conversion of '2147483648u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-Wn
arrowing]
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h: In function 'ozz::math::SimdInt4 ozz::math::simd_int4::mask_ffff()':
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:1003:71: warning: narrowing conversion of '4294967295u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-W
narrowing]
const SimdInt4 ret = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff};
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:1003:71: warning: narrowing conversion of '4294967295u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-W
narrowing]
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:1003:71: warning: narrowing conversion of '4294967295u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-W
narrowing]
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:1003:71: warning: narrowing conversion of '4294967295u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-W
narrowing]
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h: In function 'ozz::math::SimdInt4 ozz::math::simd_int4::mask_fff0()':
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:1008:62: warning: narrowing conversion of '4294967295u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-W
narrowing]
const SimdInt4 ret = {0xffffffff, 0xffffffff, 0xffffffff, 0};
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:1008:62: warning: narrowing conversion of '4294967295u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-W
narrowing]
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:1008:62: warning: narrowing conversion of '4294967295u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-W
narrowing]
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h: In function 'ozz::math::SimdInt4 ozz::math::simd_int4::mask_f000()':
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:1018:44: warning: narrowing conversion of '4294967295u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-W
narrowing]
const SimdInt4 ret = {0xffffffff, 0, 0, 0};
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h: In function 'ozz::math::SimdInt4 ozz::math::simd_int4::mask_0f00()':
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:1023:44: warning: narrowing conversion of '4294967295u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-W
narrowing]
const SimdInt4 ret = {0, 0xffffffff, 0, 0};
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h: In function 'ozz::math::SimdInt4 ozz::math::simd_int4::mask_00f0()':
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:1028:44: warning: narrowing conversion of '4294967295u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-W
narrowing]
const SimdInt4 ret = {0, 0, 0xffffffff, 0};
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h: In function 'ozz::math::SimdInt4 ozz::math::simd_int4::mask_000f()':
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:1033:44: warning: narrowing conversion of '4294967295u' from 'unsigned int' to 'int' inside { } is ill-formed in C++11 [-W
narrowing]
const SimdInt4 ret = {0, 0, 0, 0xffffffff};
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h: In function 'ozz::math::SimdInt4 ozz::math::Sign(ozz::math::_SimdInt4)':
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:1362:31: warning: narrowing conversion of '(((unsigned int)_v.SimdInt4Def::x) & 2147483648u)' from 'unsigned int' to 'int'
inside { } is ill-formed in C++11 [-Wnarrowing]
const SimdInt4 ret = { _v.x & 0x80000000,
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:1363:31: warning: narrowing conversion of '(((unsigned int)_v.SimdInt4Def::y) & 2147483648u)' from 'unsigned int' to 'int'
inside { } is ill-formed in C++11 [-Wnarrowing]
_v.y & 0x80000000,
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:1364:31: warning: narrowing conversion of '(((unsigned int)_v.SimdInt4Def::z) & 2147483648u)' from 'unsigned int' to 'int'
inside { } is ill-formed in C++11 [-Wnarrowing]
_v.z & 0x80000000,
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:1365:31: warning: narrowing conversion of '(((unsigned int)_v.SimdInt4Def::w) & 2147483648u)' from 'unsigned int' to 'int'
inside { } is ill-formed in C++11 [-Wnarrowing]
_v.w & 0x80000000};
^
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h: In function 'float ozz::math::HalfToFloat(uint16_t)':
C:/Users/Razor/workspace/ozz-animation/include/ozz/base/maths/internal/simd_math_ref-inl.h:2107:64: warning: narrowing conversion of '((((int)_h) & 32767) << 13)' from 'int' to 'uint32_t {aka unsigned int}' inside
Added make.txt with build information.
Is there any plan to support inverse kinematics in ozz?
@guillaumeblanc
in simd_math_sse-inl.h, line 1436 (develop branch)
it looks the following code is doing something useless:
tmp1 = _mm_rcp_ss(det);
det = _mm_sub_ss(_mm_add_ss(tmp1, tmp1),_mm_mul_ss(det, _mm_mul_ss(tmp1, tmp1)));
why not:
det = _mm_rcp_ss(det);
I'm not sure if I'm doing something incorrectly or if this is a bug. I have a custom importer that I wrote, and attempted to hack up the playback sample to get a visual of the bone structure. I've generated a small sample that crashes. Any insight would be appreciated.
#include "ozz/animation/offline/raw_skeleton.h"
#include "ozz/animation/offline/skeleton_builder.h"
#include "ozz/animation/runtime/skeleton.h"
#include "ozz/base/maths/soa_transform.h"
#include "ozz/base/maths/vec_float.h"
#include "ozz/animation/runtime/local_to_model_job.h"
int main(int argc, char const* argv[]) {
(void)argc;
(void)argv;
ozz::animation::offline::RawSkeleton raw_skeleton;
raw_skeleton.roots.resize(1);
ozz::animation::offline::RawSkeleton::Joint& root = raw_skeleton.roots[0];
root.name = "root";
root.transform.translation = ozz::math::Float3(0.f, 1.f, 0.f);
root.transform.rotation = ozz::math::Quaternion(0.f, 0.f, 0.f, 1.f);
root.transform.scale = ozz::math::Float3(1.f, 1.f, 1.f);
root.children.resize(2);
ozz::animation::offline::RawSkeleton::Joint& left = root.children[0];
left.name = "left";
left.transform.translation = ozz::math::Float3(1.f, 0.f, 0.f);
left.transform.rotation = ozz::math::Quaternion(0.f, 0.f, 0.f, 1.f);
left.transform.scale = ozz::math::Float3(1.f, 1.f, 1.f);
ozz::animation::offline::RawSkeleton::Joint& right = root.children[1];
right.name = "right";
right.transform.translation = ozz::math::Float3(-1.f, 0.f, 0.f);
right.transform.rotation = ozz::math::Quaternion(0.f, 0.f, 0.f, 1.f);
right.transform.scale = ozz::math::Float3(1.f, 1.f, 1.f);
if (!raw_skeleton.Validate()) {
return EXIT_FAILURE;
}
ozz::animation::offline::SkeletonBuilder builder;
// This operation will fail and return NULL if the RawSkeleton isn't valid.
ozz::animation::Skeleton* skeleton = builder(raw_skeleton);
// The below is taken from the playback sample
ozz::memory::Allocator* allocator = ozz::memory::default_allocator();
ozz::Range<ozz::math::SoaTransform> locals;
ozz::Range<ozz::math::Float4x4> models;
const int num_soa_joints = skeleton->num_soa_joints();
locals = allocator->AllocateRange<ozz::math::SoaTransform>(num_soa_joints);
const int num_joints = skeleton->num_joints();
models = allocator->AllocateRange<ozz::math::Float4x4>(num_joints);
ozz::animation::LocalToModelJob ltm_job;
ltm_job.skeleton = skeleton;
ltm_job.input = locals;
ltm_job.output = models;
if (!ltm_job.Run()) {
return EXIT_FAILURE;
}
// In the end the skeleton needs to be deleted.
ozz::memory::default_allocator()->Delete(skeleton);
ozz::memory::default_allocator()->Deallocate(locals);
ozz::memory::default_allocator()->Deallocate(models);
return EXIT_SUCCESS;
}
Using the latest develop branch, build configuration is Debug (by build-helper.py)
OS: win10 x64
Compiler: VS14(2015)
Compile error:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\yvals.h(71): error C2338: /RTCc rejects conformant code,
so it isn't supported by the C++ Standard Library. Either remove this compiler option, or define _ALLOW_RTCc_IN_STL to
acknowledge that you have received this warning.
D:\Projects\git\ozz-animation\src\animation\offline\animation_builder.cc: In member function 'ozz::animation::Animation*
ozz::animation::offline::AnimationBuilder::operator()(const ozz::animation::offline::RawAnimation&) const':
D:\Projects\git\ozz-animation\src\animation\offline\animation_builder.cc:346:3: error: 'strcpy' is not a member of 'std'
std::strcpy(animation->name_, _input.name.c_str());
^
D:\Projects\git\ozz-animation\src\animation\offline\animation_builder.cc:346:3: note: suggested alternative:
In file included from D:\AndroidPack\android-ndk-r12b\platforms\android-9\arch-arm\usr\include/stdlib.h:40:0,
from D:\AndroidPack\android-ndk-r12b\sources\cxx-stl\gnu-libstdc++\4.9\include/cstdlib:72,
from D:\AndroidPack\android-ndk-r12b\sources\cxx-stl\gnu-libstdc++\4.9\include/bits/stl_algo.h:59,
from D:\AndroidPack\android-ndk-r12b\sources\cxx-stl\gnu-libstdc++\4.9\include/algorithm:62,
from D:\Projects\git\ozz-animation\src\animation\offline\animation_builder.cc:32:
D:\AndroidPack\android-ndk-r12b\platforms\android-9\arch-arm\usr\include/string.h:54:15: note: 'strcpy'
extern char* strcpy(char , const char *);
^
make.exe[2]: ** [src/animation/offline/CMakeFiles/ozz_animation_offline.dir/animation_builder.cc.o] Error 1
make.exe[1]: *** [src/animation/offline/CMakeFiles/ozz_animation_offline.dir/all] Error 2
make.exe: *** [all] Error 2
Build Failed
Since it's a very popular and well established open-source engine, a sample integration would be nice.
Why does this project use such non-standard git workflow? I was merging new OZZ changes to my code today and it was difficult to do because all changes are squashed in the master branch. This is really not necessary for releases - simple git tag for each version would work the same way and keep the history.
I'm trying to import a skinned mesh from a .fbx file exported from blender, using fbx2mesh.cc framework sample, with a custom raw skeletal, but it results in something as follow:
The original mesh in blender looks like:
I do not have much experience, but a think this happens by bones vs joints oriented format issue. And I don't know how to solve this.
Thanks in advance.
Great animation system, the only thing that is missing is the ability to add user channels which are basically just floats that are added to animation frames. They are blended the same way as translation/rotation/scale, the only difference being that they don't compute world matrices at the end.
Having a C API would significantly simplify making bindings to other languages, and make it possible to use via any C FFI.
Is there any chance of a wrapper being provided in the future?
if this feature is already exist then please close this issue, and would you mind to tell me how to use it?
thanks in advance
Exported from google code :
It would be really useful if the fbx2anim tool (or a second very similar tool) would export all animations, not just the first one (perhaps in the format ModelName_AnimationName.ozz).
I'm currently requiring a tool to import .fbx or .dae model on android, can ozz be used on android?
Hello.
Sorry to asking it here but I didn't find contacts of author on githab.
I have few questions regarding ozz adaptation for Left Handed coordinates system.
For my pet project I use one of utility classes provided by ozz-animation library - FbxSystemConverter.
It is used to import static meshes geometry from FBX files because of multiple bugs in FBX spaces conversion code of fbxsdk::FbxAxisSystem::ConvertScene(...) and fbxsdk::FbxSystemUnit::ConverScene.
It is commented as an axis system and unit system conversion helper from any Fbx system
to ozz system.
If I understood it correctly from comments ozz uses Right Handed coordinates (where X is Right, Y is UP and Z is Out of Screen (please, check picture below).
By using it in my application (which is Left Handed where X is Right, Y is Up and Z is In Screen (please, check picture below) ) I obviously have flipped geometry.
So here is my question.
Is it possible to change code in FbxSystemConverter to convert transformations into Left Handed system described above? I don't ask to write it but it would be great it you can provide steps what and where should be rewritten to change handness of the "target" coordinates system.
I believe, answer on this question would be pretty helpful for those who want use ozz-animation library as a middleware for animation importing to application with Left Handed coordinates.
Sorry, if this question addressed incorrectly. It would be great If you have time to answer it.
If my explanations weren't clear or you need extra information, please, let me know.
Thanks.
P.S. Thank you in advance.
Hi,
I'm using Ozz to load and play an animation from https://www.mixamo.com
survivor_a_lusth.zip
I generated the skeleton and animation using the offline tools. I can display debug shapes for the joints, so everything is working as intended.
I'm using hardware skinning but I run into an issue with the bone count.
Ozz skeleton has 65 bones.
The loaded mesh (through fbx or assimp) has 52.
I need to multiply ozz matrices by the inverse bind pose matrix to perform the skinning, but I can't match the bones between ozz skeleton and the loaded mesh skeleton.
How do I match those up?
Thanks,
JNQ
We can retrieve the matrices for each joint in local/model space which is great in situations where you can use them (like passing to a vertex shader for hardware skinning), however, I have an instance where the matrices are "too much" and the problem requires me to have direct access to the underlying Position/Rotation/Scale Vector3 Float for each joint.
Is there any way to retrieve these?
OpenGL textures are normally stored "upside down" on graphic card, so you must either flip texture data, or flip V coordinate in vertex shader (this is not easily visible with the default checkerboard texture):
" v_vertex_uv = a_uv;\n"
should be:
" v_vertex_uv = vec2(a_uv.x, -a_uv.y);\n"
I am working on adding Ozz to a game engine which features a math library which can be SSE or Scalar depending on the system capabilities at run time. The Ozz math library can be both as well, and I wanted to know a little more about how that would be best dealt with?
How to convert a runtime skeleton/animation to a offline skeleton/animation ?
I'm not sure on the details of this, but the technique is well explained and demonstrated by Wolfire's David Rosen at:
http://www.gdcvault.com/play/1020583/Animation-Bootcamp-An-Indie-Approach
Recently, I try to use google filament engine to render 3d model, but no animation; I have confused about intergrat ozz animation to filament; If possible, provide some document to help intergration easily, thanks very much.
I suggest ozz to provide fix point type besides float, since:
CMakeLists.txt:56
include(${PROJECT_SOURCE_DIR}/build-utils/cmake/compiler_settings.cmake)
How to export fbx after blended animation?
CMakeLists.txt:113
SET(ozz_build_fbx OFF CACHE BOOL "ozz_build_fbx" FORCE)
SET(ozz_build_samples OFF CACHE BOOL "ozz_build_samples" FORCE)
[ 82%] Linking CXX executable sample_fbx2mesh
[ 82%] Built target sample_fbx2mesh
Scanning dependencies of target BUILD_DATA_SAMPLE
[ 82%] Generating ../../../../media/bin/arnaud_mesh.ozz, ../../../../media/bin/arnaud_mesh_4.ozz
Loading skeleton archive /Users/wyman/github/ozz/ozz-animation/media/bin/alain_skeleton.ozz.
FBX importer version 2018.1.1 Release (246450).
FBX file version is 7.5.0.
Required joint RightFootThumb1 not found in provided skeleton.
Failed to read skinning data.
make[2]: *** [../media/bin/arnaud_mesh.ozz] Error 1
make[1]: *** [samples/framework/tools/CMakeFiles/BUILD_DATA_SAMPLE.dir/all] Error 2
make: *** [all] Error 2
I follow the build instructions but this error occured.
Hi,
pretty cool project!
I got it building with fbx supoprt and I can build a skel and anim and view the skel/anim... 👯♂️
Just wondering if there's mesh texture support, or if its planed?
Cheers
It would be super useful for game developers to be able to mix&match different models and animations.
The only problem is that skeleton retargeting rarely can be fully automatic, so some kind of visual tool would be necessary to fine-tune the transformation.
Example of skeleton retargeting in Unreal Engine: https://www.youtube.com/watch?v=xy9aLbZLdeA
I'm not sure if I'm missing something here
but is the fbx2ozz suppose to remove bones?
I did the following
A model with 4 bones (Blender):
https://i.imgur.com/RqTlwEm.png
Export settings:
https://i.imgur.com/jQttvus.png
Ran it through the tool:
https://i.imgur.com/6kUul1O.png
outputted "Skeleton.ozz" and "Default Take.ozz" (I renamed it to animation.ozz)
then replaced the skeleton and animation files from the sample_playback.exe
which were in the media folder
and it produced this:
https://i.imgur.com/07Femuw.png
seems like 1 bone went missing? same happens if I include animations
the animations play correctly but always 1 missing bone
It could be a good improvement for the library to change indices' type from int16 to int32.
I use meshes with many vertices in my project, I modified library's code according my needs, but it could be useful for someone else too.
Is hardware skinning a possibility? something like dual quaternion skinning? I guess there would have to be a bone limit though. Would be cool to see this library working on mobile devices with skinning done in the vertex shader.
Passing down scale matrix with 100 factor returns matrix with the same scaling (multiplying with inverse_convert_ scales back to 100).
I have two FBX SDKs installed on my machine (OSX). They are located at following paths:
/Applications/Autodesk/FBX SDK/2015.1
/Applications/Autodesk/FBX SDK/2017.0.1
CMake scripts select the first one by default, but it is too old to build media files:
[ 32%] Generating ../../../media/bin/arnaud_mesh.ozz, ../../../media/bin/arnaud_mesh_4.ozz
Loading skeleton archive /tmp/ozztest/ozz-animation/media/bin/alain_skeleton.ozz.
FBX importer version 2015.1 Release (228957).
FBX version of /tmp/ozztest/ozz-animation/media/fbx/alain/arnaud.fbx is 7.5.0.
Failed to import file /tmp/ozztest/ozz-animation/media/fbx/alain/arnaud.fbx.
make[2]: *** [media/bin/arnaud_mesh.ozz] Error 1
make[1]: *** [samples/framework/tools/CMakeFiles/BUILD_DATA_SAMPLE.dir/all] Error 2
Perhaps it would be good to specify minimum version of the FBX SDK in CMake scripts?
Could you add an user-defined root matrix to LocalToModelJob ? I can create a new pull-request for it.
Just like this:
struct LocalToModelJob {
LocalToModelJob() : skeleton(NULL), root(NULL) {}
...
const Skeleton* skeleton;
...
const Float4x4* root;
...
bool LocalToModelJob::Run() const {
...
// Initializes an identity matrix that will be used to compute roots model
// matrices without requiring a branch.
const Float4x4 identity = Float4x4::identity();
const Float4x4 * root_matrix = (root == NULL) ? &identity : root;
...
const Float4x4* parent_matrix =
math::Select(parent == Skeleton::kNoParentIndex, root_matrix,
&model_matrices[parent]);
...
So we can use root (world) matrix to instead of an identity matrix.
It would be nice to add function 'ozz::math::SimdFloat4 LookRotation(ozz::math::SimdFloat4 forward, ozz::math::SimdFloat4 up)' ! Because it's very useful for building quaternion!
Ozz is still treating us very well.
Thanks!
I need some clarification on the output from LocalToModelJob.
For the past few days I've been attempting to write a shader to skin my models and it keeps giving me an explosion of vertices. https://www.youtube.com/watch?v=y8faIL9cNTI
From what I can tell the model seems to be orientated correctly and generally follows the animation.
After countless tutorials, examples, and some help from others the conclusion is that the transformation matrices given from the output of LocalToModelJob cannot be directly used to skin the model.
An excerpt taken from https://mmmovania.blogspot.com/2012/11/skeletal-animation-and-gpu-skinning.html states:
When we apply any new transformation (an animation sequence for example) to the skeleton, we have to first undo the bind pose transformation so that the bones can be first moved to their origin (so that the bones transform is identity and it transform is its parent's transform).
Any new animated transformation on the bone has to be multiplied by the inverse of the bindpose matrix. The final matrix that we get from this process is called the skinning matrix (also called the final bone matrix).
I was under the impression LocaltoModelJob took care of this and the output could directly be used to skin the model?
If this is not the case then perhapse a LocalToFinializedJob (or some other clever name) would be implemented to handle this scenario, which in turn, could be a solution to issue #7
Shaders are inherently difficult to debug therefore I want to make sure my bases are covered.
Hello! Looking at all of your samples, the blendJob.layers property is always set with ozz::animation::BlendingJob::Layer layers[HARD_CODED_NUMBER]. I wanted to know if there was any way to make this dynamic as I want to have a single object which can blend any number of animations. Since blendJob.layers is of type ozz::Range I tried setting is with an object of that type. Everything compiles but the blend job's validate function sees it as incorrect. Ozz is incredible and has helped me so much with my project, just wanted to know if there was a way to accomplish this that I wasn't thinking of. Thank you! :)
This isn't really an issue, but I wanted to share it with ozz users.
Unity uses a cool animation blending technique for their blend spaces. https://docs.unity3d.com/Manual/BlendTree-2DBlending.html
It's known as Gradient Band Interpolation. Here is a very extensive masters paper on many animation topics from this guy Rune Johansen http://runevision.com/thesis/rune_skovbo_johansen_thesis.pdf. He wrote the Unity animation system.
At any rate, I've implemented the Gradient Band Interpolation for both Cartesian and Radial coordinates as this shadertoy https://www.shadertoy.com/view/XlKXWR that people might find useful.
/ Kyle
It would be great if NEON is supported :)
Is there a roadmap for the project?
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.