Giter VIP home page Giter VIP logo

Comments (12)

jeertmans avatar jeertmans commented on May 21, 2024 4

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.

hymm avatar hymm commented on May 21, 2024 3

probably not. will reopen.

edit: saw this message #7163 (comment) and thought it was fixed.

from bevy.

bes avatar bes commented on May 21, 2024 2

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.

rmsc avatar rmsc commented on May 21, 2024 1

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.

mockersf avatar mockersf commented on May 21, 2024 1

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.

alice-i-cecile avatar alice-i-cecile commented on May 21, 2024

Complete! See #1927.

from bevy.

mockersf avatar mockersf commented on May 21, 2024

Complete! See #1927.

Not really. It's not possible to render to an image file as the issue was saying

from bevy.

DGriffin91 avatar DGriffin91 commented on May 21, 2024

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.

hymm avatar hymm commented on May 21, 2024

Fixed in #7163

from bevy.

mockersf avatar mockersf commented on May 21, 2024

@hymm does it work in headless mode? this issue was kept for that

from bevy.

DGriffin91 avatar DGriffin91 commented on May 21, 2024

@jeertmans #5550 runs without a window. It may or may not be a helpful reference.

from bevy.

jeertmans avatar jeertmans commented on May 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.