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)
- Update information about ShaderDef's to indicate how to use non-boolean types in code
- the example 2d_gizmos displays too many gizmos on top of each other
- Add `temp:://` `AssetSource` for Temporary Assets
- slerp functions for directions (Vec2 and Vec3) HOT 2
- "smooth_damp" functions for primitives and math structs HOT 4
- Error logs are silently lost if `LogPlugin` is added late. HOT 1
- Inconsistent resolution/segments naming HOT 1
- Provide a way to base Timer on some Time object HOT 2
- Timer and Stopwatch should be explicit about the need to manually tick them
- False positives for Added/Changed on first system run HOT 4
- Gizmos primitives by ref HOT 1
- Simplest possible Bevy app causing console to be full of errors. HOT 13
- `DirX::new` should be more explicit about normalization and have a code example HOT 1
- Failed loading libxkbcommon.so.0 HOT 5
- Multiple cameras results in multiple writes to swap chain HOT 1
- Trait fn returning `impl Fn()` cannot be used as a system when called from generic type HOT 4
- Main branch fails to compile on Rust beta.
- Add a builder API to `LoadContext` HOT 1
- Auto exposure breaks when object is too dark HOT 2
- Very Large Material 2d Mesh diagonal artifact issue 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.