Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

153 Neutral

About lukesmith123

  • Rank
  1. lukesmith123

    Dds DXT version confusion

    I am converting some files to dds and I'm a little confused about which DXT versions of dds I should be using. For diffuse textures with no alpha should I use DXT1(no alpha) ? Also I have normal maps which contain specular maps in the alpha channel. Will DXT3 be poorer quality but smaller file size then using DXT5? Also should I create mip maps for normal map textures or not? thanks so much!
  2. When doing additive blending of two separate animations that run at the same time, should any unused bones of one animation simply remain in the bindpose? For instance when blending a shooting animation with a running animation, should the shooting animations lower body remain in the bindpose?
  3. lukesmith123

    2D AABB Contains

    Thanks for the replies. The area of intersection sum is really useful. I found some good stuff in a book and I think the fastest method when using min/max is separating axis: if (Max.X < B.Min.X || Min.X > B.Max.X) return false; if (Max.Y < B.Min.X || Min.Y > B.Max.Y) return false; return true;
  4. lukesmith123

    2D AABB Contains

    Whats the fastest way to test containment between two 2D AABBs? Also I'm testing for intersections like this: return (Abs(Corners[0].X - B.GetCorners[0].X) * 2 < (Corners[1].X + B.GetCorners[1].X)) && (Math.Abs(Corners[0].Y - B.GetCorners[0].Y) * 2 < (Corners[1].Y + B.GetCorners[1].Y)); if I always need to check for intersections as well as containment is there a better method I could use to check both at the same time more cheaply?
  5. lukesmith123

    Portal visibility culling

    Ah I see. Great answers thanks!
  6. lukesmith123

    Portal visibility culling

    One thing, with the last point you made, would that not be a much slower method than just creating a frustum from the 4 corners in the first place? Also do you have any opinion on whether projecting to screen space vs creating frustums from the portals is faster?
  7. lukesmith123

    Portal visibility culling

    Fantastic thanks so much!
  8. lukesmith123

    Portal visibility culling

    Ok, so would you check the players bounds against all of the cell bounding boxes each frame? or would you need to keep track of the players movement through portals to speed this up? So when you project the corners of the portal into screen space and build a 2D bounding box from them how do you project the objects to screen space and get a 2D box from those? Would you take the corners of the objects bounding box and project them to screen space and then create the smallest 2D box from the 8 corners? Thanks so much for the tips!
  9. I have a couple of questions about portal systems for visibility determination that I couldnt find any info on and I hope somebody here could answer. How do you keep track of which cell the player is currently in? Do you contain each cell in a bounding box? if so, what about cells that aren't box shaped? Also I have read that a good method is to project the portal into screen space and check which objects in the connecting cell are within the 2d bounds of the portal. Could anybody explain how to do this I dont really understand how to project the portal from world to screen space and test collisions with objects this way. thanks,
  10. lukesmith123

    Books on portal engines

    Wow very nice thanks!
  11. Is there any good books on the subject of portals for visibility determination? I'm looking for something that is fairly in depth with example code. I have a few books that mention the subject for example the morgan kaufman collision book but it only skims the topic and doesnt go into detail. thanks
  12. They both look excellent thank you.
  13. Could anybody reccomend any books that cover the subject of calculating lightmaps aswell as radiosity calculation. I've read a few breif articles but I'm really hoping there are some more comprehensive books on the subject with code examples etc. thanks,
  14. Hi, I followed a tutorial in the book 'programming game AI by example' which teaches an introduction to scripting with lua. I'm getting some unexpected memory leaks which I cant understand how they can happen. But as I am very new to lua and luabind I'm guessing that I might be missing something obvious here. I register functions from the statemachine and bot class in the bot class constructor (lua_close is called in the bot class destructor): lua = luaL_newstate(); luabind::open(lua); luaL_openlibs(lua); luabind::module(lua) [ luabind::class_<StateMachine<Bot>>("StateMachine") .def("ChangeState", &StateMachine<Bot>::ChangeState) .def("CurrentState", &StateMachine<Bot>::CurrentState) .def("SetCurrentState", &StateMachine<Bot>::SetCurrentState) ]; luabind::module(lua) [ luabind::class_<Bot>("Bot") .def("one", &Bot::one) .def("two", &Bot::two) .def("GetStateMachine", &Bot::GetStateMachine) ]; luaL_dofile(lua,"lua.lua"); luabind::object states = luabind::globals(lua); if (luabind::type(states) == LUA_TTABLE) { stateMachine->SetCurrentState(states["State_one"]); } And the statemachine class looks like this: template <class entity_type> class StateMachine { private: entity_type* Owner; luabind::object currentState; public: StateMachine(entity_type* owner):Owner(owner){} void SetCurrentState(const luabind::object& s){currentState = s;} void UpdateStateMachine() { if(currentState.is_valid()) { (currentState)["Execute"](Owner); } } void ChangeState(const luabind::object& new_state) { (currentState)["Exit"](Owner); currentState = new_state; (currentState)["Enter"](Owner); } const luabind::object& CurrentState()const{return currentState;} }; Everything works as expected but I am left with 6 memory leaks when I exit the program. Also when I remove the luabind::module code where the classes are registered then the memory leaks dissapear. Does anybody have any ideas? thanks,
  15. lukesmith123

    Rotation Matrix from Vector in DirectX

    EDIT: Ah I realised I had made a stupid mistake elsewhere and the code that I originally posted was fine. Sorry!
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!