Rojo3d. 3D engine for Construct 2

From the Asset Store
Casino? money? who knows? but the target is the same!
  • > > > R0J0hound Hey, i think that the shadow issue in first person is due to camera frustrum making objects behind the camera disappear. Unfortunately it is impossible to set camera near to anything lower than 0.01. Do you think you could this one little tweak? Thx

    > >

    > > Whats the shadow issue?

    >

    > Two issue actually: 1. it flickers 2. It shrinks/expands/disappears depending on the viewing angle/ Now I know it is Z axis related. for shadows created at Z close to camera Z it doesn't happen. There's also a possibility that because of two sided mesh it generates two different shadows being casted from two opposing angles.

    About the flickering:

    I saw that... I didn't test, but I think that if you use rounded rotations it will be 'flikerless', what shadows map configs are you using? I think (3096; Infinty; 0.05) it's pretty good. Also, If you make your game 'higher', I mean, making your player have 300 pixels high instead of 32, for example, it might not even be noticeable.

    About the second issue:

    What??

    But... have you tried moving the light a bit and it's angle, or making the shadows bias higher a little bit?

    I'm working on 16x16 3d grid. Can't make it much larger because of floating point error on large layouts ( and I have quite big map ). Can't remember what to bias it is set, something like 0.03 maybe, best I could set. But the borders do flicker pixels. In general I did correct it to max of my possibilities. It would be nice if we could smooth it out.

    Re resolution, I had to set it to 8k, otherwise it was pretty bad.

  • I'm working on 16x16 3d grid. Can't make it much larger because of floating point error on large layouts ( and I have quite big map ). Can't remember what to bias it is set, something like 0.03 maybe, best I could set. But the borders do flicker pixels. In general I did correct it to max of my possibilities. It would be nice if we could smooth it out.

    Re resolution, I had to set it to 8k, otherwise it was pretty bad.

    Can you post a picture the moment the shadow is 'flickering'?

  • > I'm working on 16x16 3d grid. Can't make it much larger because of floating point error on large layouts ( and I have quite big map ). Can't remember what to bias it is set, something like 0.03 maybe, best I could set. But the borders do flicker pixels. In general I did correct it to max of my possibilities. It would be nice if we could smooth it out.

    >

    > Re resolution, I had to set it to 8k, otherwise it was pretty bad.

    Can you post a picture the moment the shadow is 'flickering'?

    Just fixed it!!

    In runtime.js set shadow auto frustrum to false! Not flickering anymore, nor disappearing. R0J0hound

    MegaMente Br How did you fix your skybox seam?

  • Someone have the LiteTween behavior? I am planning to rebuild almost everything I did, I already did almost everything and acquired knowledge of most 3D things, I am not saying that I became an expert or sort of, I still very 'newbie' to this, but I hope I could do my project even better.

  • Someone have the LiteTween behavior? I am planning to rebuild almost everything I did, I already did almost everything and acquired knowledge of most 3D things, I am not saying that I became an expert or sort of, I still very 'newbie' to this, but I hope I could do my project even better.

    Good. Try sticking to data driven approach, and stay away from functional or inheriting way of doing events. It will a: make it slower, b: make it difficult to change anything later down the line.

    There you go.

    drive.google.com/drive/folders/1IXq2kMz5I6jmv9qd4hQUXIxL8M1Galho

  • R0J0hound When the obj file containing the 2d mesh does not have a value for uv defined, the plugin gives an error saying that it cannot read the value as undefined (reading '0') pointing to code line 1313 column 22 where you get the uv value for be able to load the mesh. The error prevents you from loading the 3d mesh in your plugin.

    I think of 2 solutions, if the value is undefined, set it to zero so the property has a valid value, but I would need to change its code or create an action to set the object's UV before reading, but I didn't analyze the code to see if it would work. of the loaded object or would have to redirect to this value set in another action as a plugin property.

  • Easiest would be to only use obj files with uvs. If I was still working on the plugin I would just add 0,0 for missing uvs and improve the obj loader to give more understandable errors.

    Currently the plugin is on the back burner indefinitely. It is in need of a rewrite and the event system makes things more complicated than they need to be. And finally time and interest isn’t really there at the moment.

  • I was considering moving the project to C for a while, but won't do that at least for now, cause I'm getting more and more done in c2. Still early, just finished slopes generation, and will move on to collisions and then more graphics. Used oil painting for the effect thought this is just experimenting with the look. Cool thing is I can make big levels and still have good performance. Would be nice to have better shadows - I might try and program a replacement with vertex colour, thought not sure if it will work as good as a proper light system.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nice work bro! Is this a '3d default project'? Or are you going to build your game straight up?

    Remember that I was trying to build my own '3d default project'? I stopped for a while, a lot of things happened... But in case I decide to go try again: Did you managed to do 3D SAT collisions?

    I also can see that the top of the mountain is a bit more yellow, did you managed to do lighting too?

    P.S. did you found out how to do skybox? If don't, I may can help you, I am not good at it, but I did one quite good enough

  • Nice work bro! Is this a '3d default project'? Or are you going to build your game straight up?

    Remember that I was trying to build my own '3d default project'? I stopped for a while, a lot of things happened... But in case I decide to go try again: Did you managed to do 3D SAT collisions?

    I also can see that the top of the mountain is a bit more yellow, did you managed to do lighting too?

    P.S. did you found out how to do skybox? If don't, I may can help you, I am not good at it, but I did one quite good enough

    Hey,

    I just finished off terrain collisions. They are not best coded i guess but working perfectly good.

    What's '3d default project'?

    I know how to do skybox. Easiest is to add one more rooj 3d plugin and nd place that new plugin behind the main game plugin. Then create a cube or sphere and set a camera inside it, set it rotation to the same params as the main camera but just without

    moving it.

    The main light and shadows are from "light" object. The green "brightness" is vertex colouring, and depends on noise plugin. Terrain curvature is also from noise, and it generates the tilemap as 3d, as single object.

  • Seems interesting. But can you destroy the ground? I mean, can you 'mine'?

    The '3d default project' is a project that I am trying to do, I thought you had the same idea.

    My objetive was to create a single project that could handle basically almost all 3D games. Practically a premade 3D engine using the plugin and C2 events.

  • Seems interesting. But can you destroy the ground? I mean, can you 'mine'?

    No, no, this isn't going to be a mining game. If I'd be doing a mining game max I could do is 45x45x2 cube map size, because that's the amount of 3d objects before game starts to jitter. Upside of not doing a mining game, and doing terrain my way, is that I can have a map 16kx16k tiles no problem, 4 tilemaps 4kx4k, or 16 tilemaps 1kx1k . Only loading takes time at the beginning of the layout.

    The '3d default project' is a project that I am trying to do, I thought you had the same idea.

    My objetive was to create a single project that could handle basically almost all 3D games. Practically a premade 3D engine using the plugin and C2 events.

    Yeah, a generic project. Don't bother too much about it. I mean, my engine probably could be used for more similar style games, but I am still considering doing a port in C with raylib, but that's after I have this done to certain degree. Doing a generic project might take a long time. What you need is just model and texture loaders and physics. Rest is supposed to be dependant on a project. I have a brain fog recently regarding physics, jumping etc. In the past I've made good jump/fall in older projects but now, i can't get it right.

  • R0J0hound I followed your suggestion and created an else for the code line 1313 error when uv is not defined, as you suggested with the value of: uv.push(0, 0), but this did not inhibit the c2 error alert, but the 3d mesh did not load. but I saw on line 421, that you defined a mesh object and assigned the property mesh.uv = [ 0, 0, //tri 1 1, 0, 1, 1, 0, 0, //tri 2 1, 1, 0, 1]

    What are 2 triangles, shouldn't the same logic be used when a 3d mesh loaded from an obj file is not defined? any other ideas?

  • I only vaguely remember what the code was and haven’t been on my computer in weeks. But let’s see.

    I think I meant that you’d need to add the uvs to the mesh object when loading the obj file. The uv array would need to be 2/3 the length of the verts array to work. And as I recall it first is in a normal js array then that’s put into a typed array to be useable with webgl.

    I still say it’s better/simpler to just open the obj file in a 3d modeler and re-export it with uv’s.

    That other two triangle thing is unrelated. The plug-in draws to a texture and those two triangles make up a quad so that texture can be drawn to the screen.

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