wonderunit / storyboarder

✏️ Storyboarder makes it easy to visualize a story as fast you can draw stick figures.
https://wonderunit.com/storyboarder
3.22k stars 300 forks source link

Imported Characters disappear #2441

Open AndrewCave1978 opened 1 year ago

AndrewCave1978 commented 1 year ago

The bug does not allow shot generator to retain imported characters after save to board or insert as new board.

  1. Go to 'shot generator'
  2. Click on '+ character'
  3. Scroll down to 'male-female symbol icons' in character properties menu and click on it.
  4. Scroll down to 'select file'
  5. From computer import window click on a glb format 'character' file you have prepared.
  6. Press open.
  7. Character will appear in shot generator.
  8. Then press 'save to board'. Character saves to board perfectly.
  9. Close shot generator.
  10. Open shot generator. Character is gone. Birds eye view map on top left of shot generator still shows character icon but no character present in shot generator.

The bug negatively affects the imported characters whether I 'save to board or 'insert as new board'. See below.

1b. follow steps 1-7 above. 2b. Then press 'insert as new board'. Screen flashes to complete blackness, then within an instant the screen comes back with the character immediately disappeared from shot generator. As above the character saves perfectly to a new board but no character remains in shot generator except for the birds eye view icon map on top left of screen.

Expected behavior I expected that just like the mannequin-like preloaded characters in storyboarder, that imported characters would also remain in shot generator to be adjusted and rearranged into new poses for new scenes in order to develop sequences of shots to complete a proper storyboard. This is crippling my workflow. I really hope someone can help me.

Screenshots

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

audionerd commented 1 year ago

Can you attach an example of a character .GLB file you’ve been using when this bug is observed?

Does this bug still happen even if you use one of the official .GLB files from https://github.com/wonderunit/shot-generator-models?

AndrewCave1978 commented 1 year ago

Hi Eric, I have attached the character file below for you to test on. wizard.glb https://drive.google.com/file/d/14cUBBCKpaZz0HQRsHGM0OHOt_wJ2BXxY/view?usp=drive_web

On Thu, Mar 23, 2023 at 10:26 PM Eric Skogen @.***> wrote:

Can you attach an example of a character .GLB file you’ve been using when this bug is observed?

Does this still happen even if you use one of the official .GLB files from https://github.com/wonderunit/shot-generator-models?

— Reply to this email directly, view it on GitHub https://github.com/wonderunit/storyboarder/issues/2441#issuecomment-1481296884, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6PG2TEV4FI4YHXFFMSHTZLW5RMSVANCNFSM6AAAAAAWFE27BA . You are receiving this because you authored the thread.Message ID: @.***>

AndrewCave1978 commented 1 year ago

I couldn't open any files in that offical glb file catalogue

AndrewCave1978 commented 1 year ago

I have also emailed you a list of both bugs to fix and add on features I was thinking would really be great to have in the software

audionerd commented 1 year ago

Andrew, you can ignore the following details, but I'm putting them here on the GitHub thread for reference.

There’s a workaround for this bug - don't reset the texture on the imported Character’s FaceMesh if there is no texture image. I didn't dig very deep but that seems to fix it in my quick tests.

This same code appears in XR and Shot Explorer so that would have to change, too.

diff --git a/src/js/shot-generator/components/Three/Character.js b/src/js/shot-generator/components/Three/Character.js
index bdd1e62d6..d2929aec3 100644
--- a/src/js/shot-generator/components/Three/Character.js
+++ b/src/js/shot-generator/components/Three/Character.js
@@ -431,7 +431,9 @@ const Character = React.memo(({ path, sceneObject, modelSettings, isSelected, se
     useEffect(() => {
       if(!skeleton) return
       if(!texture) {
-        getFaceMesh().resetTexture()
+        if (getFaceMesh().image) {
+          getFaceMesh().resetTexture()
+        }
         return
       }
       getFaceMesh().draw(texture)
audionerd commented 1 year ago

You said "I couldn't open any files in that official glb file catalogue" -- what happens when you try? For example here's a direct link to the child GLB file:

https://github.com/wonderunit/shot-generator-models/raw/master/characters/essential/child/child.glb

IIRC custom character models have to be created with the same structure as those official models or they'll have problems.

AndrewCave1978 commented 1 year ago

That’s great news! Glad it’s an easy fix!

On Wed, Mar 29, 2023 at 11:29 AM Eric Skogen @.***> wrote:

Andrew, you can ignore the following details, but I'm putting them here on the GitHub thread for reference.

There’s a workaround for this bug - don't reset the texture on the imported Character’s FaceMesh if there is no texture image. I didn't dig very deep but that seems to fix it in my quick tests.

This same code appears in XR and Shot Explorer so that would have to change, too.

diff --git a/src/js/shot-generator/components/Three/Character.js b/src/js/shot-generator/components/Three/Character.js index bdd1e62d6..d2929aec3 100644--- a/src/js/shot-generator/components/Three/Character.js+++ b/src/js/shot-generator/components/Three/Character.js@@ -431,7 +431,9 @@ const Character = React.memo(({ path, sceneObject, modelSettings, isSelected, se useEffect(() => { if(!skeleton) return if(!texture) {- getFaceMesh().resetTexture()+ if (getFaceMesh().image) {+ getFaceMesh().resetTexture()+ } return } getFaceMesh().draw(texture)

— Reply to this email directly, view it on GitHub https://github.com/wonderunit/storyboarder/issues/2441#issuecomment-1487895521, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6PG2TEFMJPFWKHBKU7THT3W6OUBPANCNFSM6AAAAAAWFE27BA . You are receiving this because you authored the thread.Message ID: @.***>

AndrewCave1978 commented 1 year ago

I’m not at my computer right now. So I won’t be able to test that glb file til later this evening. But will let you know how it turns out.

On Wed, Mar 29, 2023 at 11:38 AM Eric Skogen @.***> wrote:

You said "I couldn't open any files in that official glb file catalogue" -- what happens when you try? For example here's a direct link to the child GLB file:

https://github.com/wonderunit/shot-generator-models/raw/master/characters/essential/child/child.glb

IIRC custom character models have to be created with the same structure as those official models or they'll have problems.

— Reply to this email directly, view it on GitHub https://github.com/wonderunit/storyboarder/issues/2441#issuecomment-1487899999, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6PG2THCB66L3T346IV4G6TW6OVB3ANCNFSM6AAAAAAWFE27BA . You are receiving this because you authored the thread.Message ID: @.***>

AndrewCave1978 commented 1 year ago

Hi Eric, I was able to open the child glb file in Shot Generator. It then behaved exactly the same as the wizard glb character file. Disappearing from shot generator in the same way. When I saved it to board it stays, then when I closed SG then reopened it the child character had disappeared. Then when I inserted it as new board it flashed screen black and then disappeared.

Andrew

On Wed, Mar 29, 2023 at 11:38 AM Eric Skogen @.***> wrote:

You said "I couldn't open any files in that official glb file catalogue" -- what happens when you try? For example here's a direct link to the child GLB file:

https://github.com/wonderunit/shot-generator-models/raw/master/characters/essential/child/child.glb

IIRC custom character models have to be created with the same structure as those official models or they'll have problems.

— Reply to this email directly, view it on GitHub https://github.com/wonderunit/storyboarder/issues/2441#issuecomment-1487899999, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6PG2THCB66L3T346IV4G6TW6OVB3ANCNFSM6AAAAAAWFE27BA . You are receiving this because you authored the thread.Message ID: @.***>