Rojo3d. 3D engine for Construct 2

3 favourites
From the Asset Store
Casino? money? who knows? but the target is the same!
  • Oh cool. Glad you got it working.

    Actually none of those expressions are Euler angles. That’s the 3x3 orientation matrix. So you could use orientzx, orientzy, orientzz to get a vector of the direction of being faced.

    I work on this in spurts and ray casting has been a request for a while that I’d like to add. Shaders are a cool idea too. But there’s a lot more to it behind the scenes that needs to change and I’d need to settle on a good design.

    I find when making plugins it’s hard to change features without breaking existing capx. But anyways

  • R0J0hound Cool. Maybe you could create those features as addon plugins to your 3d plugin? Would that maybe minimise chances of breaking projects?

  • R0J0hound

    Made a video for you with some shadow issues.

    https://we.tl/t-E611F43BIi

  • And more issues. This time with shadow colour.

    we.tl/t-bDRVymtQVt

    Edit. PS: I get now that shadow colour is set from 0 to 1, right? Would be much better as standard RGB, then I can copy colour from my graphics.

  • One more video presenting the shadow issue

    https://we.tl/t-ogyQthdy9y

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Guess I can’t play mkv files from my phone. Anyways, will look later in the week if I get on my pc.

    I’m going to stick with the 0-1 for color values I think. You can divide values in the range 0-255 by 255 as a easy conversion.

    Depending on the shadow issue you can improve it by adjusting the shadow bias or using a bigger shadow map size. But I’ll see better when I get to watching the file.

  • Guess I can’t play mkv files from my phone. Anyways, will look later in the week if I get on my pc.

    I’m going to stick with the 0-1 for color values I think. You can divide values in the range 0-255 by 255 as a easy conversion.

    Depending on the shadow issue you can improve it by adjusting the shadow bias or using a bigger shadow map size. But I’ll see better when I get to watching the file.

    That's ok. I can manage with 0-1. Shadow map size doesn't fix it much. But I actually incorporated partially this shadow issue in to game art :) Although it would be nice if shadows were smooth. However I'm starting to see need for ray casting to set object's Z on top of terrain. Very important.

    And maybe this will help playfuljs.com/a-first-person-engine-in-265-lines

    And if not raycasting, then maybe some other poly collision trigger. Also, helper boxes that show the size of the 3d object at runtime, so I know if the object match the size of model. Super important to do.

    If you could help me with this now, that would be great. Thank you so much.

  • R0J0hound

    No worries - I'm glad you're still on it.

    megatronx

    Not to sound like a buzzkill, but I don't think you should post pieces of Q3D publicly - it is a commercial plugin.

    In lieu of proper raycasting, since you mention it's for terrain snapping, you could cache height data into an array and do positional interpolation. For anything more 3d, spherical collisions would still be doable...

  • R0J0hound

    No worries - I'm glad you're still on it.

    megatronx

    Not to sound like a buzzkill, but I don't think you should post pieces of Q3D publicly - it is a commercial plugin.

    In lieu of proper raycasting, since you mention it's for terrain snapping, you could cache height data into an array and do positional interpolation. For anything more 3d, spherical collisions would still be doable...

    Ok. Removed. I thought it was abandon were. Anyway, how can I cache data of 3d object in to array?

  • megatronx

    The simplest way, assuming your terrain is a regular grid as seen from the top (only Z values differ) would be to store position or Displacement Point coordinates and z height values of the terrain into a 3-dimensional Array (x=posx/disp point x, y=posy/disp point y, z= z height) and then, on runtime, calculate the position of the player in relation to 4 nearest points on the grid and calculate the player's Z by averaging the 4 Z values based on distance to player.

    I'm suggesting Array for faster lookup but you could also read the point data directly off the distorted Sprite - but in my tests, it's slower than the Array method.

  • FunkY Koval

    Hey, that's an option too. I already solved this problem in another way with only few events. And works 100%.

    However, another option I've tried earlier, and it work pretty well, but only for object that are x,y symmetrical, was to calculate if actor overlapping platform; platform pick highest; set actor.z to platform.z-distance(actor.x,actor,y,platform.x,platform.y)/segmentDepth)* I guess I'd had modify this condition to work for asymmetrical objects using your solution.

    SegmentDepth is the height of the segment of the platform. For example in my projects case it was something like platform.depth/5. However, since my mesh isn't vertically symmetrical, I would have to adjust this number manually across each height, so I ended up working out something else that works now at every height and also has correct Z picking ( and done it last night and was super happy and moving on with the project).

    *PS.And wouldn't it be nice if construct would have such simple scripting feature too? platform pick highest; etc. that would be super fast to program)

  • R0J0hound

    Replying in Chipmunks topic is not available any more so I'm posting here.

    Hello. Last time I got it working with 32 binaries, but with an automated option things aren't working. Here's how I'm setting up col layers. Any idea what I might be doing wrong?

    Thanks!

  • At a glance I’m not super sure what I’m looking at. What’s not working?

    I’m guessing you’re intension is to have the scene divided into 32 z slices and set the layers depending on which ones the object is in?

    In which case I’d say look at your formula and see if it’s doing what you think it should be doing. If it isn’t then I’d say try re-thinking the approach. Best case you just made a typo somewhere.

  • At a glance I’m not super sure what I’m looking at. What’s not working?

    I’m guessing you’re intension is to have the scene divided into 32 z slices and set the layers depending on which ones the object is in?

    In which case I’d say look at your formula and see if it’s doing what you think it should be doing. If it isn’t then I’d say try re-thinking the approach. Best case you just made a typo somewhere.

    Thanks for reply.

    This is to give 32 collision layers to object from family physics, and it checks from 0 to 32. it gives 1 when is in between the bottom of the object (physics.z) and top of the object (physics.z+physics.depth) and GridVert is just variable for vertical grid. Otherwise it adds 0 to the text variable. Then it puts variable in to object variable and the collision layers. There aren't any typos. It just doesn't work. When I display collision layers via text to view, it gives me some weird float number. When I look in to object variables, the variable displays the layers correctly. When I put them in manually in to the plugin however, 32 layers are working. What do you think might be the issue? I remember long time ago that I couldn't get it to work. But almost the same events were used for only 8 layers and it was working, and when I say "alsmost" I mean that they were couple more events that when I looked at them recently I've realized they could be done easier. But those event also didn't accept 32 layers, only 8 I'm thinking maybe I'm missing something, using text var instead of another, or maybe a math function? OR maybe, maybe there's a bug? Or But I don't think I'll figure it out, since I've spent a lot on it already, and I'm out of ideas. Please help pal. It's your plugin and you know how it is working. Thanks.

  • I often forget about how things work in the stuff I make. I’m just decent at figuring it out should I have time and access to a computer to try stuff out. But I haven’t been on a computer for weeks now.

    Anyways I don’t recall what values the the layers parameters take. Is it a number? A hexadecimal string? A binary string? I’d have to check, either by trial and error or looking at the tooltip text that shows up when selecting that field.

    I’m guessing If it’s working for only 8 then it’s in hexadecimal since 8 hexadecimal characters is 32 bits.

    I guess you could build the string up as binary first and convert it over to hex. Or maybe the action lets you supply a number instead of text you could use a number you set with the setbit() expression. I honestly don’t recall though. This is all off the top of my head.

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