-
Posts
421 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Rastar
-
Sorry for necroing an old thread, but... has this been solved/answered? The range setting on the lights tab doesn't do anything (and by the way, if you close and reopen Leadwerks, that range is set back to -150/150, even if I save my map before closing). Also, I actually don't understand what those values mean, especially the first one - is that the range of objects behind the camera that cast shadows?
-
Maybe try to delete *everything* include Leadwerks' .meta files, fbm folders etc. As wrote, for me it suddenly worked (bu manual assignment), but i don't know what was different.
-
Mmmh, I started over by deleting everything and copying the files freshly into the Leadwerks folder. The automatic assignment didn't work for me, but that be because the file paths are different (at least the DAE files reference textures in an "images" folder, but the the distribution stores them in a "textures" folder that I copied over). Now it's working , but I don't think I've done anything different than the first time. Anyway, thanks for your help!
-
As a 3D modeling analphabet I need a little help here... I am trying to import some tree models from pure3D's Vegetation Starter Pack. As usual for trees, they have at least two materials (for trnk and leaves), sometimes more. Now, assigning those two materials for the beeches in the pack (using drag 'n' drop in the model editor) works fine, but e.g. fails for the oaks: any material will always be applied to the whole model. What puzzles me is that those trees look similar in structure when viewed in UltimateUnwrap3D, and I don't really know what Leadwerks is looking for to identify a surface. I *could* export the materials/groups as separate meshes, but I don't really want to do that. Any ideas what I might be doing wrong or can change to make things work?
-
A bit of documentation on this would be helpful, I find this bit confusing as well. E.g., I have to assign a alphamask shadow shader to my trees so they correctly cast shadows, and I actually don't have a clue why.
-
Am on vacation right now, with only very shaky internet access and a Macbook (so no 3.1). Will do the next chapter some time next week, but won't be interesting for the likes of you I am going to describe a tessellation pass-through shader.
-
I actually haven't looked too deeply at the Leadwerks terrain system, but this is "just a bit of shader magic". Quickly scanning the terrain texture shader, it seems there are certain thresholds for the texture blending, resulting in those hard edges. So tweaking the shader might give what you want. You could also try and play with the "transition" slider on the material layer page, maybe this improves things towards your goal.
-
Actually, I think this is looking much better and more realistic than the typical texture blending using alpha values. I mean, for ground structures such as this you have small height differences that determine which material is on top: The sand will fill the lower parts of the rocks and be completely absent at the top, and not gradually shine through the rock texture. For example, there is a very popular terrain add-on for the "he-who-must-not.be-named" engine that specifically uses heightmaps for terrain textures to achieve this effect. EDIT: By the way, now "mrstralberg", Sir? Being more formal these days ;-) ? EDIT2: There was a post where Josh discussed this http://www.leadwerks.com/werkspace/topic/7196-terrain-texture-with-blend-pattern-in-alpha/page__hl__alpha
-
If you specify that variable as "in vec2" it is supposed to be a vertex attribute, ie have a different value per vertex. However, the Shader:SetXY() methods set shader uniforms. So I guess, in your case you should define that as uniform vec2 my_offset;
-
Vertex coloring ( and extended to multi material )
Rastar replied to YouGroove's topic in Suggestion Box
The fragment shader might work on pixels, but everything before it works on vertices. You define vertex colors in your modeling program, and they are interpolated for the fragments by the rasterizer, just like everything else. I don't think LE should provide tools for vertex coloring, that's really the domain of DCC tools. -
Vertex coloring ( and extended to multi material )
Rastar replied to YouGroove's topic in Suggestion Box
Not sure if I'm misunderstanding you, but that should be possible already. Leadwerks passes the vertex color already go the shader (uniform vec4 vertex_color). By default it is mixed into the diffuse color, but the shader could use it for something else. Of course, you would have to define the vertex colors for your model in your modeling program first. -
..and just to be sure.. in your sample code you write "self.enity" instead of "self.entity" (though that might just be in your post and not your code)
-
If a method isn't supported in Lua, the compiler complains that you're trying to access non-existing property XY. If you get a nil mat then the call was successful, but the entity doesn't have a material. Are you sure you're calling GetMaterial() on the correct entity? self.entity will be the scene object to which the script is assigned, is that the correct one? By the way, I think calling that method will change the shadow casting for all models that use that material (even for the non-dead aliens). So maybe you should create a "Dead alien material" and assign that using SetMaterial().
-
Just as an additional illustration: Using a (mean and inefficient) hack in the control shader, I got quad tessellation. Compare Triangle tessellation to Quad tessellation (both using fractional_odd_spacing). At least for my purposes, I would definitely prefer the more regular structure of the latter.
-
In your project, there is a folder "Shaders/Model". There is a simple Shader called "diffuse.shader" which only uses a diffuse map. In your case, with three outputs, you would probably use "diffuse+normal+specular.shader". I just wanted to make sure you're using one of those (open your material in the editor and have a look at the "Shaders" tab).
-
Ah, OK, thanks for the explanation. And how come the information tab switches from RGB to RGBA if I check that box?
-
Sounds like a great idea. Several materials would probably have a similar noise texture (grass, coarse sand, granite surfaces, ...). But texturing is still some blood, sweat and tears away....
-
@ScrotieFlapWack: Probably a silly question, but just to be sure...: You are using them with a corresponding shader, right (e.g. diffuse+normal.shader)? If yes: How did you generate them? You should see a visual difference already in the material editor (might have to hit "Save" for this).
-
Hi shadmar, that's an honor Yeah, texturing will be another topic... A selector-based texturing solution similar to Josh's would be great (read: memory-friendly). In addition, World Machine exports very nice splat maps (e.g. defining the path erosion activities), I would lie to make use of those as well.
-
Thanks for the info. You mean the "bumpiness slider", right? True, that only becomes active when the Normal Map flag is set. You mean "height" as in "height map"? Is this then saved to the alpha channel (and that is the reason that appears on the Information tab)?
-
At this point just a little WIP note to make sure Josh doesn't take over the blog space... I am still tuning the tessellation procedure. Temporarily (?) I have switched from my beatifully crafted concentric mesh rings to a uniform grid structure - it is more difficult to get a smooth LOD transition for those rings than for a uniform mesh, and I have enough problems with that already. So, I'll first try to get things right with the simpler mesh structure and then see if things work as well with those rings. I made wo little videos of my experiments. The first runs in wireframe mode and shows the tessellation change with the moving camera. Notice the intense "activity" when mving clode to the ground. http://steamcommunity.com/sharedfiles/filedetails/?id=229124907 This is also visible in the second video which shows a similar scene in normal shading mode: The terrain "bubbles" when flying close over it. In part this certainly is due to the heightmap resolution: I had to switch from a one-channel, 8bit heightmap to a two-channel, 16bit format to get this effect under control (otherwise the terrain was boiling...). But still, the horizontal resolution is low, with a 4096 texture covering 16km. So when a new vertex is created or moved around, it might suddenly lie on a different texel of the heightmap and is displaced differently. http://steamcommunity.com/sharedfiles/filedetails/?id=229127339 Well, a lot of stuff to do...
-
What exactly does it do? I've noted an alpha channel is available if this is checked (which isn't really needed for a normal map)? Is Leadwerks using an uncompressed 32bit format when checked, or what is its meaning?
-
I mentioned this before, but think forgot to make an "official" suggestion: I would really love to be able to use quads as a drawing primitive, mainly for using it in tessellation - quads IMHO lead to a more evenly distributed tessellation. So something like Surface:AddQuad(index0..index3) which also implicitly means a glPatchParameteri(GL_PATCH_VERTICES, 4); An unofficial, unsupported, "use at your own risk" version would be suficient for now
-
Oh, that easy Thanks!
-
Is there a way to get the "naked" projection matrix (rather than the projectioncameramatrix), either in a shader or in a script?