Jump to content

Rastar

Members
  • Posts

    421
  • Joined

  • Last visited

Everything posted by Rastar

  1. And before that you can import your model (which must be in fbx format) by simply dragging it from the file system into a suitable folder of your project. Leadwerks will automatically convert it and store it in its internal mdl format (that's the file you supply to Model::Load).
  2. 1) The Lua API doesn't provide methods for getting or setting the pixels of a texture. Is this due to technical reasons, or could those methods be exposee? 2) I have no success in importing a 16bit greyscale image (tried various formats). Is this not supported?
  3. @Rick: If you have no (direct) light, then you have no light bouncing around, that's true. But take for example light shining through a window as in the screenshots here in the middle of the page http://en.wikipedia.org/wiki/Radiosity_(computer_graphics) On the left side they even use ambient light, without it the shadows would hard and black, but that's simply unrealistic. The image on the right uses a radiosity method and is much more appealing, at least to my eyes. But again, having zones of different ambient lighting would be an improvement.
  4. I have to disagree on the ambient light... in the real world it's everywhere, light bouncing off walls, indirect lighting from the sky etc. Only that's impossible to calculate, so the ambient is a hack to somehow include that. Personally, I find scenes without ambient unrealistically dark. Would be nice, however, if you were able to define zones for different ambient light values - if you're outside the intensity and color certainly is different than when your're inside a room.
  5. There's an option in the menu (I think it's "View Physics", don't have LE available right now) which shows the collision shapes as purple bodies (and the navmesh).
  6. Just a word of caution: An "open-world survival game" is quite a challenge, especially if you're new to coding. Maybe consider something smaller to start with. You might risk getting frustrated otherwise because you will hit a lot of obstacles in that genre that are not completely easy to solve...
  7. Or you could start with no texture and later change it using SetTexture(). A downside would be maybe that the texture name would have to be stored in your script. Or you could assign the diffuse texture in the editor during design time, then get a reference to it and remove it in the Start() method of your script and later on assign it again when the player has found that flamethrower. So in Start() do self.texture = material:GetTexture() material:SetTexture(nil) and later in Update() if (itemFound) then material:SetTexture(self.texture) or something similar.
  8. Just to add to Rick's excellent description:You can also change a material's texture at runtime using Material:SetTexture(), where the texture at index 0 (the default) is the diffuse (main) texture. But I guess in your case you may just set the material's color using Material:SetColor() as in the code example. This color is multiplied with the diffuse texture and is normally plain white (so you get the texture only). If you change that in a script (in the Update() method) to, for example, (1,0,0) the texture will get a red tint.
  9. I, too, are sometimes problems to import textures I generated in World Machine (especially the grey-scale heightmaps): 1) I get an error that the found mipmap is fifferent than the expected one which gets me an AccessError. Opening and saving the file in Gimp helps. 2) It seems LE doesn't like it when you're saving an asset from another tool right into the asset folders (AccessError again). I guess it acts upon a change event from the OS and tries to import the asset right way although it's still being written.
  10. Great, thanks! And while you're at it : Could you specify the channel layout of the fragment shader output (frag0, frag1, ...)? I mean, frag0 is the diffuse and frag1 is the normal, but if I read your shaders correctly you are e.g. assigning the alpha from the diffuse to the alpha of the normal vector?
  11. Right-click on the model in the asset explorer, the last entry should read "Generate shape". Polymesh is closer to the model, so more precise but also more expensive than Convex Hull.
  12. OK, great! I'm not sure what you want to do with your "glass element" - have a transparent glass in your scene? There's a special shader for that (see under Shaders->Effects). Your model won't automatically have a collision mesh. Either let Leadwerks create one (Right-click->Generate..) or import one from your modeling tool. Also, you should set the collision type which determines which collision events your model "sees" (in your case Character).
  13. So, when you drop that model into the scene, does it appear in the scene explorer? If not - weird. If yes, maybe right-click on it and select "Go to" - maybe it has some far-off origin?
  14. Yes, same for me: Loading model "F:/Leadwerks/Projects/LargeTerrain/Terrain/tutorial4mesh.mdl" Deleting model "F:/Leadwerks/Projects/LargeTerrain/Terrain/tutorial4mesh.mdl" Loading model "F:/Leadwerks/Projects/LargeTerrain/Terrain/tutorial4mesh.mdl" but the model should be there as a black, empty icon in the asset explorer, and you can open it by double-clicking on that. The model viewer might should an empty screen, but when you save it (possibly recalculate normals first) and re-open it it should be visible. Also, after saving the icon in the asset explorer should become an (untextured) white.
  15. I also don't know what the "Deleting model" message is supposed to mean, since the model actually won't be deleted. After the import you probably have to open the model in the model viewer (double-click on it) and then save it there. Also, sometimes you have to recalculated the normals (under the Tools menu in the model viewer).
  16. Please close - no, delete this post ... I was familiar with the property panel to "vanish" and having to be dragged up again. This time it was the asset explorer. But everything's still working. Although it might be worth considering a min height for the property etc panels, this can be really confusing.
  17. When starting Leadwerks today I got an AccessViolation error message. LE then started afterwards, but now all folder in the Assets tab are gone (they still there on disk). Restarting LE doesn't help, creating a new project doesn't help as well. When clicking the "Recursive"option, all assets a displayed as thumbnails, but no folders.
  18. You can't directly import materials from other programs, at least not that I'm aware of. You can, however, easily import the textures, most of the standard formats (like jpg, png, tif) will work. Again, you can just drag and drop them in to a suitable folder in your Leadwerks project. Leadwerks will make an educated guess using the texture's name if this is a diffuse, normal or specular map. So, the easiest way to create a material for your model is: create a folder for the material and drag you textures there. The textures should have a base name and contain "diffuse", "normal" or "specular", e.g. "stone_diffuse.png", "stone_normal.png", "stone_specular.png" (some other names should work as well, e.g. diff, norm, dot3, spec etc. Right-click a texture and select "Generate material". Choose a shader that suits your needs. You can assign the textures to models in the model explorer (double-click the model to open it) by, again, just dragging the material onto the corresponding surfaces of the model.
  19. Very likely that was a pretty old video you found... There are no Leadwerks plugins for 3DS max and no 3DS plugins for Leadwerks. There is however a converter for fbx files, so you can export your models in that format from 3DS Max can then just drag and drop them in to the project folder. Leadwerks will detect those new files (and also when you update them) and automatically to its own internal format (which has the extension *.mdl). EDIT: You stil have the status "Member", to download you need to be a "Developer". Maybe you used a different e-mail in the forums than for purchasing on Steam? You might contact Josh and ask him to üpgrade" you.
  20. Confirmed, after updating the project it no longer crashes.
  21. I get a lot of access violation errors while working in the editor, most of the times they will crash the editor. They are a bit hard to consistently reproduce but I think they have something to do with the camera. E.g., the editor often crashes when I add a camera to an alomost empty new, "almost" meaning a the second object. Less often a get the error when I simply select the camera in the scene and then click into one ofits property fields.
  22. A level will still crash when the world size is > 1024 as soon as there is a camera in it.
  23. Quick question: If I have, say, 10 instances of the same model, of which 5 are frustum culled - will the gl_InstanceID in the shaders only count the visible instances (thus running from 0 to 4) or the "instantiation order number" (meaning it will run from 0 to 9, but some numbers won't show up in the shader)?
  24. An additional method for specifying the tessellation domain for a surface and/or mesh would be great. It seems right now only triangular tessellation is possible. This would also require that surfaces are sent to the shaders even if they only contain a vertex array and no index array for the triangles (not sure if LE is doing that already). May sound like an esoteric nice-to-have function, but it shouldn't be too hard to add, and actually the fact that Leadwerks provides easy access to an OpenGL4 tessellation shader separates it from many other engines (Unity e.g. only does tessellation for DX11). And there are some truly amazing things you can do with that functionality....!
×
×
  • Create New...