Haroon Qureshi
d1fd11bccd
Refactor SaveScreenshot into a more useful RenderToTexture function.
...
Removes a few unused functions from helpers library.
PiperOrigin-RevId: 846661437
Change-Id: I815ffe1990098dedb71f694af088d85294f9c7de
2025-12-19 03:33:59 -08:00
Haroon Qureshi
522ff1cd80
Allow ImGui uploaded images to be resized or destroyed.
...
PiperOrigin-RevId: 846354598
Change-Id: I86882813ab607945fffc763122248e167be856a8
2025-12-18 11:42:19 -08:00
Sam Haves
b5b654f00c
Correctly handle segmentation and ID_COLOR flag in filament.
...
PiperOrigin-RevId: 846319715
Change-Id: I244ae52c34079b79d3179fafdf6aa506cc89e1ff
2025-12-18 10:14:13 -08:00
Haroon Qureshi
bebdd62943
Allow studio to search for models in predetermined search paths.
...
A future CL will allow users to specify search paths in their settings.
PiperOrigin-RevId: 846240293
Change-Id: I1a1a4027d0fc85004a12fe01a406f50fd929f3e4
2025-12-18 06:32:24 -08:00
Haroon Qureshi
7190bd4912
Add flag for depth rendering.
...
PiperOrigin-RevId: 846203691
Change-Id: I5ec494446bcfc1f7c81536a87dd24f9967973563
2025-12-18 04:36:26 -08:00
Sam Haves
eef71832db
Remove usage of usdImaging tokens to avoid needing to build imaging.
...
PiperOrigin-RevId: 844768270
Change-Id: Iba0a03646e56d9be5accf754f97ec37db8055425
2025-12-15 07:44:18 -08:00
Haroon Qureshi
43bcbb158c
Load last saved GUI configuration on first load.
...
Also save theme to the configuration.
PiperOrigin-RevId: 843710929
Change-Id: I7ce9ce0f026d2cb5f79addf6c16c9b540bf11954
2025-12-12 08:56:53 -08:00
Haroon Qureshi
3da421afaa
First-pass implementation of web-based studio app.
...
PiperOrigin-RevId: 843685213
Change-Id: I2642a21d5573ef548eece0eb9a2c634e4881eec5
2025-12-12 07:42:42 -08:00
Haroon Qureshi
a0a56065e0
Use hex values instead of u8 string literals.
...
PiperOrigin-RevId: 843583709
Change-Id: Ib55cfd472de2f83b0455ebf95f6826c887f6dd70
2025-12-12 01:45:13 -08:00
Haroon Qureshi
e07adc387a
Update themes to differentiate from default dear_imgui themes and add a classic theme that's similar to simulate.
...
PiperOrigin-RevId: 843313013
Change-Id: Id01841097f32a5b01acd8fcf59392a73acad8f27
2025-12-11 11:46:12 -08:00
Haroon Qureshi
87d333c64a
Allow MJB and XML content to be loaded directly.
...
PiperOrigin-RevId: 843180720
Change-Id: Id4f2bf81507b971dfbbf250d775d7fdfc76517df
2025-12-11 05:41:43 -08:00
Yuval Tassa
fe0a11d58d
Change Filament background color to black.
...
PiperOrigin-RevId: 843152096
Change-Id: I2ef87ffffb9cc8662fa6353c6d38f1046f21b34b
2025-12-11 03:56:34 -08:00
Haroon Qureshi
9c1b8d8cfb
Enable font loading for wasm builds.
...
PiperOrigin-RevId: 842627994
Change-Id: I347f79ec668f31a8bbc4d26638a045e29084d715
2025-12-10 02:31:46 -08:00
Yuval Tassa
32d7b87ba7
Improve studio 2D plots
...
PiperOrigin-RevId: 842260702
Change-Id: I4644b69da92b9d015eb2d140b98f68c05d31a222
2025-12-09 08:56:51 -08:00
Haroon Qureshi
7553541b4b
Use public mj_parseXml function.
...
PiperOrigin-RevId: 842245812
Change-Id: I26e1f992f82050a36373ee3a3f2c97c399b4e788
2025-12-09 08:14:32 -08:00
Haroon Qureshi
97eb307ce9
First pass at mjSpec Explorer and Properties windows.
...
Displays the list of bodies and joints from the mjSpec and displays
values for the selected element.
Functionality is very limited and a bit non-intuitive. However, we want
to get this into our users hands to start getting feedback.
PiperOrigin-RevId: 842228895
Change-Id: I2491cd5e0acaf622110e0f6b8406919024d3607a
2025-12-09 07:28:26 -08:00
Haroon Qureshi
925c533580
Move playback speed control to the toolbar.
...
Initialize playback speed based on the model's global.realtime setting.
Adjust layout and tweak colours of the status and tool bars.
PiperOrigin-RevId: 842214796
Change-Id: Iff9cda74178df28a0787693242fee81e011014fc
2025-12-09 06:47:38 -08:00
Yuval Tassa
cc914c9ec7
Modify studio keyboard bindings to conform to MuJoCo API.
...
PiperOrigin-RevId: 842197387
Change-Id: I6ee9b1f5050cb4a8c2f67253f37481c61c91fdbd
2025-12-09 05:53:14 -08:00
Haroon Qureshi
e1e2248925
Internal changes only.
...
PiperOrigin-RevId: 842099953
Change-Id: Ia11feec323504976cdc3e6d7170435b74ed33fcd
2025-12-09 00:18:06 -08:00
Haroon Qureshi
99a90cb649
Don't do GUI rendering when rendering to texture.
...
PiperOrigin-RevId: 842089364
Change-Id: Iaecebdc677e946c7fc618395205097462a56f2d1
2025-12-08 23:44:50 -08:00
Haroon Qureshi
e238b65843
Support both 3 and 4 channel images and use a safer way to assign IDs to images.
...
PiperOrigin-RevId: 841727607
Change-Id: I319db4291ecee27f4ceb7b7e952c6f68e7f8b96d
2025-12-08 05:55:00 -08:00
Haroon Qureshi
fcdacd0690
Fix crash when using image-based textures.
...
Image lights are not normal lights, so use nullptr as a placeholder.
Add checks for nullness when iterating over the lights.
PiperOrigin-RevId: 840695579
Change-Id: I092515ae814523e85f4f5ce87b2bac2241f4ea35
2025-12-05 06:08:13 -08:00
Haroon Qureshi
6e7b2ba4c3
Reuse renderable entity instead of recreating every frame.
...
PiperOrigin-RevId: 840680350
Change-Id: Ie26862f8993c4b1cf071ee867d89bcc8182d3dd2
2025-12-05 05:10:12 -08:00
Haroon Qureshi
f18c9996e6
Allow uploading textures for use with ImGui.
...
PiperOrigin-RevId: 840669528
Change-Id: I7c5854d966dd024cd492953f86bca961cfaf88b8
2025-12-05 04:31:32 -08:00
Matija Kecman
e93786c161
Fix WebGL rendering for the webdemo
...
PiperOrigin-RevId: 840640628
Change-Id: I4bac3bf634e66da01174927bf6096bc1df642e10
2025-12-05 02:39:54 -08:00
Haroon Qureshi
6ed9f2be7a
Removed unused font uploading functionality.
...
Font textures are handled directly through ImGui.
PiperOrigin-RevId: 840259537
Change-Id: I5b6b0dc5d2c1c7066b4a23f0106de34285f40e6c
2025-12-04 08:38:58 -08:00
Haroon Qureshi
5ee8b646f7
Move Style and Layout configuration to shared GUI library.
...
PiperOrigin-RevId: 840246253
Change-Id: Ic4664b62e86e70fd6780cd9eb885978064c5f585
2025-12-04 08:02:16 -08:00
Haroon Qureshi
5f59104877
Properly handle PBR materials where no color texture is provided.
...
In this case, we'll use the mujoco material color which is then multiplied with a white fallback texture.
PiperOrigin-RevId: 840244521
Change-Id: I2134f45dcbaed7db268e5278ca8ac5429488943d
2025-12-04 07:57:24 -08:00
Haroon Qureshi
680e9a6b79
Update studio build script and instructions.
...
Mujoco studio now works on Windows and MacOS.
PiperOrigin-RevId: 840235447
Change-Id: I66d3430d5d994de2eb13ee08ad3051c6c7187e12
2025-12-04 07:27:37 -08:00
Haroon Qureshi
c5cd276e1f
Cleanup model loading flow.
...
Inlines the platform::LoadMujocoModel into the App class which simplifies
the logic and allows us to correctly display loading errors.
Also updates shortcuts:
Load Model (Ctrl+L) -> Open File (Ctrl+O)
Reload Model (Ctrl+R) -> Reload Model (Ctrl+L)
PiperOrigin-RevId: 840232553
Change-Id: I957d29046ae681d2aeb69310c3a2eec64d042d49
2025-12-04 07:20:02 -08:00
Haroon Qureshi
8823e9fedf
Improve imgui texture management.
...
Keep track of all textures and recreate them as needed. This makes imgui
textures robust to render context reinitialization.
PiperOrigin-RevId: 840228061
Change-Id: Ia4ac35ff93a41ac74020f334adc438df4b030f7c
2025-12-04 07:05:14 -08:00
Haroon Qureshi
54070fc71b
Disable bent normals by default.
...
PiperOrigin-RevId: 840216781
Change-Id: Icf24d73939fa138da46e2da7aa69a6574e6f98ec
2025-12-04 06:28:53 -08:00
Sam Haves
a942fd4875
Make filament segmentation shader distinct colors optional.
...
Previously we were computing at material update time a color for the geom based of it's
segid. This made segids unrecoverable from the resulting buffer. With this change
we allow SceneView creators to specify if they want the segmentation buffer to be purely
for visualization with distinct colors.
PiperOrigin-RevId: 840016870
Change-Id: I5920f248ace0901023e6545c7d8dd2b23f9aa397
2025-12-03 19:26:20 -08:00
Tom Power
4a6b9456aa
Set default headlight intensity to zero if there are no physical lights in the scene.
...
PiperOrigin-RevId: 839962392
Change-Id: I086d8135604982c42381a9b49cec53773c7fa362
2025-12-03 16:31:11 -08:00
Sam Haves
8507b62556
Cache the rendering mode used to allow headless segmentation rendering.
...
This also moves the read call into the frame, per the recommendation in the filament documentation. We also don't need to flush and wait for the engine twice, just defer to the end of readPixels.
PiperOrigin-RevId: 839953612
Change-Id: I52205147794440322ca976c52fb4905207c21473
2025-12-03 16:06:39 -08:00
Haroon Qureshi
14513a04c2
Wait until previous render is finished before submitting another request.
...
PiperOrigin-RevId: 839707507
Change-Id: Ib39538540ff6080d197c2ea853b7273cc56084e7
2025-12-03 05:01:44 -08:00
Haroon Qureshi
e409538831
Ensure window scale is initialized on creation.
...
PiperOrigin-RevId: 839699437
Change-Id: I99e477ac49b56726b77389306aec49c895e160fa
2025-12-03 04:29:52 -08:00
Haroon Qureshi
448fc0e4d5
Report the actual GPU framerate rather than the main thread submit rate when using the filament renderer.
...
PiperOrigin-RevId: 838775463
Change-Id: If66644d284a4a9e0263cf31bfbd1785b18e0209b
2025-12-01 08:02:38 -08:00
Haroon Qureshi
9b7134b15b
Add OSX and WIN32 support for getting the native window pointer.
...
PiperOrigin-RevId: 838720433
Change-Id: Id7123bcf456d0c2d32e67b204564fe8c495004cd
2025-12-01 04:57:24 -08:00
Haroon Qureshi
139a5b6494
Rename toolbox to platform.
...
PiperOrigin-RevId: 838701951
Change-Id: I339eafd35d919710cb47bb04e9a8e29f92739513
2025-12-01 03:58:34 -08:00
Haroon Qureshi
fe74ea2e7b
Match definition with declaration.
...
PiperOrigin-RevId: 838682770
Change-Id: I537ae9652dc64a02d2e3de8ddda351102d3cec35
2025-12-01 02:49:18 -08:00
Haroon Qureshi
a7e62a6755
Set visual studio working directory to the bin directory.
...
PiperOrigin-RevId: 838681802
Change-Id: I764809d2145688c8a353907dc599a604ae944d0b
2025-12-01 02:45:53 -08:00
Haroon Qureshi
ea78d83363
Use working directory if no HOME path specified.
...
PiperOrigin-RevId: 838680600
Change-Id: I8869da40042bb0b4edcbfe1e626c3188d0631c5e
2025-12-01 02:42:14 -08:00
Yuval Tassa
8f9250472e
Improve names of Free camera control modes.
...
PiperOrigin-RevId: 837605181
Change-Id: I01b65706fc4f9857df4d025cd3f4587d24ee5af5
2025-11-27 13:34:09 -08:00
Yuval Tassa
2ea403575e
studio: invert mouse scroll direction for camera zoom.
...
PiperOrigin-RevId: 837603911
Change-Id: I193a1abc0a3317aa998e7f82b9ce4b282ae7a913
2025-11-27 13:28:24 -08:00
Haroon Qureshi
5163dfa823
Move UX drawing functions into a shared library.
...
PiperOrigin-RevId: 837528296
Change-Id: I153a000cde424254384cf168606f32f7925ca076
2025-11-27 07:34:51 -08:00
Haroon Qureshi
23825a5bcf
Implement sensor chart.
...
PiperOrigin-RevId: 837498928
Change-Id: I84b5911a44fe60a96b3ef34d514eb39702be7402
2025-11-27 05:38:24 -08:00
Haroon Qureshi
406062efaf
Remove TODO (charts have been implemented).
...
PiperOrigin-RevId: 837151123
Change-Id: Iae37fdf4ed143e0523a1e4244e3a897211a5751b
2025-11-26 09:13:58 -08:00
Haroon Qureshi
9274a0014a
Fix UV scaling.
...
PiperOrigin-RevId: 837147525
Change-Id: If54d069ddb3fec0852f1941788cb03d5604a252f
2025-11-26 09:01:56 -08:00
Haroon Qureshi
c7e0c01e80
Prevent decorative elements from casting shadows.
...
PiperOrigin-RevId: 837112208
Change-Id: I4ecc110eec1a2166df7a07d8bb9ec37df36b7c89
2025-11-26 07:27:41 -08:00