Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 06 Oct 2012
Offline Last Active Oct 05 2016 06:39 PM

#5309275 Pre-calculating the normals, ways to do it? C++, OpenGL 4

Posted by on 03 September 2016 - 01:20 AM

Given that I need to perform 
    Normal = mat3(transpose(inverse(model))) * normal;
this per vertex normal to efficiently render a model. My current scenario, is that I am importing a model via assimp, and loading it into a vertex and element buffer object. Having now built the VAO how do I update the normals before I bind the model to be rendered. 
Do I have to use glBufferSubData or glMapBuffer? Is there a simpler solution where I can isolate the model's normals from the rest of the model's VAO within another VAO and use both attribute objects to render the model? Could I maybe create a texture with the pre-calculated normals and pass that?
Am not sure what to do here, any help would be appreciated.

#5141623 What type of colliders and rigidbody set-up to use for animated character in...

Posted by on 24 March 2014 - 12:21 AM

You don't need to use any rigid bodies, or mesh colliders to accomplish what you are trying to do.


Street Fighter like games are usually done with bounding boxes, now based on whether you want 2D or 3D collision, you make the boxes 2D or 3D. In unity just set the 'z' size of a box collider to 0, for 2D and for 3D you can manipulate the z based on how wide your model's appendages are (arms, legs, torso, etc..)


Write a simple AABB collision detection, as your broadphase, and process your animations, action, reactions, based on this result. 


Am not sure but, I guess if you wanted to use forces at exact collision points, you won't have to process your narrow phase, just grab contact point from Unity itself, and you could use rigid bodies, and toggle between isKinematic. But I don't think that's required. 


Street Fighter, and games alike are heavy in terms of their AI, and managing their attack and defensive strikes, with the use of a FInite State Machine (FSM), the responses are handled solely by the animations based on who's hurt box has collided with who's hit box first. 

#5083465 Dynamically Subdivide a Cubic Bezier Curve

Posted by on 06 August 2013 - 12:43 AM



Am trying to build a class in unity to render a cubic bezier curve. I want to be able to add more curves and subdivide a given curve on the fly.


I have tried using the "Vectrosity" plugin but haven't been able to figure out how to dynamically subdivide a given curve.


If any body has any ideas, help please. :)


Thank you for any input.