Jump to content

tjheldna

Members
  • Posts

    938
  • Joined

  • Last visited

Posts posted by tjheldna

  1. Hi all, just wondering if someone could help me with how to set an animation on a non skinned mesh. So its somthing like moving a box from a to b. The setup in max is fine, however when I import it it dosent move. Is there some sort of shader I need to apply or do I have to use skin for all types of animation?

     

    Cheers!

  2. Hi All,

     

    I need a little direction on how to fade out a model over time, is this done via a shader? or is there some other method? (don't know a whole lot about shaders as of yet).

     

    This would be great for fading out dead characters etc instead of just deleting them as I am doing currently.

     

    Cheers!

  3. Hmm I think I'd need more detail about the project and what the actual game is etc. Being a community project and having plenty to do on my own project it would have to be a game I have an interest in. If that all matches up then i'd probably offer some modelling services for sure. I can code C++ too, it's just my 3D math that is developing. Working on a project like this could help develop my skills further.

     

    What type of game did you have in mind?

  4. The solution of creating a physics body and positioning the coin to the body worked a treat! Thanks DigitalHex! The code for object centre is great to, I have a number of instances where I need that.

     

    I must say as a new comer to this engine, it is so easy to code in compared to others. Really loving this engine.

     

    Thanks again guys!

  5. Hi All,

     

    I just have a few questions about how to do a couple of things in the engine.

     

    1. I have some collectable coins that shoot from a broken prop, thats all cool but I always want the body to be facing upright as they fly out and bounce. Is that possible?

     

    2. How do I get the centre XYZ of a phyics body?

     

    Many Thanks!!

  6. Hi Rick,

     

    Thanks for that. That would be a good way handling the collision callbacks. As I'm just starting out it's good to know these things early.

     

    btw there were a few errors in my code, the editor for some reason some tags were add in when I saved, which i've deleted now.

    Cheers!

  7. I've just been playing around with this. I had pretty much the same problem with the same error.

     

    The callback must be outside of a class I've noticed. I am by no means a master at this, however i have it working with collecting coins in my game. Some of the examples around are a little off, possibly out dated, i dont know.

    just adjust the names to suit.

     

    Here goes...

     

    .cpp file

    //Callbacks
    int _stdcall CoinCollision( TEntity entity0, TEntity entity1, byte* position, byte* normal, byte* force, flt speed )
    {
    Inventory::CoinItem *item = reinterpret_cast<Inventory::Coinitem*>(GetEntityUserData(entity0));
    EntityType(entity0,5);
    TSound sound = LoadSound("Sound/Item/coinPickup.wav");
    EmitSound(entity0, sound, 10.0F, 1.0F, SOURCE_EAX ) ;
    
    Controller *controller = reinterpret_cast<controller*>(GetEntityUserData(entity1));
    //etc etc....
    
    return 0;
    }
    

     

     

    .h file

     

    int _stdcall CoinCollision(TEntity entity0, TEntity entity1, byte* position, byte* normal, byte* force, flt speed );
    

     

     

    Call from a function......

     

    SetEntityCallback(yourEntity ,(byte*)CoinCollision,ENTITYCALLBACK_COLLISION);
    

  8. Hi,

     

    This looks exactly what I'm after for my project and I've almost got this intergrated this into my project. I am however stuck on which I think is the last thing.

     

    When the application is loaded the windows, buttons etc loads, but only the text is showing (widget functionality is working too). Things like the title bar and backgrounds are totally transparent or just not there. I've stepped through the code and looks like its going along the path it should.

     

    Here is the code I'm using to initialise it.

     

    if(gui)gui->draw() is being called right after RenderFramework() in my main loop.

     

    HWND appWindow = FindWindow(0, "Test");
    
    gui =new PFWGui(appWindow, "Fonts/");
    btn = new GuiButton(300,300, "Start New Game", 110, 50);
    window = new GuiWindow(100,100, 200, 200);
    
    window->setBaseColor(0,0,255);
    window->setBackgroundColor(0,0,255);
    window->setBorderColor(255,0,0);
    btn->setBackgroundColor(255,0,0);
    btn->setBaseColor(255,0,0);
    

     

    Could my problem be some project linking issue or something I may have missed while coding?

     

    Thanks in advance!

  9. Hi There,

     

    This is very possible in zbrush. Here are the basic steps, but I can elaborate on any point if you want..

    • Import your low poly into zbrush
    • Make the model higher poly
    • Paint the model using textures, paint etc and get it like you need.
    • UV Map Section: You need to create GUV tiles for the model (you will need to go to your lowest subdivision)
    • Texture Map: Click Create New From polypaint
    • UV Map: Click flip V (This wont look right on your model in zbrush but dont worry this is necessary for xNormal)

    Now you can export the model from ZBrush as an obj, if you have subtools you need to follow the same procedure for each.

     

    As for generating diffuse,ambient occlusion, and normal map I use xNormal. Its a fantastic free program. Basicly the obj files that zbrush export can be too large to import into max, but this program works because it does not have any viewport.

     

    In xNormal Click High definition meshes

    • Assign the mesh exported from Zbrush and then assign the zbrush exported texture to the mesh too (can do multiple at a time) .
    • Click Low definition meshes assign your unwrapped mapped model (as .obj)
    • Play around with the baking options which suit your model. I like to generate a normal map, base texture, and ambient occlusion.
    • Generate your map.

    If all goes to plan, automagicly it renders all of those textures. You can combine the ambient occlustion map with the diffuse in photoshop by...

    • Adding the AO map as a new layer (above the diffuse).
    • Setting the AO map to multiply.
    • Duplicate the AO map if you want deeper shadows.

    I can go into more detail if you need if you have any questions. The way I do it can be time consuming, but I do get the best results this way. This way as well things like seems generally arent an issue, and will also generate an awesome normal maps for you that I would never be able to create manually.

     

    Cheers

  10. Hi All,

     

    I've been working on integrating wxWidgets into my project. I have got as far as being able to create a new wx frame from the project which is cool. However the frame isn't contained within the Leadwerks window which is what I'm after.

     

    I'm not really too sure where to go from here to make that happen? Any pointers or noob examples if possible would be great!

     

    Cheers!

  11. Hi All,

     

    This is my first post so be gentle =). I've been quietly working on Leadwerks for a few weeks now and have managed to source out what I need from the forums with a great deal of success, however I do have a few questions and here is my first..

     

    So my first question is is there some kind of in built linked list feature that I can use in cpp? If not what would be recommended to use? I'll be using it to store groups of entities, inventory etc.

     

    Many Thanks!

×
×
  • Create New...