• Advertisement

Alundra

Member
  • Content count

    900
  • Joined

  • Last visited

Community Reputation

2317 Excellent

About Alundra

  • Rank
    Advanced Member

Personal Information

  • Interests
    Programming
  1. Hi, I always was interested into lightmap generation and UV generation (the famous second UV channel). I never found very well doc about it, to generate the lighting and UV correctly, also the lighting has to match the dynamic lighting to be clean. Any links or book chapter or just a discussion there about it ? Thank you !
  2. Hi, I have a behavior tree using a classical design, here the class tree : Behavior Tree Behavior Tree Node -> Task -> Composite -> Selector -> Sequence -> Parallel -> Decorator -> ForceSuccess -> Loop The problem is the Loop Decorator Node, if you loop one node in a composite it has to loop and go to the next node, that mean the composite node has to reset the counter only when all children are processed. What is the best design about that ? The behavior for the reset of the loop decorator is not the same in the parallel, selector and sequence surely. What is the good behavior for each and what is the good design to call the reset on the decorator node ? Also what should return about SUCCESS/RUNNING/FAILED ? Thank you for the help
  3. STB Image

    Hi, Long time ago I had to use FreeImage to replace STB Image because some files failed to load. We are now in 2018 and looks like STB Image never ended to be updated. Is it safe to use STB Image / STB Image Writer nowadays ? Thank you
  4. Hi, I always align memory in my custom array class but I would opinion. Is it really better or not because that ends to have empty memory used too. What is your opinion about it ? Thank you
  5. Hi, I try to solve this but it looks to be a difficult task : Animation 2D Blend Basically the first step is to have a delaunay triangulation to avoid to do the triangle manually, classical delaunay or special cases ? The second task is to set each vertices from the delaunay an animation, I have actually no clue how set them. The last task is then to find the barycentric from parameters to then compute the weight of each animation. Is it possible to have some help about it ? Thank you for the help
  6. Fifth Engine

    Haha, awesome
  7. You can compute the angle using atan2 or dot product which will gives you an angle in [-PI, +PI]. Using this angle you can select the 2 animations and then compute the blend factor of the two. Mirroring is a tricky thing, you have to set the mirror bone + set the mirror axis, mirror the quaternion using that.
  8. For that you can simply have 4 animations : N,S,E,W and then do a blend by direction. For that you can do mirror of animation, but it's a tricky thing to have it working and you also need to do a mirror bone setup to set each mirror bone.   You can do a masked blend to animate the bottom part and animate the upper part, simply combine the pose.
  9. Good point, I simply clicked on the home page and answered.
  10. std is the namespace used for the standard library of c++. Maybe are you doing : using namespace std; If the answer is yes, then I hardly recommend to not do.
  11. it's not clear to me so 3 options : Array of array of int ​std::vector< std::vector< int > > Array of array of int* std:vector< std::vector< int* > > Array of array of array of int std::vector< std::vector< std::vector< int > > > If the size is fixed you can simply do : int* array[10][10] or int array[10][10][10]
  12. Soft Particles Vanishing in the Distance

    You take the depth from the depth map then you put this value in the "DepthValue" param of this function and that converts the value. float depthFromMap = DepthToViewZ( tex2D( DepthMapSampler, depthTex ).r ); To render in the depth map you can avoid the pixel shader, simply use the vertex shader.
  13. Soft Particles Vanishing in the Distance

    You can convert the depth from depth map like that : float DepthToViewZ(in float DepthValue) {   return Projection[3][2] / (DepthValue - Projection[2][2]); } You simply have to use the same projection matrix used to render the depth map. Another solution is to simply store the view-space depth in a render target, but since it's already stored in the depth map, better to use it.
  14. I don't understand this problem of relative transform, since the game object (or actor or scene object or entity ....) has the local transform, it contains a pointer of the parent, so you compute the relative transform with the current parent and when you change the parent you update the local transform. You will only win to move to a component based system if you are not already and then you can have a script component which contains a reference to one script. But you can also do all without script and later add a runtime compile, it can be seen as c++ script at the end.
  15. The dirty flag is something still used nowadays, you have a state to know if local space transform, world space transform or world space matrix needs to be updated. Since the flag is checked then you don't update the transform twice, when you do any update on the transform of the object, you have to set the flag to "needs update" correctly. The object store internally local space transform, when it has no parent, the local space transform is the same as world space transform. About the scene, you can have flat array and move the pointer of the object when you add child/remove child. Another solution is to have flat array for rendering and a root object (or array of root objects). Using the second solution, you update from root to children, the update is not twice. Using the first solution you simply for loop the flat array, the update is not twice.
  • Advertisement