-
Posts
421 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Rastar
-
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?
-
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.
-
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).
-
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?
-
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.
-
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).
-
Hi, a little bit confused, 3DS max, tools.
Rastar replied to redstar_dan's topic in General Discussion
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. -
Hi, a little bit confused, 3DS max, tools.
Rastar replied to redstar_dan's topic in General Discussion
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. -
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)?
-
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....!
-
Sorry guys, even if I risk boring you with my monologue... another screenshot. The heightmap resolution is too low for the foreground (4096 applied to 8000m) and the tessellation probably not optimal, so you see jaggies there, but I really like the crisp details in the background. But enough of this, I'll now have a look into optimizing the tessellation before I bother you again
-
This tessellation stuff is really interesting. The screenshot below was done using a simple heightmap+normalmap+colormap from World Machine and a modified version of the tessellation_example material (and of course shadmar's skybox!) applied to a scaled plane of 32x32 tris. It doesn't look spectacular because those are simple textures, and it performs like **** because this is a single mesh with no culling and LODs (every triangle side has a tessellation factor of 256, so that's a lot of vertices!), but it shows that there's a lot of potential in it. As I wrote, I would prefer to start from quads since that's more natural for terrain patches, but with adaptive tessellation guided by viewer distance, terrain features and an optional tessellation map, this could be used to render large terrains at excellent framerates.
-
Ah, sorry, I've overlooked that you were referring to the editor. Yes, I agree.
-
Well, it seems I got this working by setting layout (vertices = 4) out; in the control shader and layout (quads) in; in the evaluation shader. Wasn't aware of those functions (still new to tessellation..). On the other hand, I'm only working with a four vertex/two triangle patch right now that I am going to instance so that the patches can be frustum culled. Don't now what would happen if you start with a mesh that has more quads/polygons, since the vertex order is probably determined by the triangle indices? EDIT: Nah, this doesn't work. Of course, it only controls the patch size handed to the evaluation shader (which can be different to the input patch size). Also, the glTessCoord are barycentric with respect to that patch. So back to square zero: Is there a way to submit patches of four to the shaders?
-
There should be Camera:SetProjectionMode(), see here http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/camera/camerasetprojectionmode-r204
-
I would like to tessellate quadrilateral patches. I guess this currently isn't possible because the API doesn't provide for a means to generate quads, and probably the patch parameter is hard-coded to three, as in glPatchParameteri(GL_PATCH_VERTICES, 3) ? Or is there a way? If not, would it be possible to extend the API to add quads (e.g. by adding Surface::AddQuad() ) and set the patch parameter accordingly?
-
I am playing around with the tessellation shader. Is there a way to see the tessellation results in as a wireframe? It seems in the editor I always get the non-tesselated original meshes as wireframes. When running the game everything is shaded. I was using the (undocument) camera->SetDrawMode() in C++ / Leadwerks 3.0, but that isn't exposed to Lua.
-
I hadn't actually imported tose trees into Leadwerks 3.0, so I couldn't say how well it worked there, but just gave it a shot in Leadwerks 3.1. I first removed the two additional LOD levels since LE currently can't handle them (a feature sorely missing, if I may say so) and then resize them. I was able to assign the three materials by dragging them to their respective parts of the tree in the preview, though this was a bit fiddly for the trunk since you can't zoom in and it's quite thin. However, I still couldn't get a tree properly working in Leadwerks 3.1. I'm unable to get the leaf transparency working correctly, and the tree shadow isn't correct as well. In Leadwerks 3.0, shadmar supplied a leaf shader which discarded fragement below the cutoff which fixed that, but I couldn't get this working in Leadwerks 3.1. Now, I am actually not familiar with the intricacies of a deferred shader, so I might be doing something wrong. Also, the FPS is troubling me: If I put that tree on a 256x256 terrain, with a directional light and the skybox, I'm at about 70 fps (with medium lighting, 2x AA) on a GTS450.
-
But to my understanding, although the mobile versions will later be released for 3.1 they will still use their Leadwerks 3.0 (OpenGL ES 2) renderer (only the iPhone 5s and Android 4.3 upwards are using the new OpenGL ES 3). I guess it will be some time before we see this amazing renderer on the mobile versions..
-
Whoaaa, hang on, does that mean that hardware instancing is automatically taking place? Always, or as soon as gl_InstanceID is used in a shader for the object? I guess we really need some clarification here from Josh how this works!
-
Congratulations on the Steam release and a few questions
Rastar replied to Rastar's topic in General Discussion
Correction to the terrain level FPS: I forgot to turn off vsync (blush), seems this is on after a fresh install. I now get around 80 fps, which still is not overwhelming, though. Btw: Is there a code sample or something for the instanced rendering? I guess this needs special shader that use the uniform buffers, glInstanceId and stuff? -
Congratulations on the Steam release and a few questions
Rastar posted a topic in General Discussion
Congrats on releasing Leadwerks on Steam! It will be interesting to see where this takes the engine - judging from the comments, this move generates a lot of visiblity and attracts many people who haven't heard of Leadwerks before! I have played with it a little and have some questions: 1) Is there a shader "in the box" that I could use for trees? I tried the "if (outcolor.a < 0.5 discard);" check on the leaves, and it works a little but not fully, and the tree shadow is wrong? 2) Using the terrain from level 8 and putting in a couple of trees (like 10), a get a pretty low framerate (like 60 fps). Is the fps counter reliable? If yes, that would be troubling. 3) I can confirm the large terrain crash bug (see http://www.leadwerks.com/werkspace/topic/8032-steam-large-terrain-crash/). After you put anything in your scene (like a model) it cashes on start, just the terrain starts. 4) For the terrain level, it would be nice if there was a "fly-around" camera script. -
Leadwerks 3.1 Pre-orders Now Available, Indie Edition coming to Steam January 6th
Rastar commented on Josh's blog entry in Leadwerks News
About the Coming to Steam 1.6.14 on your landing page - at least every European will read that as "June 1st"... -
Asset paths after copying and pasting project folder
Rastar replied to Rastar's topic in General Discussion
I did that. Maybe its because the old and the new project had the same name? Edit: Tried to reproduce that but couldn't. I actually might have been editing old files in Visual Studio... Move along, nothing to see.. -
I have copied a complete Leadwerks project to another folder. Everything is working, except the Asset loader seems still to be looking for assets at the old location (has driven me crazy why LE wouldn't load my new shader ) So the (absolute) asset location must be somewhere in the project files, but I couldn't find it. The editor finds those files alright (well, I created them in the editor after all), but Shader::Load() seems to be looking at the old place. Where is the asset base folder defined?