Jump to content

macklebee

Members
  • Posts

    3,946
  • Joined

  • Last visited

Everything posted by macklebee

  1. is the texture DDS? does it have mipmaps? did you make a normalmap for it? and terrain textures dont need you to make material files as the terrain editor is essentially setting up the material file when you are creating the terrain. Edit- ah the base texture... you need to set another texture in one of the available 5 texture layer slots. Then adjust that texture's blendvalue using the slider control... and you should see the basemap start to appear blended in with the terrain texture...
  2. go here and try the evaluation: http://www.leadwerks.com/werkspace/files/file/232-leadwerks-engine-evaluation-kit/
  3. i look forward to Mika making a similar demo that shows the same... using newton and LE2...
  4. so basically these constants that are listed in the viperscout lua script: local suspensionlength=0.2 local springconstant=20.0 local springdamper=150.0 i dont see whats so hard about changing these values until you get something you like... you can even change the object.model's mass just as long as you increase/decrease the tirespeed in the driver.lua file as needed...
  5. yes youre doing something wrong. the dds is a texture. the mat file is just a text file. so its impossible to convert the mtl to dds and the dds to a mat. Post your gmf model with the dds texture and mat file in the PM you sent.
  6. yes essentially im not a professional programmer by any means, but cycling through objecttables every flip seems to be unnecessary waste of cycle time...
  7. DrawImage only scales the texture based on what dimensions you provide. To draw parts of texture, you can either use raw opengl commands like shown in masterxilo's opengl tut or you can just use LE commands. LE commands: 1) Create a separate buffer 2) Draw your image oversized to that buffer using the position and scaling to determine how much is shown in the buffer 3) Use GetColorBuffer on that buffer and draw it on your screen
  8. you dont need uu3d, though it is a wonderful tool. what josh is telling you is to use the correct shader in your material file.
  9. It can be applied as a material via code, but typically a model should already have a texture/material assigned to it from your modeling app. When converted to gmf, you can open the file up with the Modelviewer and look at the Surface Material value. If it says <none> then it usually means you didnt export correctly from your modeling app. If it says something in there (typically the name of your texture), then you have to create a material file of the same name. This material file will tell LE what textures and shader to use for the model. Look at the models that come with the SDK for examples and download/read the User's Guide.
  10. mtl's are just text files that hold information of what texture to use and where, etc... DDS are actual image files just like jpg, tga, bmp, png...
  11. convert what into mat files? mat files are just text files that hold information about textures being used, what shader should be applied, and settings like specular, bumpscale, etc... You can use the material viewer to help make mat files (but it's sometimes buggy) or you can use the genmat executable located in the Tools folder or you can just create the text file yourself with notepad... either way it sounds like you need to familiarize yourself with LE: User's Guide
  12. Try using the LEBuilder.exe in the SDK root. It has an example for C# using the LE.NET.dll.
  13. MeshName() gives the file path. Try using GetEntityKey(entity, "name") to get the submesh name.
  14. its in lua because it was in bmax... its not in the dll i assume because its basic math as i and ken have both shown...
  15. no its not listed as a command but i found it in lua a long time ago by accident when i tried to make my own function as well and used the obvious name for the function, PointDistance()... and i noticed it turned blue in the ScriptEditor as it was recognized... i mentioned it to josh at the time and he didnt seem too concerned about putting it in the wiki / forum docs... i assume since its basic math...
  16. its a rounding error... add this at the top of the script: require("Scripts/math/math") then replace this section of your code with this: dx=Round(GraphicsWidth()/2)--added this dy=Round(GraphicsHeight()/2)--added this MoveMouse(dx,dy)--changed this HideMouse(1) camrotation = Vec3(0) --MAIN while KeyHit(KEY_ESCAPE)==0 do --mouse camera movement gx = Curve (MouseX() - dx,gx,10)--changed this gy = Curve (MouseY() - dy,gy, 10)--changed this MoveMouse(dx,dy)--changed this
  17. uh, are you reloading the scene? LoadScene("abstract::NameOfTheScene.sbx")
  18. PointDistance(p1:TVec3, p2:TVec3) or just do what it is doing and perform the math yourself distance = ( (x1 - x2)^2 + (y1 - y2)^2 + (z1 - z2)^2 )^0.5
  19. well since that code from the switch script does not exist in any of the code that i have since 2.31 - i can only assume that is the old lua code from when LE had multi-state lua instead of single state. so yes - i would assume that code is outdated... as for the object:Reset(), according to the Getting Started with Lua: So it looks like it calls the Reset() when you first place the model into the scene, any time you move the model, or if you hit the Reset Physics button on the toolbar.
  20. free the character/controller ResetFramework() Reload the scene recreate the character/controller that seems to work just fine in the example i am trying... but i am also assuming you are adding the character/controller via the code and its not something that is placed in the scene via an object script...
  21. did you try to put the InitDialog() inside the CreateObject() function like I suggested? And since you never answered the question that I have asked twice now, I am going to assume you are trying to set the material for each stage of an LOD and show you how i would do it. require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function class:InitDialog(grid) self.super:InitDialog(grid) group=grid:AddGroup("LOD Materials") local n for n = 0,CountModelLODEntities(object.model)-1 do group:AddProperty( "mat"..n, PROPERTY_FILE, "Material Files (*.mat):mat" ) end group:Expand(1) end function object:UnlockKeys() local m for m = 0,CountModelLODEntities(self.model)-1 do if self.model:GetKey("mat"..m)~=("" or nil) then GetModelLODEntity(self.model,m):Paint(LoadMaterial("abstract::"..self.model:GetKey("mat"..m))) end end end end
  22. well the code is contained in the "scripts/hooks.lua" file and a description is shown here: Getting Started with Lua
×
×
  • Create New...