Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question Faster AddBlendShapeFrame

Discussion in 'Graphics Dev Blitz Day 2023 - Q&A' started by joshcamas, May 24, 2023.

  1. joshcamas


    Jun 16, 2017
    Recently the editing blend shapes has been made faster via GetBlendShapeBuffer. However, as far as I can tell there is no fast way to AddBlendShapeFrame!

    AddBlendShapeFrame is an extremely expensive call, and since it's all black box it's just a "if you want to add a blend shape frame, you are forced to stall the main thread" issue.

    Are there any plans/awareness on making this function call more efficient, or making it so more of the performance load would be on our end instead of the engine? (Essentially a method that would create the graphics buffer, then allowing us to manipulate over multiple frames/however we desire, and then it can finally be "activated" on the mesh)
    Lars-Steenhoff likes this.
  2. Jebtor


    Unity Technologies

    Apr 18, 2018
    Hey there! We are aware of the fact we are lacking API around blend shapes. Work has not been scheduled to address this as we are focusing on other priorities.

    Personally, I would look into API that gives better CPU access first. The existing blend shape API has a lot of automatic behavior, e.g. it prunes vertices that do not affect the mesh in the blend shape. Which affects the final size of the buffer and thus would have to be taken into account. It is an interesting suggestion to reserve a set buffer size and then populate the data through script. We could explore this too as an improvement.

    Please submit a new idea on our roadmap here if you would like to raise the priority. Add as much details on your use case as you can. This will help us consider your use cases if we decide to make improvements to this area.
    Jaimi and joshcamas like this.