Jump to content

miko93

Members
  • Posts

    22
  • Joined

  • Last visited

Posts posted by miko93

  1. Rather than creating a new topic, I feel free to jump in here with a related question.

    Anyone got objects (Vec3, in my case) passed between lua and C?

     

    For e.g. int types, I would do like (calling from lua into C)

    lua_register(Interpreter::L, "CalledFromLua", CalledFromLua);
    
    extern "C" int CalledFromLua(lua_State* L)
    {
      int i = lua_tointeger(Leadwerks::Interpreter::L,1)
      CallMyFunc(i);
      return 0;
    }
    

     

    and (calling from C into lua)

    void CalledFromC(int i)
    {
      lua_getglobal(Leadwerks::Interpreter::L, "AFunction");
      if (!lua_isfunction(Leadwerks::Interpreter::L, -1)) { lua_pop(Leadwerks::Interpreter::L, 1); return; }
    
      lua_pushinteger(Leadwerks::Interpreter::L, i);
      if (lua_pcall(Leadwerks::Interpreter::L, 1, 0, 0) != 0)
      { printf("Callback_ClientPosRot ERROR: %s\n", lua_tostring(Leadwerks::Interpreter::L, -1)); return; }
    }
    

     

    But with e.g. Vec3, this seems to be a bit more complicated. Like, using 'userdata' or such things.

    Any hints?

  2. Thanks for your comments. Ah, I see - yeah, keyframe animation is the word. So, I will try to rig that thing and then see how it goes.

     

    For clarification: Yes, I did export with animation and that could be interpreted by UU3D. I did not export again from UU3D and try with LW then afterwards, tho.

  3. Hi Folks,

     

    I have set up a very basic animated model in C4D (R15 in my case) and exported to fbx. It is just a cube spinning on a platform (no rigging or whatnot). Upon LW import, the animation does not show up, tho. It imports well into UU3D and others.

     

    The fbx can be found here: http://www.mikoweb.eu/tmp/LW_Testmodel.zip

     

    Anyone got such animation into LW directly from C4D (R15 in my case)?

    (I know I could/should try using e.g. UU3D or Blender as "middleware", but would love to get it in directly...)

     

    Thanks for your comments.

     

    post-11912-0-71192300-1408885143.png

  4. At least for Windows, I assume LW is using the Win API ShowCursor function.

    See here: http://msdn.microsoft.com/de-de/library/windows/desktop/ms648396%28v=vs.85%29.aspx

     

    This function actually uses a counter, not just switching the cursor on/off. Starting with 0 = mouse ON (!).

     

    Counting through your code:

     

    Program Start: 0

    Call to ShowMouse: 1

    Call to Hidemouse: 0

    Call to ShowMouse: 1

    Call to HideMouse: 0

     

    As Windows hides the mouse with counter -1 and below, it is never hidden - I think.

    If this really is the case, the LW docs might need a bit of updating...

  5. Actually, I have a stub dll test case in place now. Got me the SDK and linked it with a dll which in turn is loaded dynamically at runtime now (or, well, not - as one prefers).

     

    During testing, I noticed that the steam.dll keeps rather passive, as long as the SDK's SteamAPI_Init() isn't called. So, to me, it seems Leadwerks invokes the SteamAPI_Init() not only during a call of Steamworks::Initialize (what I was assuming), but always. If this is correct, some remedy could be achieved by moving the call to Steamworks::Initialize and only execute on demand. No need to fiddle with steam_appid.txt etc then, if a user doesn't call Steamworks::Initialize anyway...

     

    my 2 cents

  6. Just for the fun of it, I played with this dynamic loading idea a bit more. My current WIP can be seen here: http://www.mikoweb.eu/tmp/LoadSteamDll.cpp (it is a console app already retrieving several of the dll's entry points - yet not all).

     

    By now, I believe that directly loading the dll and getting all the proc addresses run-time is not really the way to go. To get all the interfaces and inline code straight, one would probably need to include many parts of the steam header files - which is doubtable in terms of copyright imo. Also, it would be a mess when the Steam SDK is being updated.

     

    What I currently think about is a stub dll, compiled with the Steam SDK as-is. Now this dll would only be loaded run-time if Steamworks::Initialize() is being called. And it would only expose the Leadwerks Steamworks functions. After all, LW is encapsulating the Steam API anyway...

     

    Just FYI...

  7. As I understand, Run-Time Dynamic Linking might do the trick. Only load the dll if Steamworks::Initialize() is being called.

    No need to distribute the steam dll with the engine at all if someone's app doesn't use steam.

     

    All the dll's exposed function call addresses need to be manually retrieved from the dll at runtime, tho (DependencyWalker shows about 59 of them)...

     

    http://msdn.microsoft.com/en-us/library/windows/desktop/ms686944%28v=vs.85%29.aspx

  8. Hi there,

     

    I just got my Leadwerks Std. updated through Steam (stable branch). My existing project needed to be updated through the Project Manager -> Update function. After doing so, I noted the Start.map (where I had added my custom objects) was back to a default state. My objects were gone.

     

    To recreate: Add an "old" Start.map with custom objects to an already converted project, run Project Manager->Update (it shows "1 file updated"), then check the new Start.map.

     

    I believe this is a bug - as it seems to corrupt the updated project?

     

    Thanks for advice

    miko

  9. ...I've spent quite a bit of money on engines and other tools with the high hopes....

     

    Yeah, same here. Think it is natural that it does not always pay out as expected (lots of work put in, then product discontinued etc). The experience of learning something new itself is kinda valuable tho, imho.

     

    As for me, I did go for the LE (steam) C++ edition few days ago. Why so?

     

    Because LE provides exactly what I'm looking for. "Non-sandboxed" C++ programming, focus on PC. As a hobbyist, I don't need - and don't want - to obey to all that mobile mumbo-jumbo (believe me, I DID that for a while - but hate it). Also, I believe that with steam integration, workshop and all, LE makers got some good potential to generate income with assets beside the engine - and that is crucial to company survival (again, imho).

     

    To me, LE seems to have good potential for the future. And it fits to my needs. This is why I spent money and (even more important) am going to invest my personal time. Not saying this is without risk - getting up in the morning and walking outside every day is too, though.

     

    Just my two cents. Your mileage may vary tongue.png

  10. Thank you both for your kind help.

     

    Ah, didn't know about that editor shadow setting, thanks. Same thing still, though (shadow clipping in editor and in running app now checked). The clipping seems to kick in as soon as the objects' surfaces are at distance 1 unit or below (roughly).

     

    Just for the fun of it, I added a directional light (the first one was point) - and uh oh, those shadows are there! Please see here: http://www.mikoweb.eu/tmp/LE_MissingShadow.png

     

    Looks like it might be something point light related. Will make some more checks...

     

    Again, thanks.

    • Upvote 2
  11. SFW, thanks.

     

    As I'm on C++, I added the line to App::Start. Actually, I see the shadow quality improvement. The "shadow clipping" effect is still there, tho. Just nicer now rolleyes.gif

     

    Must be something different, I guess. Maybe the Token model is somewhat screwed - the effect also shows when hovering it over the base brush. Hmmmmm...

     

    // Create a world
    world = World::Create();
    world->SetLightQuality(2); // <--added
    

  12. Hi All. Looks like I've got a "vanishing shadow problem" - well, sort of smile.png

     

    Please have a look at my "Test Board with 2 Tokens". When the tokens are "higher above" the board, I see nice shadowing from the point light (pic1). Now, when moving the Token more down towards the board, the shadow starts to vanish (pic2+3), although there is still quite some distance between the meshes.

    Not sure what causes this - any ideas? Thanks.

     

    post-11912-0-45852600-1398172184.png

     

    post-11912-0-40414000-1398172206.png

     

    post-11912-0-61642000-1398172235.png

×
×
  • Create New...