Jump to content

Tower of Babel


Recommended Posts

Hi, I want to use Tower of Babel in my project instead bledner exporter, but i can't implment it. 

File is exported to JS, but after import Mesh i can see this error in console:

Uncaught TypeError: Cannot set property 'SCENE' of undefined
    at defineMaterials (avatar1_animations.js:163)
    at new character (avatar1_animations.js:1441)
    at new Characters (characters.ts:15)
    at e.callback (Simple.ts:30)
    at e.notifyObservers (babylon.2.5.js:2)
    at i._checkIsReady (babylon.2.5.js:11)
    at babylon.2.5.js:11

After read documentation, I include QueuedInterpolation.1.0.min.js file in my project, but sill without success. I am trying with gulp to build JS from TS files, but gulp fail on error:

[21:00:27] Tested 31 tests, 30 passes, 1 failures: FAIL

      throw er; // Unhandled 'error' event
Error: Failed 1 expectations
    at DestroyableTransform.endStream [as _flush] (/home/tomek/Downloads/Extensions-master/QueuedInterpolation/Gulp/node_modules/gulp-expect-file/index.js:90:26)
    at DestroyableTransform.<anonymous> (/home/tomek/Downloads/Extensions-master/QueuedInterpolation/Gulp/node_modules/gulp-expect-file/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:135:12)
    at Object.onceWrapper (events.js:293:19)
    at emitNone (events.js:86:13)
    at DestroyableTransform.emit (events.js:188:7)
    at prefinish (/home/tomek/Downloads/Extensions-master/QueuedInterpolation/Gulp/node_modules/gulp-expect-file/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:450:12)
    at finishMaybe (/home/tomek/Downloads/Extensions-master/QueuedInterpolation/Gulp/node_modules/gulp-expect-file/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:458:7)
    at afterWrite (/home/tomek/Downloads/Extensions-master/QueuedInterpolation/Gulp/node_modules/gulp-expect-file/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:340:3)
    at onwrite (/home/tomek/Downloads/Extensions-master/QueuedInterpolation/Gulp/node_modules/gulp-expect-file/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:330:7)
    at WritableState.onwrite (/home/tomek/Downloads/Extensions-master/QueuedInterpolation/Gulp/node_modules/gulp-expect-file/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:115:5)

Before this error i saw a lot of error like this:

../src/queue/PovProcessor.ts(430,38): error TS4070: Parameter 'd' of public static method from exported class has or is using private name 'BABYLON'.
../src/queue/TimelineControl.ts(24,42): error TS4070: Parameter 'scene' of public static method from exported class has or is using private name 'BABYLON'.


Thanks for help





After changes in generate JS file, mesh started work.

I must delete line TOWER_OF_BABLE.Preloader.Scene  = scene and change function M to _M. But, why file is not generated correctly?


Link to comment
Share on other sites

I have not yet posted a QueuedInterpolation.1.1.js runtime.  Read ahead is a new feature.  1.1 is done-ish, except for:

  • allowing a positionOffset argument to the generated initScene() in the export file.  This allows for an export of one scene to be loaded next to another chunk of scene already present.  Supports read ahead of chunks of scene that are dynamically linked.
  • Re-arrange skeletons in the generated code, so that each use of a skeleton is a fresh copy.  I have never been able to figure out how to get multiple uses of a single skeleton to work in this or the JSON exporter.
  • Getting QI.Automaton to speak. 

The first 2 are in generated code.  Will work on them today, and post a new exporter along with both runtimes,  QueuedInterpolation.1.1.js & TOB-runtime.1.1.js.  The reason for both is to allow using TOB without the animation system.  TOB-Runtime handles Mesh clone factories & read ahead.  If you make a mesh which either has shapekeys or selects one of the mesh grand entrances, then QI must be used though.  TOB-runtime is built into QI file, so you never need both.

Will update this thread when first 2 published, hopefully today.  Speech is takes a lot of time and testing.  Also, there is a particle hair proof of concept that should be avoided.  It really needs to be refactored to be production worthy.

Link to comment
Share on other sites

Ok, the 1.1 runtimes are available along with an update exporter with the changes indicated above.  Also, I noticed one other requirement to use the QI runtime, and that is having a skeleton.  You can still use conventional / frame based animation, but the skeleton inherits from QI.Skeleton not BABYLON.Skeleton.

Back to fiddling with speech.

Link to comment
Share on other sites

  • 2 weeks later...

Today i try to import single object using MeshFactory and i don't know why i get this error: "QI.Skeleton:  body has more than 1 bone without a parent". 

Scene initialized by TOB works great, I have small issues with textures, but I think this is problem with blender.

Link to comment
Share on other sites

Tomas, I have taken a different approach with my extensions.  They proactively perform a lot of validation to inform where things are not as they were expected.  Sort of like the use of assert() in many other languages.  This both documents any design limitation, and helps spot issues that happen later, where it is not obvious what the problem really is. It also means there is less testing in code that actually does something, since problems are blocked up front.

This message is pointing out that you have more than one root bone.  This is going to rule out using QI's bone interpolator at this time.  You may use frame based BABYLON.Animation recorded in Blender though.  It is unusual for many skeletons to have multiple root bones.

Also, I do have an update of TOB coming out probably late today.  On it, there is better clean up for skeletons added onto an override of dispose() in QI.Mesh.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...