• Content count

  • Joined

  • Last visited

Community Reputation

604 Good

About ErnieDingo

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

2637 profile views
  1. Well I did a test run, and the yes, the clearing of the Z Depth was 1.0f, when it should of been 0.0f (as its the back now!). But something weird was happening, my models were rendering back to front (pixel wise) which contradicted my terrain that was rendering the right way. Even shadows after the change worked. Couldnt track the source of the issue, as the models used the same projection matrix. The Z test was just backwards on models only...
  2. Rotating source vector to destination vector (2D)

    Edit, its 2d, what I wrote was 3d.
  3. That's probably the issue! On a side issue, when looking into my stencil state, i realised I haven't been setting it at the start of the frame. So its relying on the default for the driver. That was bad, if anything from this I have found a potential bug.
  4. Definitely been using 32bit for z buffer, no use for stencil in what I have been doing. I swapped the depth, around, and updated the less/greater comparison. But getting no rendering atm. trying a couple of things. will turn off z test all together just to see what happens. Will let you know
  5. Is this only a trick you apply to the Projection matrix? Or is there something more to this? Struggling to comes to terms with the impacts of making this change or where to start. I see Z fighting from afar (thankfully my camera is zoomed in most of the time), so it might not be worth my while in my current project.
  6. Strafe : Air Support

    Still looking through doing this, need an artist to complete it. I do have visions of doing this though.
  7. Strafe : Air Support

    I'm adding in special moves to enhance game play. The angle of light is definitely an issue so i will look into adding something under the plane Shadow contrast i can improve. Make it darker. Definitely be adding in canyons/mountains to restrict the fly zones. Lots to do 😊 definitely be more arcade like.
  8. Strafe : Air Support

    Version 0.70 is up on the page.
  9. Angular Velocity Calculation

    @joej - thanks for the help, i an effective mechanism for ejection working now. Really happy with the result.
  10. Aiming turret (math question)

    Having gone through what you are doing now, around turret aiming, you have identified much of the problem. But you probably need to simplify. There are a number of spaces you need to consider. When I did this, you need to keep local and world space in mind. You calculate your target vector in the world space, but then apply your rotations in local space (hope I can articulate this well enough, im not that good at explaining it!) A) you obviously have a target vector, I like yourself want to calculate that from barrel of the gun. This as you know is executing the matrix mutliplications from base to barrel, that is calculating barrels position. Base/Origin matrix -> First attachment. First attachment to second attachment Second attachment to barrel. You have the location and you then can calculate from that the direction vector to the target point. That's the first bit done. Now, im going to assume that your first attach point rotates in say the X/Z plane. Therefore you need to map our target vector on to that plane. That allows you to set the direction of the connection point on that plane by getting the angle between the reference direction of the model and direction on the X/Z plane. This leaves only the Y component for your 2nd connection point, but you need to base the elevation off the distance in the XZ plane. The key points, because you will probably be a little confused here. I base all my angles to rotate based off the reference direction of the model in relation to the vector in a specific plane, ala YAW for XZ and Pitch in XY. I have working example this in my game ( The Gun turrets follow you on both static and moving models. My code model is a little more complicated as I assign rotation axis on each connection point and it takes account of say moving ships with moving rotating turrets with accurate barrel ejection points. But you get the idea, if you need some help just PM me. I will try and elaborate offline. My models also consider optimal rotation direction, blind spot (gun arc limitations) etc. Edit: I assume your barrel ejection point as a direction Vector, This is key to how I solved my rotation problems.
  11. Angular Velocity Calculation

    This is is effectively what im going to do. Will have to make the assumptions on mass although I have some volume calculations I can add to improve the simulation. I should leverage physics APIs if I really want to simulate this correctly, but I don't think for such a small part of the game its an investment that is really worthwhile. I feel a bunch of rough approximate simulations will do. I have a good estimation of the centre of mass as each component (ala fragment) due to bounding boxes (that will do). Cheers.
  12. Angular Velocity Calculation

    Cheers. It occurred to me reading through the code that is similar to what I'm doing for rotating my model. As you mentioned, the order is also crucial. Im doing this for my spinning out of control plane so the order im using is: Roll pitch yaw It occurred to me in your suggestion to retain the previous position from the last frame, create a delta and divide by the time delta which will give me the best approximate angular velocity. That added to the velocity of the plane should give me am ejection vector of the fragment breaking off. I need to then just simulate air resistance and gravity. Thanks for helping me through this.
  13. Angular Velocity Calculation

    I think my brain is a little fried at the moment and I'm having a hard time expressing some of the maths around angular velocity and calculating a vector in code. I have roll, pitch, yaw and the magnitude of each, I know how far an item is from the centre of rotation. The basics, the further away I am from the centre, the larger the angular velocity vector. So I think that's fine in terms of calculation. I have the position Vector of the point I want to calculate in relation to the centre of rotation. Am I missing anything else I need to do the calculation? If anyone can give me some pointers on approaching this problem. Not solve, happy to walk through it. I'm guessing at the moment, but I assume I should solve vectors for roll pitch and yaw and combine these to create a an unnormalised vector (as the 3 axis in question have a magnitude also) multiplied by magnitude of the distance from the centre. The vector will be obviously in the plane perpendicular to the offset vector? Thanks in advance for you thoughts.
  14. "3D Decals" for roads on terrain.

    Will try and pull together the editor and relevant files. Will post a link though the internal mail.
  15. "3D Decals" for roads on terrain.

    In my piece, there is no z fighting as the backbuffer is separated from the terrain component. So, I dont need to raise it in my function. With my splines, the outer sections are actually for alpha blending I really should just zip up my editor for you to play with.