Jump to content

Roland

Members
  • Posts

    2,953
  • Joined

  • Last visited

Posts posted by Roland

  1. I have a model that will have quite a number of animations.

    There is no problem with getting the model with is idle animation into LE2.

    Now I want to add more animations by loading them from GMF files (same Model, same Rig, another animation).

    Those GMF files contains the animaton and the bones (no mesh).

     

    This is what I thought would work with this approach.

    TModel model = LoadModel( "abstract::mymodel.gmf");      // CountAnimations returns 1
    LoadAnimation( model,  "abstract::mymodel@walk.gmf");  // CountAnimations returns 2
    LoadAnimation( model,  "abstract::mymodel@run.gmf");  // CountAnimations returns 3
    // ... more animations...
    
    // Main loop
    Animate( model, AppTime()/30, 1, curAnimation ) ; // where curAnimation = 0, 1, 2
    
    

     

    The only animation that works is the one in the original model file ( curAnimation ).

    I have checked that each gmf-file has a working animation in the ModelViewer and they are all ok

     

    Where is my misstake ?

     

    Thanks

    Roland

  2. Yes Josh. ToLua++ is a program that parses 'cleaned' header files and creates Lua-code from them.

    Does sound scary. It's a bit more work but not much. The cleaned files often just needs some very small corrections

    if any at all. One nice thing is that you can add extra things is those files to solve some things that is hard to do

    in a type LuaBind solution. The price to get more control is just the fact that you have to have a 'cleaned' header copy

    of the C++ header file.

     

    It's now a long time since I used toLua++, but either Lua or toLua++ seems to have changed to much since then.

    My son and I was writing a 3D Engine and like you studied various script languages and came to the solution that

    Lua was the way to go. It was fast, it was used as industry standard by many companys, it was stable.

     

    Then we tried LuaBind and came to the conclusion that it did not work as we intended when it came to C++.

    I now have forgotten the details, but it produced unnecessary code among other small things. There was something

    about the stack usages also which I can't remember right now. Anyway, after having struggling with LuaBind for a while

    we decided to have a look at toLua++ and was very satisfied with the result. It produced faster and simpler code, and also

    gave the opportunity to solve many things that was tricky with LuaBind.

     

    I don't have any samples now. That project died 4 years ago when my son got his own kids and did not have the time for

    the project any more. But our experience was that although LuaBind was very simple to use and produced what it was designed for,

    it did not quite got there when used for game code and C++. Of course this is just my personal view of it but thats was we

    came up to.

     

    I could have a look at produce a simple sample if you need that. Feel free to contact me in such case.

  3. I'm in a standby position right now (making art and tests for my game, those tests are done in another engine).

    But my plan is to be back when LE3 is released and then see how it will work out.

     

    At that point I will not use any kind of wrapper what so ever. I will use C++ straight from Josh headers and go with that.

    The reason for that is simply. I know C++ and has no problems with that, also this way I will be in sync with changes without

    any delays or wrapper errors.

     

    I did abandon the C# LE.NET project as there was only a very few that liked it and used it. To much work for a few users.

    To those few users I apologize (again!), but in fairness I left a very stable C# wrapper source that those users should have no

    problems to update them self. All the tricky parts was done and at that point LE2 was locked for changes or news. So using

    LE.NET for the latest LE2 should be no problem.

     

    Personally I will from now on use Josh headers as this leads to less problems and C++ is a great game development language.

     

    Cheers

    Roland

  4. Yay!

     

    You know, I really think of materials as things that are shared across models, not something unique to a model that should be exported along with it, but I seem to be in the minority on that one.

     

    In fact you are both right and wrong at the same time.

     

    For models which have textures & normalmaps that are unique to the model (not tiled textures) the material is unique to the model

    as in my example (Although the textures in that simple one could have been tiled). In those cases the material could to be something

    thats generated more automatically as in 90% of the cases it is a color-map and a normal-map.

     

    For other models you can use tiled textures which are not unique to the model (like stonewalls etc..). In this case the material could

    be a material thats more generic (like stonewall.mat), which can be applied to different models.

     

    So in my view its two different kind of situations where the materials are used in different way.

     

    ModelMaterial - is unique for a model. Can be autogenerated with some effort.

    TiledMaterial - is a generic material which is non-unique and may be applied to any model

  5. Ok. So its more complicated that one would ever think.

    Thats OK. But how can one handle resources in game with different levels.

    I want all but the player to be free'd up when a level is done and next one is loaded.

    Is there a way to do that ?

  6. Models and textures will be freed when they are no longer in use. If they aren't being freed you have another model or material or something in use that has not been freed.

    OK. So if I run free on every enitity in a scene there will be nothing left allocated then?

  7. I'm seriously thnking about disabling hardware skinning in le3 due to the number of problems people have with it. This issue comes up all the time.

     

    Are there fbx export options in Modo to not save bones?

    No there were no such options. However UU3D solved the problem.

    The pipeline is a bit to much "run this, then run that, and then run this" to be cool.

    But at least it works now

     

    fbx2gmf ? never used it ... as for static meshes I use ADN for materials .. animated I write my own .mats in notepad and use paint.net mainly to convert the textures ..

    Whats ADN?

  8. I know that UU3D works. That's what was suggested and that solved the problem. So far so good.

     

    But still one has to run GenMat, MakeDDS and MaterialEditor for such a simple task. If this was some 'one-time' setup thing

    it would be nothing to mention. But this has to be done each time the model or textures are changed.

     

    If I read this correctly the pipeline is using UU3D for the GMF generation and not Leadwerks own tool.

    Isn't that kind of strange and leads to confusion.

     

    So this is the recommended pipeline then

     

    UU3D to convert FBX to GMF

    MakeDDS for each texture

    GetMat to create materials

     

    fbx2gmf is obsolete ??!!

  9. Thanks for the suggestions.

     

    As there is no settings for 'not' export bones in Modo I loaded the exported fbx into uu3d and disabled bone and animation at GMF export. This worked. Good.

     

    I also tested with the skin shader as suggested but with no success.

     

    Although the UU3D thingy works I really think that such a simple thing as this has an terrible complicated pipeline, from fbx model to gmf. It would be so much better if there was a program that created the material, converted the textures to DDS and made the fbx->gmf conversion in one step. As it is now you have to go through 5 different tools (fbx2gmf, materialeditor, MakeDDS, GenMat, UU3D ) to get things done. Not good at all!

     

    This is absolutely no joy for the user.

  10. Well after more testing, as far as I can tell FreeEntity is a misnomer, it certainly does not free the entity with all its associated "baggage", just a some of it.

    To bad. This makes load new scenes a bit hard to do.

    After a some new scene loads it will lead to having a bunch of non-used memory block allocated.

     

    Of course one must be sure to have free'd up all resources (except the player maybe) between scenes.

  11. Only god knows ( that's Josh :)

     

    But I would be very surprised if it didn't decrement the usage counter

    of all its used resources (textures etc) and same for all its child entities.

     

    The decrement of the usage counter is also just a guess, but somehow there must

    exist such a mechanism so a resource can be used by many entities. The resource

    will the be removed from memory when its usage counter becomes 0.

     

    Much guessing here :)

  12. Hi Guys.

     

    After some thinking I have decided to make C# code generators for Leadwerks.

    There will be two versions.

     

    leSharp which is a C# version of the C-API

    leoSharp which is a C# version of the LEO wrapper.

     

    Both code generators will use the C/C++ headers to create needed C# code.

    This means that you will not need to get the latest code from somewhere,

    just run the code generators on updates and you are done.

     

    You can read more about this in my blog

  13. Roland, if you ever need header updates for your testing or if there is something currrently missing I can provide something for you. I can auto-build you anything you need with TVec, Vector, float[] (it's all just a configuration for me); Leadwerks objects(TCamera, TLight), IntPtr... whatever. I can also provide header files with optional parameter support - currenly I only support VS10, but the old code for VS which doesn't support optional arguments directly should be commented out and available (not required for what you are doing as I believe that code requires VS10).

     

    I don't know how long you'll be playing with C# but at this time I plan on supporting LW 3.x.

     

    Forgot to mention I support command lines (DLL calls) as well as the Interface commands as in the engine.h.

    Hi Bill.

     

    This sounds very interesting.

    I have sent you a message.

  14. Thanks, with this source I found the bug and fix for Camera Project/Unproject:

     

    Camera.cs

    replace this:

    public Vector3 Project(Vector3 position)
    {
    Core.CameraProject(this.Pointer, position);
    return position;
    }
    
    public Vector3 Unproject(Vector3 position)
    {
    Core.CameraUnproject(this.Pointer, position);
    return position;
    }
    

     

    with this:

    public Vector3 Project(Vector3 position)
    {
    float[] p = position.Clone();
    Core.CameraProject(this.Pointer, p);
    return p;
    }
    
    public Vector3 Unproject(Vector3 position)
    {
    float[] p = position.Clone();
    Core.CameraUnproject(this.Pointer, p);
    return p;
    }
    

     

    Thanks...

     

    Now I think we should organize a team to mantain these source somewhere, I am available to support it.

     

    PS: Framework.Terminate() + Engine.Terminate() have been replaced with just Engine.Dispose() ?

     

    I'm also available.

×
×
  • Create New...