https://github.com/onlyuser/dexvt-lite
3D Inverse Kinematics with Constraints and... GPU Ray Tracing!
https://github.com/onlyuser/dexvt-lite
3d-engine 3d-printer boids ccd delta-robot glsl hexapod inverse-kinematics motion-planning octree path-planning path-tracing ray-tracing robotics stewart-platform
Last synced: about 2 months ago
JSON representation
3D Inverse Kinematics with Constraints and... GPU Ray Tracing!
- Host: GitHub
- URL: https://github.com/onlyuser/dexvt-lite
- Owner: onlyuser
- Created: 2016-09-24T04:28:12.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-05-27T17:24:51.000Z (over 6 years ago)
- Last Synced: 2025-08-21T15:58:52.548Z (about 2 months ago)
- Topics: 3d-engine, 3d-printer, boids, ccd, delta-robot, glsl, hexapod, inverse-kinematics, motion-planning, octree, path-planning, path-tracing, ray-tracing, robotics, stewart-platform
- Language: C++
- Homepage: http://onlyuser.github.io/
- Size: 622 KB
- Stars: 38
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](http://travis-ci.org/onlyuser/dexvt-lite)
3D Inverse Kinematics with Constraints and... GPU Ray Tracing!
==============================================================Copyright (C) 2011-2017
About
-----dexvt-lite is a 3D inverse kinematics and GPU ray tracing tech demonstrator.
It features rovolute joint constraints, prismatic joint constraints, end-effector orientation constraints, and... GPU ray tracing!See sister project demonstrating other engine features: [dexvt-test](https://github.com/onlyuser/dexvt-test)
Algorithm
---------**3D Inverse Kinematics**
Supports rovolute joint constraints, prismatic joint constraints, and end-effector orientation constraints.
The way each constraint type is handled is described below:* Revolute Joint Constraints
* "Non-hinge" joints
1. In each joint's rotation step, rotate on a pivot that aligns the end-effector with the target.
2. Enforce joint constraints in euler space by capping the post-rotation orientation of the adjacent segment to be within the joint's maximal deviation from neutral orientation. Do this for each axis.
* "Hinge" joints
1. In each joint's rotation step, rotate on a pivot that minimizes the distance between the end-effector and the target, all the while staying within the joint's plane of free rotation. Setting non-constraint-violating goals early on avoids most problems described [here](https://stackoverflow.com/questions/21373012/best-inverse-kinematics-algorithm-with-constraints-on-joint-angles).
2. Enforce joint constraints perpendicular to the joint's pivot by squeezing the post-rotation orientation of the adjacent segment to be within the joint's plane of free rotation. This adds numerical stability to the pivot so it doesn't "drift".
3. Enforce joint constraints within the joint's plane of free rotation by capping the post-rotation orientation of the adjacent segment to be within the joint's maximal deviation from neutral orientation.* Prismatic Joint Constraints
* In each joint's translation step, slide the adjacent segment by the maximal extent it can slide within the joint's range of free translation to align the end-effector with the target.* End-effector Orientation Constraints
* In each joint's rotation/translation step, extend the end-effector position by the end-effector orientation offset.**GPU Ray Tracing**
* Supports 4 material types:
* Reflective
* Transparent
* Diffuse
* Glowing* Supports 3 primitive types:
* Spheres
* Planes
* BoxesScreenshots
-----------[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_ik_const.gif?attredirects=0)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_ray_tracer.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_ray_tracer2.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_ray_tracer3.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_ray_tracer4.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_ray_tracer_old.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_ray_tracer_old2.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_boids.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_gimbal_lock.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_hexapod.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_path_hexapod.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_rail.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_path_stewart.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_spider.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_spider_wireframe.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_path_deltabot.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_path_3dprinter.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_path_fanta.png)
[](https://sites.google.com/site/onlyuser/projects/graphics/images/dexvt-lite_path_fanta_wireframe.png)Requirements
------------Unix tools and 3rd party components (accessible from $PATH):
gcc mesa-common-dev freeglut3-dev libglew-dev libglm-dev libpng-dev curl imagemagick
Resource files not included:
resource files
purpose
data/SaintPetersSquare2/posx.png
data/SaintPetersSquare2/negx.png
data/SaintPetersSquare2/posy.png
data/SaintPetersSquare2/negy.png
data/SaintPetersSquare2/posz.png
data/SaintPetersSquare2/negz.png
Cube map texture (6 faces)
data/chesterfield_color.png
Color map texture
data/chesterfield_normal.png
Normal map texture
Make Targets
------------target action
all make binaries
test all + run tests
clean remove all intermediate files
lint perform cppcheck
docs make doxygen documentation
resources download resource files
clean_lint remove cppcheck results
clean_docs remove doxygen documentation
clean_resources remove resource filesControls
--------Keyboard:
key purpose
b toggle bounding-box
f toggle frame rate
g toggle guide wires
h toggle HUD
l toggle lights
n toggle normals
p toggle ortho-projection
t toggle texture
w toggle wireframe
x toggle axis
z toggle labels
up/down pitch
left/right yaw
pg-up/pg-dn roll
home toggle target
space toggle animation
esc exitMouse:
mouse-button + drag purpose
left orbit
right zoomReferences
----------
- "Setting up an OpenGL development environment in Ubuntu Linux"
- http://www.codeproject.com/Articles/182109/Setting-up-an-OpenGL-development-environment-in-Ub
- "OpenGL Programming"
- http://en.wikibooks.org/wiki/OpenGL_Programming
- "Tutorial - Getting Started with the OpenGL Shading Language (GLSL)"
- http://joshbeam.com/articles/getting_started_with_glsl/
- "Cube Maps: Sky Boxes and Environment Mapping"
- http://antongerdelan.net/opengl/cubemaps.html
- "3D C/C++ tutorials - OpenGL - GLSL cube mapping"
- http://www.belanecbn.sk/3dtutorials/index.php?id=24
- "Skyboxes using glsl Version 330"
- http://gamedev.stackexchange.com/questions/60313/skyboxes-using-glsl-version-330
- "Rioki's Corner - GLSL Skybox"
- http://www.rioki.org/2013/03/07/glsl-skybox.html
- "How would you implement chromatic aberration?"
- http://gamedev.stackexchange.com/questions/58408/how-would-you-implement-chromatic-aberration
- "How do you calculate the angle between two normals in glsl?"
- http://stackoverflow.com/questions/338762/how-do-you-calculate-the-angle-between-two-normals-in-glsl
- "Chapter 7. Environment Mapping Techniques"
- http://http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter07.html
- "Humus Cube Map Textures - Colosseum"
- http://www.humus.name/index.php?page=Textures
- "Kay's Blog Texture and game development freebies! - Well Preserved Chesterfield"
- http://kay-vriend.blogspot.tw/2012/11/well-preserved-chesterfield.html
- "Philip Rideout's OpenGL Bloom Tutorial"
- http://prideout.net/archive/bloom/
- "An investigation of fast real-time GPU-based image blur algorithms"
- https://software.intel.com/en-us/blogs/2014/07/15/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms
- "mattdesl/lwjgl-basics - ShaderLesson5"
- https://github.com/mattdesl/lwjgl-basics/wiki/ShaderLesson5
- "Jam3/glsl-fast-gaussian-blur - glsl-fast-gaussian-blur"
- https://github.com/Jam3/glsl-fast-gaussian-blur
- "john-chapman-graphics SSAO Tutorial"
- http://john-chapman-graphics.blogspot.tw/2013/01/ssao-tutorial.html
- "Know your SSAO artifacts"
- http://mtnphil.wordpress.com/2013/06/26/know-your-ssao-artifacts/
- "songho.ca OpenGL Projection Matrix"
- http://www.songho.ca/opengl/gl_projectionmatrix.html
- "3D MeshWorks"
- http://www.jrbassett.com
- "Missing gtc/constants.hpp #12"
- https://github.com/g-truc/glm/issues/12
- "Kinematics (Advanced Methods in Computer Graphics) Part 4"
- http://what-when-how.com/advanced-methods-in-computer-graphics/kinematics-advanced-methods-in-computer-graphics-part-4/
- "alfanick's inverse-kinematics repo (ccd.cpp)"
- https://github.com/alfanick/inverse-kinematics/blob/master/ccd.cpp
- "Best Inverse kinematics algorithm with constraints on joint angles"
- https://stackoverflow.com/questions/21373012/best-inverse-kinematics-algorithm-with-constraints-on-joint-angles
- "Real-Time 3d Robotics UI (Python)"
- https://coreykruger.wordpress.com/programming-and-scripting/462-2/
- "Anand's blog - GPGPU In Android: Load a texture with floats and read it back"
- http://www.anandmuralidhar.com/blog/tag/gpgpu/
- "Ray-Plane and Ray-Disk Intersection"
- https://www.scratchapixel.com/lessons/3d-basic-rendering/minimal-ray-tracer-rendering-simple-shapes/ray-plane-and-ray-disk-intersection
- "Ray-Sphere Intersection"
- https://www.scratchapixel.com/lessons/3d-basic-rendering/minimal-ray-tracer-rendering-simple-shapes/ray-sphere-intersection
Keywords
--------
3D inverse kinematics (cyclic coordinate descent), forward kinematics, rovolute joint constraints, prismatic joint constraints, end-effector orientation constraints, GPU ray tracing