Commit Graph

20 Commits

Author SHA1 Message Date
Erwin Coumans
1452cae641 * add textured models of ball.vtk (obj/mtl) and torus (obj/mtl) and cloth.
1) allow to render deformables in 'getCameraImage', for TinyRenderer (tested OK) and EGL (untested)
2) allow to have textures for deformables. See deformable_ball.py, deformable_anchor.py and deformable_torus.py for examples
3) deformables: allow to request simulation mesh data (even if there is a render mesh) See deformable_anchor.py for an example usage
   data = p.getMeshData(clothId, -1, flags=p.MESH_DATA_SIMULATION_MESH)
4) fix deletion of deformables, thanks to Fychuyan, https://github.com/bulletphysics/bullet3/pull/3048
5) allow to enable and disable double-sided rendering, p.changeVisualShape(objectUid, linkIndex, flags=p.VISUAL_SHAPE_DOUBLE_SIDED)
6) fix GripperGraspExample, model not found
7) Fix deformable anchor not attaching to multibody with object unique id of 0
8) Fix issue with assignment of unique ids in TinyRenderer/EGL renderer (always use broadphase uid)
9) Avoid crash/issue of simulation with pinned vertices (mass 0) in btDeformableBackwardEulerObjective::applyExplicitForce
10) Store uv/normal in btSoftBody::RenderNode to allow textured meshes
11) (uncomment in btSoftBodyHelpers.cpp): dump vertices and indices in obj wavefront format, when loading a VTK file, for quicker creation of a (textured) surface mesh
12) allow interpolateRenderMesh also for old position-based soft bodies (not only the shiny new FEM deformables)
13) fix a few premake targets
14) update build_visual_studio_vr_pybullet_double_cmake.bat so it suits c:\python37 and installs locally
    for local install of Bullet, see also this example https://github.com/erwincoumans/hello_bullet_cmake
2020-09-12 01:03:04 -07:00
erwincoumans
5e08808e69 Fix issue 1883, OpenGL 2.x doesn't have glGenerateMipmap 2018-12-22 11:42:29 -08:00
erwincoumans
ab8f16961e Code-style consistency improvement:
Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files.
make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type.
This commit contains no other changes aside from adding and applying clang-format-all.sh
2018-09-23 14:17:31 -07:00
erwincoumans
73a4334e30 explicitly remove textures during resetSimulation
move glViewport to Win32Window
2018-02-21 23:22:16 -08:00
erwincoumans
a651cb9ab4 Implement first pass of transparent graphics object for GLInstancingRenderer
remove 'enableBlend' from API, graphics instances use alpha component instead
fix forward axis for SimpleCamera
2017-06-24 13:41:33 -07:00
Erwin Coumans
db008ab3c2 Improve debug text/line rendering, can be use to draw frames and text in local coordinate of an object / link.
example:
kuka = p.loadURDF("kuka_iiwa/model.urdf")
p.getNumJoints(kuka)
pybullet.addUserDebugLine([0,0,0],[0,0,0.1],[0,0,1],trackObjectUniqueId=2,trackLinkIndex=6)
pybullet.addUserDebugText("tip", [0,0,0.1],textColorRGB=[1,0,0],trackObjectUniqueId=2,trackLinkIndex=6)
Also allow to render text using a given orientation (instead of pointing to the camera), example:
pybullet.addUserDebugText("tip", [0,0,0.1],textColorRGB=[1,0,0],textOrientation=[0,0,0,1], trackObjectUniqueId=2,trackLinkIndex=6)
Add drawTexturedTriangleMesh, for drawing 3d text.
Expose readSingleInstanceTransformToCPU, to extract position/orientation from graphics index.
updateTexture: allow to not flip texels around up axis
2017-05-23 22:05:26 -07:00
Erwin Coumans
f80838e989 expose the changeVisualShape RGBA color for TinyRenderer, OpenGL3 renderer. 2017-05-13 09:18:36 -07:00
Erwin Coumans
7cb763e4c8 don't render objects with zero alpha color (RGBA) 2017-05-13 07:38:00 -07:00
Erwin Coumans
a86f584824 more work towards removeBody for C-API/pybullet, work-in-progress. 2017-05-03 21:53:29 -07:00
Erwin Coumans
152e3da3e4 Implementation of virtual void CommonRenderInterface::removeGraphicsInstance(int instanceUid)
for GLInstancingRenderer (OpenGL3+) and SimpleOpenGL2Renderer (OpenGL2)
Refactored the add/remove object pool in Bullet3Common/b3ResizablePool.h
Added CommonRigidBodyBase::deleteRigidBody, also removing its graphics instance.
2017-05-03 17:05:05 -07:00
Erwin Coumans
4759e5a590 tinyrenderer: disable triangle backface culling (doesn't work well, cull triangles that should be visible)
GLInstancingRenderer: allow to set the light position
2017-04-23 07:35:13 -07:00
Erwin Coumans
fffa17dd35 little tuning for rendering 2017-03-28 08:20:10 -07:00
Erwin Coumans
46c5b00964 report actual number of instances (enable sync transforms for physics server) 2017-03-27 23:09:24 -07:00
Erwin Coumans
b9642e8e68 enable base OpenGL2 rendering as fallback for more demos including physics server (use --opengl2 flag in Example Browser), no shadows yet. 2017-03-27 21:42:37 -07:00
erwincoumans
9bad64fed9 allow obsolete OpenGL2 drawer to render with z-up axis. 2016-11-12 11:59:40 -08:00
erwin coumans
02582e3a78 shrink down cube size of BasicDemo 10 times (it looked ginormous in VR) from 2x2x2 meter to 0.2
add test for VR HUD/sub-titles
fix issue in previous commit, partial string use %.8s not %8.s
use long long int in b3Clock
fix warning/error in pointer alignment in serialization
Fix pybullet Windows compilation.
(thanks to bkeys/https://github.com/bulletphysics/bullet3/pull/687)
2016-07-09 15:09:09 -07:00
erwin coumans
60d2b99151 Physics runs in a separate thread from rendering in PhysicsServerExample (preliminary)
Improve rendering performance. OpenVR experience is smooth now.
commit needs a bit more testing before pushing in main repo.
2016-07-07 19:24:44 -07:00
erwin coumans
7ac497d6f2 WIP example for real-time collision detection features of Bullet 2015-10-18 14:01:25 -07:00
erwincoumans
57d8567ca3 more example refactoring 2015-04-16 15:16:13 -07:00
erwincoumans
a1bf9c5556 add initial examples, replacing the 'Demos/Demos3'. Will make it work cross-platform, OpenGL3/OpenGL2 and add more examples to it. 2015-04-16 09:55:32 -07:00