I’m experimenting with loading multiple rigged characters into my scene file and, for some reason, I seem to have a problem with Firefox. No idea why!
The image below, which is for only one character, describes the issue.
My character exports from Blender 2.93 with @JCPalmer 's fine exporter. I get no warnings, the log file tells me two animation ranges were created (top of image), and both the animation ranges show up in the sandbox and the babylon file. (Top of image).
2 The code I use to get the character into the scene, get the skeleton, and load the two ranges. Nothing fancy - as far as I can tell. The data for each range then sent to the console.
The result from Firefox Developer Tools - the skeleton.name and the range data - one is always “null”. I can change the order the data is obtained and it is always the “idleAction” that returns that “null”.
4, The result from Chrome - it loads fine - no “nulls”.
I have the latest version of Firefox. So why - any thoughts?
When I try to play the animations, I can’t use the “idleAction.from” and IdleAction.to" but I can get the values from the top of the image and just use the numbers. The animation is there but Firefox fails to find the range.
Drove me crazy yesterday
Is it an issue with Firefox or BJS being developed for Chrome? I’ve had other issues with Firefox and BJS lately - a mesh collider not being detected even though the .babylon file had checkCollisions set to true and issues with “walking a path” and the character looking like he was spitting out his teeth at the end of the walk following a StopAllAnimations.
None of this helped by the fact I stabbed my right hand which makes using a PC more difficult. Don’ Ask!
Ok. Good question prep. As this is loaded data, it might good to try to see if the problem occurs during the loading or after (divide and conquer)
If you put in a console.log(skeleton1). You will get an object, which expands. Try to expand _ranges on both. If they are not the same then problem is in the load else probably in the getAnimationRanges(). This assumes you are positive you are loading the same .babylon.
So, again - this sounds like a major issue.
I know that the consoles on different browsers react differently to updated data. I always like seeing this example:
@RaananW : If I may use a quote from Lewis Carroll : "curiouser and curiouser " … It now is working - and I just did one thing - this morning I took @JCPalmer 's suggestion and put in " console.log(skeleton1)".
It worked - I could see both actions and a lot of info about the skeleton, including both the actions. The range that was reporting as “null” now gave the correct data.
I removed that line of code and the data gets reported correctly. So I pushed ahead and added a second character - and it still works (see image)
I have no idea why or what changed since yesterday morning.
This curious affair reminds me of a problem mentioned above with collision detection being ignored in the Blender export to .babylon, but working when I but code in to force it to detect collisions. The problem later disappeared.
Today I notice that the version of BJS is 5.7.0 - not sure what version I had loading yesterday. Also, as an aside, why do I get the stuff in red when I load a .babylon file?
As far as issues going away, try refreshing the page with the shift key down for Firefox, if you get something like this again. I have had issues in the past where I have changed a file, but the older one was loaded.
I have this problem all the time on Quest2 headset, but it is not as easily fixed there. I tend to put a visible change like a color or text display change in code if I suspect it there. If I still do not get it showing up, then I get more drastic, by deleting the tab.
@JCPalmer : Funny, It all started when I updated Firefox 100th update on May 3rd. Now I have to reload all the time with the “Shift” key pressed. Not sure that was an advance, and I don’t know how everyone keeps up with all the different devices out there.
@RaananW the red XML issue appears to be a problem with my local server (EasyPHP). Don’t see them from my webserver.