• Content count

  • Joined

  • Last visited

Community Reputation

3255 Excellent

About ongamex92

Personal Information

  • Interests
  1. Looks very cool! I'll check it out!
  2. Day 1 - Do not use physics engines for platformers

    I'm in progress with the same thing, but in 3D. For the slopes(and actually all walkable surfaces) I use the 90 degrees rotated normal of the ground for the waking direction, that way the "walking" velocities are always perpendicular to the ground. Additionally I disable the gravity when the player is grounded. I'm still not happy with my implementation, I will write when I do it correctly.
  3. I do not know a person or a product that does not link with CRT. Starting form small games, 3D DCCs, even some "serious software" uses it. A header and a *.cpp is equally simple to me. #define fpl_globalvar static #define fpl_inline inline #define fpl_internal static #if FPL_API_AS_PRIVATE # define fpl_api static #else # define fpl_api extern This is unnecessary code to me, it doesn't tell much to the reader and these have no functional benefit, actually it is wrong: if I "fpl_globalvar int x;" in a *.cpp this will actually make the variable "private" to that *.cpp, making it inaccessible to other files.
  4. I would just create a simple program that initializes a device and creates and calls a compute shader from a file. Then I would do some "procedural" image generation, nothing fancy starting from : "casting rays from each pixel and intersecting them with s hardcoded sphere in the shader". Otherwise if you're not specifically interested in Graphics APIs. I would start with CUDA or OpenCL.
  5. Glad I could help! Debugging these thing is always tedious!
  6. Yeah it rotates it all the way up: I've compared it against
  7. EDIT: It works on with me I swear I'm having some issues with the gif recording program. The thing lays down, gets up, and then lays again. Hmm it works like intended in my engine. You should double check you skinning perhaps?
  8. Could you share the model? if so I could try it in my importer and check the results? You should check if your quaternion has the same memory layout and meaning as the one in FBX SDK. I really can't remember why I'm using the euler angles. but here is how i convert the rotations form FBX euler angles to my internal quaterion types: const FbxDouble3 fbxRotationEuler = tr.GetR(); const quatf rotation = quatFromFbx(FbxEuler::eOrderXYZ, fbxRotationEuler); // Hmmm. there is a function that returns the euler angles order, I do not know why I've hardcoded the eXYZ... const quatf rotation = quatFromFbx(FbxEuler::eOrderXYZ, fbxRotationEuler); // CAUTION: FBX SDK uses DEGREES this functon expects DEGREES! // Converts an Euler angle rotation to quaternion. quatf quatFromFbx(const fbxsdk::FbxEuler::EOrder rotationOrder, const fbxsdk::FbxDouble3& euler) { const auto make_quat = [](int _1, int _2, int _3, const fbxsdk::FbxDouble3& euler) { return quatf::getAxisAngle(vec3f::getAxis(_3), Deg2Rad( (float)euler[_3] ) ) * quatf::getAxisAngle(vec3f::getAxis(_2), Deg2Rad( (float)euler[_2] ) ) * quatf::getAxisAngle(vec3f::getAxis(_1), Deg2Rad( (float)euler[_1] ) ); }; quatf result = quatf::getIdentity(); switch(rotationOrder) { case fbxsdk::FbxEuler::eOrderXYZ : { result = make_quat(0,1,2, euler); } break; case fbxsdk::FbxEuler::eOrderXZY : { result = make_quat(0,2,1, euler); } break; case fbxsdk::FbxEuler::eOrderYZX : { result = make_quat(1,2,0, euler); } break; case fbxsdk::FbxEuler::eOrderYXZ : { result = make_quat(1,0,2, euler); } break; case fbxsdk::FbxEuler::eOrderZXY : { result = make_quat(2,0,1, euler); } break; case fbxsdk::FbxEuler::eOrderZYX : { result = make_quat(2,1,0, euler); } break; default : { throw FBXParseError("Unknown FBX rotation order!"); }break; } return result; }
  9. You could use a raytracer(V-Ray 30 days trial for example) to create a few reference images and then and use imagemagik to compare the images.
  10. There should be. Later in my code I obtain the node via the cluster: And later I extract the keyframes from "fNodeBone" to load the animation. I do not use any skeletion nodes. I only use clusters to find the vertices, weights and the node that is used to represent the bone.
  11. I really cannot help you with you code but I can paste what I'm using, and it works like a charm so far: For the bind pose(offset) matrix. fCluster->GetTransformMatrix(transformMatrix); fCluster->GetTransformLinkMatrix(transformLinkMatrix); FbxAMatrix const globalBindposeInverseMatrix = transformLinkMatrix.Inverse() * transformMatrix; And then for the keyframes I use: FbxAMatrix const tr = fbxNode->EvaluateLocalTransform(fbxKeyTime); And then I decompose tr using the functions in FbxAMatrix (GetT, GetR, GetS) It works with all the pivots, geometric transfroms, and all that jazzy-stuff.
  12. Collision geometry in FBX (or in general)

    Yeah, one of my question is: how do you compute an object (or even axis) aligned bounding capsule or whatever by a set ot verts?
  13. I've finally gotten the the place where I have to define collision shapes for my 3d models. Currently I only need convex hulls, but I suspect I will need capsules, cylenders, boxes ect... I'm using FBX SDK for importing and converting to my internal format. Currently I'm thinking about a naming convention, so If the name of the node begins with _Special_ConvexHull then this geometry will be the convex hull for the physics and not a renderable mesh. Hulls are fine, but what about a capsule how do I define a capsule? I do not think that there is a such thing as analytic capsule cylinder in FBX? Maybe the *imaginary artist* could create a capsule that is just a triangle mesh and later I would somehow restore the capsule by the defined points(links please, I do not know how to do it :P)? What is you solution for that thing?
  14. Splendid! Thank you!
  15. About Europe outside of Europe

    @alnite I'm from Bulgaria @mikeman I'm not sure if they are still living on the wealthiness of before. The wealthiness was primly food and land to grow the food on. I look at the colonization (correct me if I'm wrong) as just war. The nations on the west needed food and land, and they found a way to get it, If they did not do that they wouldn't be here today, so they kind of did it because of survival reasons. I may be completely wrong about this, but this is how the things were presented to me. My country did that back in the day, they've traveled to a new land and together the local Slavic tribes in order fought for land with the Byzantine Empire. They did this by spilling blood, trying to survive. Chances are, if you are alive today you ancestors killed a lot for you. What I hope that we are a species should learn is that we should not fight each other, and we learn"share the wealth" some how with destroy each other culturally, and the wealth to me is food and land to grow that food. Currently we are very very far from even trying. In my country we've got the "free money" problem too(maybe not on the same scale, as we are a poor country by the European standards), these people usually become trouble makers.