Comments (12)
Hello! Is there any update on this?
I would be super interested in being able to use bevy_image_export
in headless more :-)
from bevy.
probably not. will reopen.
edit: saw this message #7163 (comment) and thought it was fixed.
from bevy.
Hello! Would this also cover the case where a pure headless pipeline could be built by outputting to a OpenGL (or Vulkan) texture?
Specifically, I am looking to do something like
-------
Texture --> | Bevy | --> Texture
-------
Where Texture is a native (OpenGL, Vulkan) texture that can be fed into Bevy and then I can get a native texture out of Bevy (I expect there to be some manual wgpu steps involved, too).
I guess wgpu needs to be able to handle native textures in / out (which I don't think it does currently).
So for the Bevy part I think what's most important is to be able to render to a texture (and not be limited to an image on file).
I already have custom, non-Bevy, pipeline doing this, but there are a lot of unsafe { gl::...
calls going on 😅, so getting this all into bevy would be a dream come true.
from bevy.
It definitely does: https://github.com/mrk-its/bevy/tree/render_to_texture and https://github.com/rmsc/bevy/tree/render_to_file.
There are however a few open questions, namely:
- The Camera system expects a WindowId. Maybe change that to an enum to also support a TextureId?
- There is a
Res<Windows>
for WindowId-to-Window mapping, perhaps there should also be one for TextureId-to-Texture? - To me it's not clear how to properly interface with the ECS to move the texture from the GPU to the CPU (possibly also related to #1234)
from bevy.
Nice!
Ideally we would need to have a nice api in Bevy to:
- move data from gpu to cpu
- move data from render app to main app
It could maybe be a more "hardcoded" capture plugin as you have in your example, that could already be useful...
from bevy.
Complete! See #1927.
from bevy.
Complete! See #1927.
Not really. It's not possible to render to an image file as the issue was saying
from bevy.
I made a little example of this awhile back. If it would be helpful, I could update it.
Write code to copy texture data from the gpu to an image file so headless rendering can be verified
Are we looking for an example or a test here?
from bevy.
Fixed in #7163
from bevy.
@hymm does it work in headless mode? this issue was kept for that
from bevy.
@jeertmans #5550 runs without a window. It may or may not be a helpful reference.
from bevy.
Thanks, @DGriffin91! I'll take a look at it when I have some time :-)
I'm quite new to Bevy, so I might reach back to you for questions ^^'
from bevy.
Related Issues (20)
- 3D causes wgpu error spam in console when using GLES HOT 1
- Crash when using Camera2DBundle without HDR + TonyMcMapFace tonemapping HOT 4
- Incorrect UV map used when using Lightmap component HOT 3
- Ability to detect if touch input is available
- Add `EntityMut::components` and `EntityRef` and `EntityWorldMut` equivalent HOT 19
- Add `World::entity_scope` to split the borrow on the `World` by extracting a single entity HOT 1
- ERROR bevy_asset::server: Asset Source 'AssetSourceId::Name(embeded)' does not exist HOT 5
- example `shader_instancing` doesn't work after GPU frustum culling HOT 3
- Emissive materials not displayed properly when imported from gltf files HOT 4
- Asset-Driven Nine Patch
- Main branch fails to compile on Rust beta: unbalanced backticks HOT 3
- Incorrect handling of EntityRef/Mut Queries + Resources resulting in false conflicts HOT 2
- VSCode, Rust-analyzer recompiling issue in 13.2
- The integration of Bevy into iOS/Android apps was broken. HOT 4
- Implement `Reflect` for `Events` type HOT 1
- Compute Task Pool (7)' panicked at crates\bevy_render\src\view\window\mod.rs:365:21: Couldn't get swap chain texture, operation unrecoverable: A timeout was encountered while trying to acquire the next frame HOT 4
- UI: image with Absolute position don't render correctly HOT 2
- use bevy in pop os get "libEGL fatal: DRI driver not from this Mesa build" HOT 1
- AlphaMode::Mask does not work as intended on StandardMaterial Extension when Depth prepass is enabled on the camera HOT 2
- Support WebGL2 and WebGPU in the same WASM file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bevy.