Jump to content

macklebee

Members
  • Posts

    3,946
  • Joined

  • Last visited

Everything posted by macklebee

  1. What are you doing different with the material system?
  2. Export model to fbx to project folder and leadwerks will automagically convert to MDL format. Create material from diffuse, normal, specular, etc textures and shaders to apply to MDL model.
  3. well look what the cat dragged in! long time no see, stranger! hope all is well,
  4. good to know - without that info about your own function it makes people guess at the problem. when you say the entity that cannot be found is a Box are you referring to a CSG created box or an actual model that has been imported? Because like Aggror has asked/implied about twice now: if that entity is a CSG created box that you made in the LE world editor and you do not have the mass set greater than 0 or a lua script attached, then that CSG brush will be collapsed into one object with all the other mass-less, script-less CSG objects in the world which would prevent you from finding it via the "name" key. If for some reason this is an imported model or you have set mass or script to a CSG created box, then I would suggest posting an example map and sample code so others can try to replicate the issue.
  5. App:FindEntity("EndAsdfgwg") why are you doing App:FindEntity()? shouldn't it be 'world:FindEntity()' since you went to the trouble of finding the current world and thats the title of your topic? And are you for some reason still using the very depreciated app.lua scripting?
  6. I remember a similar issue that baffled many a person years ago with a inherent LE2 underground tunnels prop that prevented the player from moving over a very small bump on the floor. The height of it should have not caused the player any issues moving over it. What it turned out to be was that if you zoomed way in to see the profile of this small bump, its face angled in such a way that the player controller was interpreting the face as a slope too great for the controller to climb.I think the fix was to clean up the angle and it seemed to work properly after that. Edit - if memory serves there was another issue with one of the underground tunnels props as well where a particular corner of the tunnel prop had alot of geometry all happening in a very small - almost pin size- area. So when a controller would walk over it, it would randomly sligshot the controller all over the room. Anywho - my suggestion is to check the model especially if you are building your physics shape off of it. I would suggest keeping the physic shapes as simple as you can.
  7. A free polygon reducer is called meshmixer - typically used for prepping models for 3d printing - but i have found it works great for reducing the polygon count while maintaining control over the quality of the shape.
  8. You did not make a Leadwerks material like mentioned and linked to above. To make a material, right click on the imported texture and select 'Generate Material'. Double-click the new material and add your textures and shaders to the material and save. Once you have the material created and you have imported the model into LE, double-click the model and it will open the Leadwerks Model Editor. You can attach your material to the model under the listed surface in the mesh hierarchy tab. See the tutorials about models and materials: https://www.leadwerks.com/learn?page=Tutorials_Editor_Materials https://www.leadwerks.com/learn?page=Tutorials_Editor_Models-and-Animation Suggest you read all of the official tutorials as there is a lot of useful information available.
  9. Post the model with textures and the LE material you made for it or all we can do is randomly guess what the solution to your problem may be. Edit - my random guess is that either the model is being saved without an UV map or you havent created your LE material properly. https://www.leadwerks.com/learn?page=Tutorials_Editor_Materials
  10. Well, you can do an alpha mask by simply making the holes in the texture full alpha and using an inherent alpha-related shader. Look at how the textures for leaves are done to see an example or the section regarding custom shaders in the Materials tutorial: https://www.leadwerks.com/learn?page=Tutorials_Editor_Materials
  11. Thats because my custom geometry shaders use Draw()-related commands. So you are saying something as simple as text now will require a sprite? Sounds very counter-intuitive. How will custom buffers be supported? Or are they going to be officially supported finally in LE5?
  12. er - what? you need then to give access to the render thread so we can use drawing commands. All custom post-process and geometry shaders would be affected by this, would they not? A 2D sprite doesnt isnt quite the same. So you are saying GUI's now will all be sprites?
  13. Could be - I personally never had and honestly don't see the point of using textures that large, but to each his own. Have you tried scaling the texture down to a more reasonable size at half or 1/4 scale to see if you have the same issue? Out of curiosity, what is the file size of a 8Kx8K texture?
  14. Either provide the map so people can actually see the navmesh layout in the area shown in the video or make a video with the navmesh visible via the camera:SetDebugNavigationMode(true) - a map and the character in question is preferable though. And since its fairly dark in the video I cannot say for certain, but it appears maybe the character flips around at the point it stops chasing you. Possibly due to a character angle problem. When that character is placed into the LE scene, does it face its local +Z axis? or is it pointing the other way? Did you change the character angle to compensate for that? As far as playing animations back to back, just switch the sequence after the frame gets past the known animation length (entity:GetAnimationLength()). Granted this means you will need to count/track the animation frames yourself and use the older entity:SetAnimationFrame() instead of the new (and improved?) entity:PlayAnimation().
  15. Crouching works the same in 4.4 as it has for a couple of years and several versions with some caveats and unfortunately it is not an officially supported feature (and hasn't been since the LE2 days). The crouch height is 1.2 meters and the debug physics body does not change size at least visually when crouched, but you will be able to move a character controller under anything taller than 1.2 meters. Also note this example shows that when crouching under something, the developer needs to prevent standing back up to prevent weird physic results from occurring - ie character slingshot across map, character pushed through the map, etc... window = Window:Create("crouch height",0,0,800,600,Window.Titlebar+Window.Center) context = Context:Create(window) world = World:Create() camera = Camera:Create() camera:SetRotation(40,0,0) camera:Move(0,0,-8) light = DirectionalLight:Create() light:SetRotation(35,35,0) camera:SetDebugPhysicsMode(true) ground = Model:Box(10,1,10) ground:SetPosition(0,-0.5,0) ground:SetColor(0,1,0) shape = Shape:Box(0,0,0, 0,0,0, 10,1,10) ground:SetShape(shape) shape:Release() box1 = Model:Box(1,1.2,1) box1:SetPosition(-2,0.6,-1) box2 = Model:Box(1,1.2,1) box2:SetPosition(2,0.6,-1) box3 = Model:Box(5,1,1) box3:SetPosition(0,1.7,-1) shape = Shape:PolyMesh((box1:GetSurface(0))) box1:SetShape(shape) shape = Shape:PolyMesh((box2:GetSurface(0))) box2:SetShape(shape) shape = Shape:PolyMesh((box3:GetSurface(0))) box3:SetShape(shape) shape:Release() player = Pivot:Create() visiblecapsule = Model:Cylinder(16,player) visiblecapsule:SetScale(.8,1.8,.8) visiblecapsule:SetPosition(0,.9,0) player:SetPosition(-4,0,0) player:SetMass(1) player:SetPhysicsMode(Entity.CharacterPhysics) crouch = false while window:KeyHit(Key.Escape)==false do if window:Closed() then break end move = ((window:KeyDown(Key.W) and 1 or 0) - (window:KeyDown(Key.S) and 1 or 0))*4 strafe = ((window:KeyDown(Key.D)and 1 or 0) - (window:KeyDown(Key.A) and 1 or 0))*4 jump = (window:KeyHit(Key.Space) and 1 or 0)*8 if window:KeyHit(Key.C) then crouch = not crouch end player:SetInput(0,move,strafe,jump,crouch) Time:Update() world:Update() world:Render() context:SetBlendMode(Blend.Alpha) context:DrawText("Press WSAD to move and C to toggle crouch",2,2) context:DrawText("Crouched: "..tostring(crouch),2,22) context:SetBlendMode(Blend.Solid) context:Sync(true) end
  16. What is the texture size? When being used in LE what is the texture format you are using? If you are using textures that are not of the power of two size (1024 x 512, eg.) and you are using any of the compression formats (dxt1, dxt5, etc) or creating mipmaps, then LE will resize the texture to fit a power of two. If you are using textures that are not a power of two, then my suggestion would be to use no compression and no mipmaps.
  17. See this monthly script challenge for an example of what you are attempting:
  18. You should only look for one specific key hit per update cycle or you will have issues like this. Rework the code to check for the E key's keyhit only once. previous discussion:
  19. By default, the buoyancy mode for all objects is set to true. So all that is needed to make something float is to be a rigid body and have mass (and of course, the water be deep enough to allow the object to float). As for the water, there are several posts asking to do the same. Unless you are good at shaders and emitters for water effects, i would not suggest water to be a significant part of any LE game.
  20. SetAnimationFrame() is the original method and since the user actually controlled the frame number being used in that method, there was no reason to have a GetAnimationFrame(). But now with PlayAnimation() being the end result of the animation manager written in c++, there is no current method to retrieve that value. So if you need to know, you will need to still use the old method and track the frame yourself. If its not a post in the suggestion box yet for this to be added, it should be.
  21. Yes, that is exactly what I mean. The texture settings in the LE texture Editor is what needs to be adjusted if you expect to see different results in LE. If you set the LE texture (*.tex) to dxt5 or you use mipmaps then it will force them to a power of two if they are not. And you do not have to export them as dds, because that is essentially what a *.tex is in reality. And like I posted before and Einlander repeated, set the compression type in the LE Texture Editor to uncompressed for normal maps.
  22. Are your textures a power of 2? meaning something like 1024x1024? if not, then setting them as dxt5 in the LE Texture Editor will force them to a power of 2 which will distort and cause artifacts. To avoid that, save as uncompressed with no mipmaps. What does your normal map look like? did you compress your normal map too? I would strongly suggest against doing that with anything that has a lot of detail. Also, what does your material look like? Post the contents of the material file here for us to see.
  23. If that code is in your game loop, then oldTime will never be 5 seconds more than the current Time:Millisecs().
×
×
  • Create New...