Commit Graph

74 Commits

Author SHA1 Message Date
Erwin Coumans
5517cbc4e0 add segmask_linkindex.py example using p.getCameraImage(320,200,flags=p.ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX)
to extract object unique id and link index from segmentation mask in getCameraImage
2017-12-28 12:37:07 -08:00
Erwin Coumans
afd1066c50 pybullet.getCameraImage: preparation to expose link index in segmentation mask buffer 2017-12-28 10:18:35 -08:00
Michel Breyer
8257429964 Fix error discarding fragments in our_gl 2017-11-17 14:49:12 +01:00
Erwin Coumans
4d803c104b #include <string.h> // for memcpy 2017-10-06 14:04:43 -07:00
Erwin Coumans
26d32f2aa8 improve loading performance of large textures:
option to disable tinyrenderer, use p.configureDebugVisualizer(p.COV_ENABLE_TINY_RENDERER,0)
also make sure to use p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,0) before loadURDF, and enable rendering afterwards using p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,1)
reorder 2 loops, making the flip texels twice as fast (cache coherency),
single memcpy of entire texture in tinyrenderer, instead of per-pixel copy (memory layout is the same)
add lots of B3_PROFILE timings, to see where time is going
2017-10-06 13:46:24 -07:00
Erwin Coumans
9213f944f1 add kukaCamGymEnv.py with camera observations (preliminary)
show camera position in example browser
disable per-vertex and per-fragment profile timings
2017-06-21 09:33:46 -07:00
Erwin Coumans
8c6d4a4c85 also initialize near/far for depth shader in TinyRenderer 2017-05-26 09:45:26 -07:00
Erwin Coumans
723b356667 also discard pixels in front of nearplane 2017-05-25 19:55:55 -07:00
Erwin Coumans
2b9c67b07c TinyRenderer: discard pixels beyond farplane
pybullet: printf build date/time
2017-05-25 17:25:14 -07:00
Erwin Coumans
7cb763e4c8 don't render objects with zero alpha color (RGBA) 2017-05-13 07:38:00 -07:00
yunfeibai
c938e42a19 Optimize tinyrender by precompute matrix multiplication in vertex shader. 2017-05-09 14:11:01 -07:00
yunfeibai
28de699e70 Add back face culling based on world space coordinates. 2017-05-09 13:49:13 -07:00
yunfeibai
e363e12ea4 Add default specular when there is not specular map. Add example for adjusting specular coefficient. 2017-05-07 21:09:08 -07:00
yunfeibai
56f9c38226 Use float when clipping the shadow map index, because the index before clipping can be out of the range for int. 2017-04-25 18:28:56 -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
c3cc53d5aa TinyRenderer, apply backface culling 2017-04-13 11:06:38 -07:00
Erwin Coumans
82b576a390 fixed a bug that prevented kitchens/1.sdf to render properly (local scaling was double applied)
disable some left-over clipping that was moved to another part of the code
2017-04-06 21:13:23 -07:00
Erwin Coumans
d6125ecb8c fix in tinyrenderer clipping logic 2017-04-06 17:43:40 -07:00
Erwin Coumans
deb95c758b TinyRenderer: implement triangle clipping against near-plane
TinyRenderer: implement texture UV-repeat by default (instead of clamp(0,1))
2017-04-06 14:31:34 -07:00
Erwin Coumans
c0c4c8ba3f fix many warnings
remove btMultiSapBroadphase.*
make collisionFilterGroup/collisionFilterMark int (instead of short int)
2017-01-15 22:26:11 -08:00
erwincoumans
0c26fee04d Merge pull request #886 from erwincoumans/master
some VR tweaks and bugfix for issue #878
2016-12-11 12:53:47 -08:00
yunfeibai
4af7ee3b2e Fix a bug when rendering texture. 2016-12-09 17:17:24 -08:00
yunfeibai
388cba152e Fix error in integration test. 2016-12-07 11:41:55 -08:00
yunfeibai
9c4222ea9e Modify shader so that the color of the light and the shadow don't affect the ambient component. 2016-12-07 11:33:26 -08:00
yunfeibai
c253c750b9 Expose ambient, diffuse and specular coefficient of the light. 2016-12-06 15:21:35 -08:00
yunfeibai
08b449f149 Adjust magic number to prevent z-fighting. 2016-12-06 13:36:41 -08:00
erwincoumans
e5aea04e23 add back the 'swapBuffers' in VR demo (slightly lower performance, but easier to use demo.
fix issue related to TinyRenderer shadowbuffer API change
2016-12-02 13:23:50 -08:00
yunfeibai
a88272de1b Restore the old constructor for TinyRenderObjectData for backward compatibility. 2016-12-01 16:47:11 -08:00
yunfeibai
e8ff969a6f Merge remote-tracking branch 'upstream/master' 2016-11-29 14:17:38 -08:00
yunfeibai
b40c9cde96 Add torus shadow render example. 2016-11-29 13:50:49 -08:00
yunfeibai
8aa90a7427 Refactor shader and render pipeline code. 2016-11-29 12:53:50 -08:00
yunfeibai
86c5dfe8f4 Fix the light color issue in box rendering example. 2016-11-29 11:43:52 -08:00
yunfeibai
5fe36ca200 Clean global variables. 2016-11-29 11:11:41 -08:00
yunfeibai
d48b03f23b Use the barycentric coordinate to get the coordinate in shadow buffer. 2016-11-28 10:13:09 -08:00
yunfeibai
0bc4e0a4c3 Render multiple objects with shadow. 2016-11-27 16:53:15 -08:00
yunfeibai
529274a3f4 Render shadow of torus with shadow buffer and index from triangle order. 2016-11-27 15:32:55 -08:00
yunfeibai
29809a4471 Render depth buffer. 2016-11-23 13:00:26 -08:00
Erwin Coumans
ca71b84913 fix uninitialized m_lightColor (see ExampleBrowser/Rendering/TinyRenderer, Software was black. 2016-11-21 22:33:23 -08:00
yunfeibai
24b3e137a6 Render shadow with depth from light. 2016-11-21 10:21:14 -08:00
yunfeibai
5be4409a1a Render shadow buffer. 2016-11-21 09:13:20 -08:00
erwincoumans
0d5dcb3cc5 setDebugObjectColor 2016-11-21 07:42:11 -08:00
yunfeibai
93ba8af023 Add shared memory API to change light color. 2016-11-20 12:52:12 -08:00
erwincoumans
36b144ffa6 Merge pull request #769 from iwilkes1/master
Add Phong reflection to TinyRenderer
2016-09-21 08:14:18 -07:00
Erwin Coumans
f9679bd594 prevent an issue in TinyRendererSetup example 2016-09-14 00:30:58 +01:00
erwincoumans
4944aca28b Update our_gl.cpp 2016-09-06 13:26:08 -07:00
Ian Wilkes
2336be02e4 Added Phong refelction to the TinyRenderer Shader. 2016-09-02 11:56:03 -07:00
Ian Wilkes
ba583feb7f Updated TinyRenderer intensity paramater.
Switched from ranging from 0 to 1 - ambient to -1 * (1-ambient) to (1-ambient).
2016-09-02 11:56:03 -07:00
erwincoumans
85fd7f560c add first draft of contact point query in shared memory API
b3SharedMemoryCommandHandle b3InitRequestContactPointInformation(b3PhysicsClientHandle physClient);
void b3SetContactFilterBodyA(b3SharedMemoryCommandHandle commandHandle, int bodyUniqueIdA);
void b3SetContactFilterBodyB(b3SharedMemoryCommandHandle commandHandle, int bodyUniqueIdB);
void b3GetContactPointInformation(b3PhysicsClientHandle physClient, struct b3ContactInformation* contactPointData);
Implemented for PhysicsClientSharedMemory, not for PhysicsDirect yet.
Add btCollisionObject::setUserIndex2
2016-09-01 13:30:07 -07:00
Erwin Coumans
17c16ccfa0 pybullet, deal with overflow of joints (maximum of 128 joints/links per multibody at the moment)
increase from 64 to 128 joints in shared memory API/pybullet
fix potential issue in tinyrenderer, related to missing segmentation mask buffer
report error if CMD_REQUEST_ACTUAL_STATE command on a multibody that exceed the number of links,
todo: stream data to allow arbitrary large number of links in shared memory API
2016-08-17 19:35:52 -07:00
Erwin Coumans
238ba8c642 remote a c++11-style constructor 2016-08-12 14:28:02 -07:00