Rojo3d. 3D engine for Construct 2

3 favourites
From the Asset Store
Casino? money? who knows? but the target is the same!
  • Rojo3d

    A 3D engine for Construct 2.

    Download:

    dropbox.com/s/xar8r765zh8t5uf/rojo3d%20v0.96.zip

    To install extract to this folder on your pc.

    <install path>\exporters\html5\plugins

    Examples:

    dropbox.com/s/kava3i096pf12b0/rojo3d_examples.zip

    dropbox.com/s/ya9hrc78tjkfpjq/rojo3d_05_bilboard_test.capx

    Main Features:

    * obj file loader.

    * load textures from files or sprites.

    * directional light with shading and shadows.

    * fog

    * zbuffer, and it is drawn within c2’s renderer, so you can put stuff in front and behind it on the layout.

    * ability to let you build meshes with events.

    Usage:

    The plugin has its own method of keeping track of objects, meshes and textures via text tags. So you can load any number of textures and meshes, and also have objects share them.

    There are three object tags available by default: “”, “camera” and “light”. Those are the world space, the camera and the directional light. “” can’t be changed, and light ignores position but otherwise they are complete objects. You can also create new objects via an action.

    Each object has position, scale, orientation, mesh, texture, texture rectangle, color, and some settings to tell if it’s affected by fog, shadows, shading or if it’s transparent or a billboard sprite.

    When creating an object you can have it copy another and just modify what you want instead of starting from scratch.

    You can set the position, orientation, and scale. You can also modify those things too.

    When you do the transformations it lets you do stuff relative to other objects with the “relto” parameters.

    Some examples:

    Rojo3d: move “camera” by (0,0,100) relto:””

    Would move the camera’s z by 100 in its world position. But if you wanted more of a move at angle feature you’d do:

    Rojo3d: move “camera” by (0,0,100) relto:”camera”

    Would move the camera forward relative to its own orientation.

    You can also utilize the relto feature to have one object copy the orientation of another:

    Rojo3d: set Euler orientation of “obj1” to (0,0,0) relto: “obj2”

    The idea is you can mostly get the transformation you want without touching trig or complex math.

    Be sure to look at the examples, and check out the actions and expressions. I didn’t cover everything here.

  • thank you!

  • Thank you for this. Something I noticed:

    -no matter how I rotate the light (using Euler orientation command), I can not get any shading. My .obj file has normals defined, its color is white, I set object shading to yes, light color is white, shadow color is black, but the object is always pure white without any visible gradation from light to dark (I'd expect white to black). Changing light color to red, makes the object solid red, so light color is working... Euler angles for "light" are 90,0,0 so I would expect light from the side...

    Even in your "camera and light" example, I see no directional shading...

    Do you have any idea what might be causing this?

  • Oh strange. I’ll have to test a few things to see what’s up. Maybe it’s a difference between webgl1 and webgl2 or something.

  • Hand time to do further testing: ran through Google Chrome, Palemoon (Firefox), Edge and nw.js - all latest versions and all show the issue. My Gfx card is an RTX 2080 running the latest drivers on Win10...

  • Should be fixed now. Try the updated download. I had broke shadows when webgl2 was used.

  • Thank you. Downloaded from the link in the first post - but I'm getting an error message at startup:

    ---------------------------

    HTML5 exporter

    ---------------------------

    Unable to load plugin in 'C:\Construct 2\exporters\html5\plugins\rojo3d\': Javascript exception in file 'edittime.js' line 71: SyntaxError: Unexpected token ;

    Code line:

    AddNumberParam("up z", "vector z", "0";

    Stack trace:

    SyntaxError: Unexpected token ;

    This plugin will not be available in the editor.

    ---------------------------

    OK

    ---------------------------

  • My apologies. That's tested as fixed now. Also added another example.

  • Thank you again - shadowing and lighting work now, but... is Shadow Color alpha inverted? When I give it a value of 1 (should be fully opaque), I get no shadow/shading. When I give it a value of 0, I get shadow/shading at full strength.

  • Ah, good catch. guess I hadn't tested that enough. Should be fixed now, along with some shadow, alpha blending, and shading fixes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can't wait to try this! Looks really fun!

    R0J0hound, great to see you back making magic!

    Many thanks!

  • Rojo3d

    A 3D engine for Construct 2.

    Download:

    https://www.dropbox.com/s/xar8r765zh8t5uf/rojo3d%20v0.96.zip?dl=1

    To install extract to this folder on your pc.

    <install path>\exporters\html5\plugins

    Examples:

    https://www.dropbox.com/s/kava3i096pf12b0/rojo3d_examples.zip?dl=1

    https://www.dropbox.com/s/ya9hrc78tjkfpjq/rojo3d_05_bilboard_test.capx?dl=1

    Main Features:

    * obj file loader.

    * load textures from files or sprites.

    * directional light with shading and shadows.

    * fog

    * zbuffer, and it is drawn within c2’s renderer, so you can put stuff in front and behind it on the layout.

    * ability to let you build meshes with events.

    Usage:

    The plugin has its own method of keeping track of objects, meshes and textures via text tags. So you can load any number of textures and meshes, and also have objects share them.

    There are three object tags available by default: “”, “camera” and “light”. Those are the world space, the camera and the directional light. “” can’t be changed, and light ignores position but otherwise they are complete objects. You can also create new objects via an action.

    Each object has position, scale, orientation, mesh, texture, texture rectangle, color, and some settings to tell if it’s affected by fog, shadows, shading or if it’s transparent or a billboard sprite.

    When creating an object you can have it copy another and just modify what you want instead of starting from scratch.

    You can set the position, orientation, and scale. You can also modify those things too.

    When you do the transformations it lets you do stuff relative to other objects with the “relto” parameters.

    Some examples:

    Rojo3d: move “camera” by (0,0,100) relto:””

    Would move the camera’s z by 100 in its world position. But if you wanted more of a move at angle feature you’d do:

    Rojo3d: move “camera” by (0,0,100) relto:”camera”

    Would move the camera forward relative to its own orientation.

    You can also utilize the relto feature to have one object copy the orientation of another:

    Rojo3d: set Euler orientation of “obj1” to (0,0,0) relto: “obj2”

    The idea is you can mostly get the transformation you want without touching trig or complex math.

    Be sure to look at the examples, and check out the actions and expressions. I didn’t cover everything here.

    Thanks for you don't forget c2 , and your amazing plugin!

    I have some Question about it!

    Whats deffrence between your plugin and outher plugin created before?!

    (and if you can update canvas plugin , thank you! (for example add polygon or some))

  • With the previous plugin, triangle3d, you had to specify what to draw every frame. This one lets you add a bunch of objects, so you only need events to change things. That and this has shadows amongst other features and improvements.

    I’m not working on the canvas plugin anymore, but it already lets you draw polygons in the same way html5 canvas let you as I recall.

  • After using the plugin for some time, I have a bunch of feature requests, if feasible:

    • Can we have a per-object opacity parameter which is multiplicative with the texture alpha (like object color-object texture)
    • Is it possible to have different transition modes for objects? ATM, I can only think of Additive and Multiplicative...
    • Can we have the ability to add an emissive texture to the object? Besides artistic possibilities, it would allow faking localized light sources...
    • More light types please. An Omnidirectional light even without shadow casting to complement the existing Directional one would be great
    • Right now, loading texture from Sprite is not a live link - it will only load the texture at the time of issuing the command - is it possible to make an option to make it a live link? That way, one could set timing/looping of animated sequences in the Sprite and just link those. Currently, I'm working around this by setting object texture once, and updating the texture under that tag every tick.
  • Hi.

    1. There is per object color, and the color has alpha. Is that what you’re after? When an object is transparent you need to turn on “transparent” in the object settings so it draws things in order.

    2.

    I’m not sure what you mean by transition modes. Can you clarify?

    3.

    I can see that being useful. Right now we use only a diffuse texture and color which is pretty simple. I’d like to make the shading model more deluxe when I work on that.

    4.

    Yeah, even in my tests the directional light isn’t enough.

    Adding more lights and light types is something I’m interested in attempting.

    5.

    I won’t be making that a live link at this time. Using the sprite condition “on frame changed” is a decent solution at the moment.

    Thanks for your interest.

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