Mikal's Recent Forum Activity

  • I have seen converters/exporters sometimes fail to work perfectly between formats (and also have read about folks having troubles in general between many formats), in particular textures (there seem to be multiple different ways to handle 'materials' beyond just diffuse color between formats and tools.)

    If a glb works in the sandbox, it will very likely work using this plugin (since it's all based on Babylon and Babylon gtlf/glb loader.)

    In general performance could be relatively stable on desktop, but mobile tends to not handle dynamic texture updates from a canvas very well.

  • I see, my suggestion then would be to multiply everything by: PlatformInfo.DevicePixelRatio

  • There _may_ be a bug in the plugin (at least when run in preview).

    In c3runtime/instance.js:

    				self=this;
    

    This line might be overloading C3's use of 'self' at the top level (at least in preview.)

    After commenting out that line and disabling worker mode, the plugin no longer does a black screen (also a suggestion, if you see a black screen open up the browser developer console and check for errors, this is how I debugged and found the worker mode issue and the 'self' issue.)

    Also note that my experience is Corodova based plugins are not functional in C3 preview (since the cordova plugin may not be loaded in a preview environment.) They are functional when built for the target mobile platform (e.g. iOS or Android.)

    I would contact the original plugin author to see if they can help based on this info.

  • Here's a JS library that can do full body pose:

    medium.com/tensorflow/real-time-human-pose-estimation-in-the-browser-with-tensorflow-js-7dd0bc881cd5

    With C3 JS integration, you should be able to load the JS files and use C3 JS scripting to control it and pass back data to C3 events.

  • Quick guess: try turning off worker mode in 'Advanced' Project Settings.

  • If you are talking about Drawing Canvs snapshot, the details are here:

    construct.net/en/make-games/manuals/construct-3/plugin-reference/drawing-canvas

    More specifically look at:

    Expressions:

    PixelScale

    The size of a single canvas pixel in object co-ordinates. See the section Co-ordinate systems above for more information.

    SurfaceDeviceWidth

    SurfaceDeviceHeight

    Returns the current size of the canvas surface in device pixels. These are useful to use when defining a subset area to use in the Save image action.

    The one exception to this is using snapshots to read and write pixel data. In this case snapshot pixels are given in actual pixel co-ordinates rather than object co-ordinates. The PixelScale expression also gives the size of an actual pixel on the drawing surface in object co-ordinates, allowing you to convert between object and pixel co-ordinates.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The glb format supports multiple animations in one file and I have a simple play animation Action that controls which animation plays and switching animations. There is no 'tweening' between animations yet, but that's a natural next step.

    If you want to see Babylon render similar to this addon, load a glb into this online Babylon viewer (allows for selecting of animations also.)

    sandbox.babylonjs.com

    Connect with me on the Construct Community Discord or Twitter (@kindeyegames), if you have models to test. It's still in the experimental stage, but it's interesting to play with.

    Another example with simple light control.

  • I am doing an experiment (in C3) using approach 2. One issue is the time to copy the texture over from the canvas. I am doing something pretty simple focusing on using a model just for a C3 Sprite (e.g. w/o 3D physics, etc.) To handle multiple models, but not do multiple canvases, I used Babylon multi-view to have a separate camera per model, then update the viewports so that they all take up one part of a large canvas. I then transfer the single canvas over as a texture to C3 and use it like a C3 spritesheet to just use the viewport area for each model.

    I also did #4 using Spine's webgl lib (with help from R0J0's insight on how they did that before in C2). It was a lot of trial and error, but in the end worked (though Spine's webgl rendering is definitely simpler than Babylon - Spine is more 2D focused than 3D focused.)

    C3 Babylon experiment:

    construct.net/en/forum/construct-3/general-discussion-7/babylon-3d-model-sprite-156532

  • Thanks!

    The format _should_ be whatever Babylon accepts (gtlf, glb, babylon, obj), but I had to hardwire it for glb for C3 preview mode (since Babylon normally uses file extensions to check format, but in C3 preview mode, the file extensions are obscured due to referencing preview blob urls.)

    The conversion to glb does not seem too bad (there are converters out there.) The one pain I have run into is converting fbx models w/ separate fbx animations to glb. I had to load them into blender, combine them together and then export to glb.

    These are early days for the plugin experiment. In general it's similar to the released C3 Spine plugin that I have been working on, mainly for render/image, but all physics, game logic, behavior would be done in C3 with another sprite that the Babylon Model is 'pinned' to.

    What 3D model formats are you interested in using?

  • I am experimenting with a simple Babylon C3 addon. It renders a number of Babylon animated 3D models in a single canvas and then you can use the models as 2D Sprites in C3. You can zoom in and out of individual models and control the camera and animation for each model. It could be useful for a game like Donkey Kong Country w/ 3D model for the character in 2d platformer world. You can apply effects, z order, layer, rotate etc. similar to a sprite.

    Here's a couple examples:

    Single 3D model, attached to a sprite w/ platformer behavior:

    31 model (each rendered separately w/ separate camera control):

  • You are welcome, it sounds like you came up with a good solution.

    If you are interested in C3 encryption, check out this C3 project from macube:

    drive.google.com/file/d/1gZczxGAyAcZQMlCFbAQCEggiMKlllozw/view

  • It sounds like it's too much work, but if I was worried about easy/simple manipulation of text files I would do some light encrypt/decrypt in C3 (determined hackers would get around this.)

    My plugin is for Steam, so it saves to Steam cloud, not typically good for mobile (I would use Playfab for mobile, but there are many other options out there.)

Mikal's avatar

Mikal

Early Adopter

Member since 22 Apr, 2016

Twitter
Mikal has 103 followers

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x10
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

19/44
How to earn trophies