Jump to content

Guppy

Members
  • Posts

    775
  • Joined

  • Last visited

Recent Profile Visitors

13,554 profile views

Guppy's Achievements

Newbie

Newbie (1/14)

166

Reputation

  1. I'm sorry but that's just wrong. You can do this ever since 2.71 ( current stable is 2.76 ) Baking in general can be a hazzle to set up, this addon (no affiliation) https://cgcookiemarkets.com/all-products/baketool/ Makes it a breeze - I know a lot of people dont like the idea of paying for addons to free software, but unless your time is worthless it paying for it self
  2. If this is on linux what your seeing is to be expected, the bug will hopefully be fixed in the not too distant future
  3. if your moving the camera just 1 px I'd not worry about parallax - more likely rounding errors may mean you end up with 9 identical images. Another solution could be to move the camera closer and do X seperate frames that each fit inside the original view cone - if that makes sense.
  4. I don't see why your messing with camera projection and stitching ( unless you want to make panoramas ofcourse ) Have a look here; http://www.43rumors.com/ft5-e-m5-successor-has-sensor-shift-to-create-up-to-40-megapixel-images-on-the-fly/ Grabbing 9 screen shots shifted like in the above link should take 0.15s with a bit of extra time for post processing But maybe I'm missing something ?
  5. This (free) program can help you make bump / normal / shine / etc maps from photos; http://awesomebump.besaba.com/ The latest version supports loading in you own mesh to display on / calculate from <3
  6. http://www.leadwerks.com/werkspace/blog/138/entry-1288-pushing-complex-lua-tables-from-c/ In the article I do show how to use the function but it's quite easy; (this is from a now abandoned UI kit for Leadwerks C++/Lua ) luaInterface::luaInterface(LeadwerksUI* _gui):gui(_gui){ //ctor typeMap guiObj={ {"loadCore",new luaMemberFunction<luaInterface,&luaInterface::loadCore>(this)}, {"loadLayout",new luaMemberFunction<luaInterface,&luaInterface::loadLayout>(this)}, {"findWidget",new luaMemberFunction<luaInterface,&luaInterface::findWidget>(this)}, {"findWidgets",new luaMemberFunction<luaInterface,&luaInterface::findWidgets>(this)}, {"removeWidget",new luaMemberFunction<luaInterface,&luaInterface::removeWidget>(this)}, {"showMouse",new luaMemberFunction<luaInterface,&luaInterface::showMouse>(this)}, }; luaTable *table=new luaTable(guiObj); table->push(); Leadwerks::Interpreter::SetGlobal("myGUI"); delete table; } This binds member functions to an lua table giving a faux object in lua Breakdown; new luaMemberFunction<luaInterface,&luaInterface::loadCore>(this) luaInterface - class name &luaInterface::loadCore - member function note the format, it's important this pointer to the actual instance you want the member function to be called on - in this case it's "this" because I wanted it to call it's own member functions but it could be any instance of the given class. I thougth about posting the actual functions I used above but they honestly do not make much sense so I cooked up a new one to show you the ropes; int luaInterface::findWidget(lua_State *L){ //I used a single macro for these lines as you need to write them often, I can post if if you like int argc=Leadwerks::Interpreter::GetStackSize(); if ( argc != 1 ) { std::cerr << "Wrong argument count for findWidget" << std::endl; Leadwerks::Interpreter::PushBool(false); //Put a the bool value false on the stack to let the user know he screwed up return 1; //This lets lua know that we returned 1 argument } std::string parameter1= Leadwerks::Interpreter::ToString(1); //or ToBool, etc depending on what parameter you expect. Leadwerks::Interpreter::PushBool(true); /*Look at the source for Leadwerks to figure out what types you can push - you can even return a complex lua table as outlined above */ return 1; /*once again tell lua that how many parameters we returned if you get this wrong you get crashes or memory leaks*/ } int luaInterface::hideMouse(lua_State *L){ assertArgc(!= 0, "hideMouse") //the first 6 lines of the other function rolled into a nice discrete macro //We dont expect any parameters gui->showMouse(false); //you can call any member function of the object even setting variables for later use return 0; //Nor do we return anything - tell lua the stack is empty } It may seem a little daunting at first but once you get the hang of it it's quite easy
  7. It suggests that you either accidentally used uppercase for world (World) or that the variable "world" was not in scope.
  8. & (ampersand if you want to google it ) has 2 functions in C++ When used during declaration of a variable it means said variable is a reference - that is any change made to it is made to the original also; When used infront of an existing variable it takes the address of the object ( effectively turning it into a pointer )
  9. Guppy

    Droid planet

    Not sure why but I'm getting a "serious sam" vibe from that screenshot
  10. It appears that this is due to user error, specifically you apparently need more geometry between smooth shading and hard edges - more on this here http://www.svartberg.com/tutorials/article_normalmaps/normalmaps.html
  11. You cannot have non ASCII characters in the path - this according to the developer is a feature
  12. This is a non issue - you can expose C++ methods to lua, the engine does this each frame already - not at problem If you search the forums and blogs here at leadwerks.com you will find atleast 3 different methods of doing it. If you mean the server code then yeah properly better to keep that in C++, but gameplay logic as such is idealy suited for a high level language such as lua
  13. Adding enemies to Leadwerks comunity project 3: [Work in Progress] Shown in cycles renderer as I'm having a bit of an issue getting it imported correctly into Leadwerks
×
×
  • Create New...