rendering
WarpCPURenderer
¶
Bases: _BaseWarpRenderer
CPU-side renderer for multi-world MJWarp simulation.
Like flygym.rendering.Renderer, frames are rendered from a private copy of the
state of each selected world, with the render geometry recomputed on the CPU.
Source code in src/flygym/warp/rendering.py
WarpGPUBatchRenderer
¶
Bases: _BaseWarpRenderer
GPU-side renderer using MJWarp's GPU batch rendering functionality.
The selected worlds are copied into a separate mjw.Data in which the render
geometry is recomputed (see update_render_geometry_gpu). Rendering cost and
memory therefore scale with the number of rendered worlds, not simulated ones.
Source code in src/flygym/warp/rendering.py
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | |
modify_world_for_batch_rendering(world)
¶
Modify world MJCF model to make it compatible with MJWarp's GPU batch rendering.
This may reduce texture realism.
Modification happens in place. Returns True if any modifications were made, False otherwise.
Note for developers: Check if anything here can be dropped upon new MJWarp releases.
Source code in src/flygym/warp/rendering.py
update_render_geometry_gpu(mjw_model, mjw_data)
¶
GPU counterpart of flygym.rendering.update_render_geometry.