is possible a 3d viewport like sketchfab for C3?

0 favourites
From the Asset Store
3D Car Pack 1
$2.99 USD
3D models + Rendered Low-Poly Cars in isometric, top-down, and side angles.
  • is possible a 3d viewport like sketchfab for C3?

    https://sketchfab.com

    so we can render 3d objects and rotate them and zoom, it will be really helpfull for educational games and a lot of stuff.

  • +1 for this one. Even if scirra don't want to support 3D, it would be nice if 3rd party plugins could have access to GUI and make their own veiwport.

  • 3D viewport gets a big thumbs up from me too!

    A lot of the chemical and electric/magnetic field models I make really benefit from 3D.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • btw THIS IS NOT ASKING FOR 3D!! this is just asking for a 3d viewport that we can just load 3d models like the website Sketchfab.

  • It's possible in c2. The simplest way would be to find a Babylon3d or q3d example that just loads and displays a model, then just load that in the iframe plugin I'd guess. I'm refering to the actual JavaScript libraries and not the plugins.

  • It could be enabled, but even just enabling it comes with some downsides:

    • currently we reduce rendering overhead by omitting Z positions - they're all assumed to be 0. Sending Z positions of 0 with every sprite is extra data and a bit more performance overhead.
    • there's no depth buffer, since we don't need it. Enabling it might make GPUs do more work to redundantly check the depth buffer, when it has no effect, adding a bit more performance overhead.
    • in the past I researched new rendering features like front-to-back rendering, which made use of the depth buffer for optimisation. Using it for 3D could significantly complicate future optimisations along the same lines.

    Having said that, we could possibly have it enabled per layer (so you could for example enable 3D on just one layer, then all 3D content has to appear on that - all other layers are still 2D and are treated as underlay/overlays). But I think it's odd to add a checkbox that says "Enable 3D" when nothing in the editor actually uses that!

  • Having said that, we could possibly have it enabled per layer (so you could for example enable 3D on just one layer, then all 3D content has to appear on that - all other layers are still 2D and are treated as underlay/overlays). But I think it's odd to add a checkbox that says "Enable 3D" when nothing in the editor actually uses that!

    Ashley

    Thank you thank you thank you for looking into this! At some point I am hoping that one of the 3D plugin developers is willing to bring C3 up to feature parity with C2 by porting their plugin over to C3. I'm excited about anything that might make this process easier/better.

    Am I correct in assuming that this "3D-enabled" layer could be used to possibly eventually build a 3D editor in the layout?

  • It's possible in c2. The simplest way would be to find a Babylon3d or q3d example that just loads and displays a model, then just load that in the iframe plugin I'd guess. I'm refering to the actual JavaScript libraries and not the plugins.

    you think is possible to do a plugin using the iFrame for C2? i am actually in the needs of something like this.

  • It could be enabled, but even just enabling it comes with some downsides:

    - currently we reduce rendering overhead by omitting Z positions - they're all assumed to be 0. Sending Z positions of 0 with every sprite is extra data and a bit more performance overhead.

    - there's no depth buffer, since we don't need it. Enabling it might make GPUs do more work to redundantly check the depth buffer, when it has no effect, adding a bit more performance overhead.

    - in the past I researched new rendering features like front-to-back rendering, which made use of the depth buffer for optimisation. Using it for 3D could significantly complicate future optimisations along the same lines.

    Having said that, we could possibly have it enabled per layer (so you could for example enable 3D on just one layer, then all 3D content has to appear on that - all other layers are still 2D and are treated as underlay/overlays). But I think it's odd to add a checkbox that says "Enable 3D" when nothing in the editor actually uses that!

    i was just asking for something like a resizable iframe that loads a 3d object, but a 3d layer would be amazing, it will be really cool just to be able to import 3d objects to C3 and the idea of the "3d layer" its cool.

  • i was just asking for something like a resizable iframe that loads a 3d object, but a 3d layer would be amazing, it will be really cool just to be able to import 3d objects to C3 and the idea of the "3d layer" its cool.

    I've been hoping for something like this as well. Even if you make 2d games, it would be nice with an option to maybe add some small little neat 3D elements. Maybe for the UI, or coins or boxes, cards that can flip with a bit of 3D feel. It doesn't have to be full feature 3D, with shader engine, etc etc... Just the 3D effect. maybe load a simple model in some cases, that you can rotate in more than one axis.

    Or Like when flipping a card. Currently if you want this effect, you would have to pre-render a sprite animation of X amount of frames. For a simple effect like that you would be using a lot of memory budget.

    Even CSS can do these kind of effects. So would be very nice to have it in games HTML5 games as well.

    I'm making my game in 2D isometric, but the characters I would prefer to have in 3D, so I wont be limited by 8 direction pre-rendered sprites. I love 2D but sometimes you just want a little bit of 3D effect, or small 3D objects in games. I'm considering recreating my entire game using Q3D or Babylon plugin, just so i don't have to create 200+frames for each character (several walking, running, death, animations in 8 different directions). But it would be much nicer if there was some support for simple 3D objects. My main issue right now is editing levels in 2D view, using Babylon or Q3D which is a bit of an hassle, since you constantly have to preview to see how things are going to look. Tweak, preview, tweak, preview.

    If it's possible to have a 3D layer, that would be awesome, but even better would be to a 3D object, kind of like sprites, but with one more dimension.

    Anyway, I don't need full 3D support in C2/C3, but at least a better way for the plugin makers to be able to make use of a 3D viewport for editing levels in 3D.

  • i would just love just to render an object and rotate it for educational content

  • Here's demonstration of a way to run some webgl and display the result on a sprite (not minifier friendly):

    https://www.dropbox.com/s/iq4xmleoeqkb1 ... .capx?dl=0

    It may be useful as a base to do what's asked for in the op.

  • Here's demonstration of a way to run some webgl and display the result on a sprite (not minifier friendly):

    https://www.dropbox.com/s/iq4xmleoeqkb1 ... .capx?dl=0

    It may be useful as a base to do what's asked for in the op.

    thats really amazing, i managed to do some changes but just to rotate the object with some keys on the keyboard,

    how do you tell what model to load? i dont see any event that explain to load that cube.

  • The specific code that creates the cube is in the mycode.js file in the project files folder.

    var arrays = {
          position: [1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1],
          normal:   [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1],
          texcoord: [1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1],
          indices:  [0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11, 12, 13, 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23],
        };[/code:3q5ffq96]
    A parser for something like the obj file format would be more manageable.
  • hmmm is there a way to import normal 3d objects? since doing it that way is really really hard.

    but its pretty close to what i am looking for, its really amazing tbh

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)