-
Posts
556 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by havenphillip
-
Leadwerks has all but ruined video gaming for me. I just look around trying to figure out how they made those scenes now. I was playing Last of Us II and some of those forest scenes are just amazing. My question is how are they able to put so much stuff in the scene without losing speed? If I could even make Uncharted quality I'd be happy. Is it polygon count or LOD systems or both or none or what?
-
-
Yeah I don't know what he's capable of or is willing to kick down, but the more I think about it "Ultra Light" is kind of cool. Reminds me of beer.
-
I get it Josh has to do what he has to do. I don't like that I'm decreasingly his target market because Leadwerks is great for me. I agree with him he should focus his efforts towards his goals. Maybe down the line he'll add some Ultra stuff to regular Leadwerks or even come up with Ultra Light or something for the people who want to just buy it outright. I feel like a company like NASA would happily pay a subscription and that would be cool to be like an outside contractor for a company like that or for Elon Musk or something. You couldn't really blame him for ditching us for something like that. My only real complaint with Leadwerks was the lack of help with shaders. I just got the internet and started trying to figure it out and passed on what I learned. I feel like thats the way tutorials would have to go. It would be cool to read tutorials from a guy like reepblue. I think the community could be way cooler if it went that direction.
-
Bro I get it but I don't like it. Last thing I need is another bill to pay. Couldn't you just do a one-time purchase option but charge a ridiculous amount of money for it so people are more prone to just do the subscription? There's people like me out there who just prefer not to keep having to update my payments.
-
"You have used 411.22 MB of your 200 MB attachment limit. " is that going to matter? I thought I had at least a gigabyte left.
-
This is: if ((int(gl_FragCoord.x + gl_FragCoord.y) % 4) != 1) discard; ...with the lighting quality up.
-
Ok yeah that looks great on shadows if I turn up the lighting quality in the options. Seems like that would be the best use. I cranked everything up on the normal shader but it still looks all dithered. 2 looks pretty good, though, even with the lighting on low:
-
-
Dude that's rad. I just tried it on a basic shader and got semi-transparency in-game. It's not z-sorted or anything.
-
Looks good to me. What do you feel like is lacking in it?
-
I mean initially you said the engine would be super fast. After all the things you've added is it what you had anticipated?
-
How is the engine speed after adding all that lighting and shadows?
-
Ok maybe I'll start with that. I want to get into modeling but I tried Blender once before and it felt like a very steep learning curve. I need it easier and faster. I bought 3DCoat but barely opened it for the same reason. I don't know if it's any good. But the walls of that ship look awesome that's what I want to make. And I like that 4-texture PBR idea, and the steam coming out of the wall that's so Alien.
-
@ evil turtle That looks awesome what program do you use to make models?
-
Leadwerks can do that. You want to make sure your hay texture is a png rather than a jpg because apparently jpgs don't carry alpha information. The "discard" technique in the diffuse + alpha shader is what creates that hard alpha falloff. I think I understand what you're saying and if so then you might also try opening the hay material and setting the blend mode to alpha and checking the Z-sort box (then save). My usual move is to do this then replace the "discard" line with a mix and a mask. But you can see a smooth alpha blend in the picture below (though actually I did use a mask on that one). That may work for what I think you're trying to do (but you'll notice it eliminates the shadowing, which can then be replaced with a Blinn-Phong. I can help you out with it if you want). Also (shameless self-promotion) I put up a bunch of shaders on my blog. There's some swaying trees and masks and blending etc. Maybe you'll find some principles there for some of these kind of shader problems.
- 1 reply
-
- 1
-
-
I use this thing: https://www.pragmar.com/qbit/ Then I put them all in GIMP and use this this template to line them up.
-
Here's some more extra shaders. I had a lot of fun with these. Some playing with normals. Some post-effects. Some experimental stuff. Just a mixed batch of noob adventures. This first shader is pretty simple and is a nice noob move to add more detail to any scene. You start with the base shader and simply mix it with another normal texture. You can easily see the effect it produces and this is useful if you want to add small details to a material - like for instance making skin or rocks (below) more porous, or if you want to show the threads in a cloth, etc. It's a cool little effect to have in the repertoire and it only requires an extra texture and two extra lines of code in the normals section: //Normal vec3 normal = ex_normal; normal = normalize(texture(texture1,ex_texcoords0).xyz * 2.0 - 1.0); vec3 normal_detail = normalize(texture(texture4,ex_texcoords0 * normal_detail_size).xyz * 2.0 - 1.0); <-- here normal = mix(normal,normal_detail + normal, normal_detail_mix); <-- here normal = ex_tangent * normal.x + ex_binormal * normal.y + ex_normal * normal.z; normal = normalize(normal); 00a_normal detail.zip This is a variation of the normals from heightmap shader (37_normals from heightmap) and I included it because I'm getting some better results with it than the other one. Set the heightmap to uncompressed in the texture editor for best results. You can see the normal dot3 map created in Leadwerks from the diffuse gives a nice normal map but it's not very bumpy. The "super bump" shader yields way more dramatic (and rounded) results, but you lose a bit of the sharp details that you would get from something like the Leadwerks normal because you are basing the normals on the heightmap. You can adjust the resolution to get varying results with 1000 being sharp but not very rounded normals. The picture below has the resolution set to about 300. The technique from the normal detail shader above is included so that you can still use the regular normal map to add details to the normals or double down on the normals in order to get some of those little details back. The difference here is instead of using two normal maps you're using one normal map and one (adjustable) heightmap. I love this thing. It really adds a lot of drama to your materials: 37b_super bump.zip I thought a shader collection ought to have an anisotropic specular and this was a pain to get working. You can see in the code it just looks like a tangled blinn-phong mess but it looks cool and can be used to give that anisotropic look to hair (below) or brushed metal. 48b anisotropic specular.zip This next shader does a texture scroll on a normal texture and then adds the xy of that texture to the texture coordinates of the diffuse: ...water_normal = normalize(texture(texture6,water_texsize * tex - vec2(0,time * speed)).xyz * 2.0 - 1.0); ...vec4 wet_diffuse = texture(texture0, tex + (water_normal.xy * 0.1)); ...fragData0 = mix(outcolor,wet_diffuse,mask); This produces sort of a wobbling pseudo-refraction effect in the diffuse by slightly shifting the texcoords of the diffuse according to that scrolling normal, which gives the effect of water running down the face of a surface. Add a cubemap for reflections and a mask and you get this effect: 22a_weeper.zip Here is a high-pass filter shader I made from the kernels blur shader. The high-pass filter is easy to create in Photoshop or GIMP. Essentially what you're doing with a high-pass filter is using a blur to sharpen an image. The idea is that you take the diffuse texture and blend it with a blurred and inverted version of itself. When you do that, you get just a grey image, but the blurring slightly offsets one of the textures and the difference created really dramatically draws out the little details in the image. I included a post-effect version of this here and I believe that would be the correct use of it, as seen below: 01d_high pass filter.zip This is my attempt at creating a waterfall. I thought the tessellation shader would be a solid direction to go in and it did turn out pretty good. The trick was to get the diffuse texture scrolling with itself. Once I got something that looked pretty decent I copied and pasted that outcolor section into the evaluation stage as the displacement so that the lighter colors would jut out more than the darker colors - so there is a consistency in color and displacement. The material is z-sorted to get the alpha fade and as a result I lost the specular. So I used a blinn-phong to get a light source and then scrolled the normals so that I could get those little "sparkles" which is consistent with water effects. Ultimately all the scrolling speeds and texture sizing are pretty arbitrary. I was just trying to make chaos that looked cool and gave me the impression of falling water. My modeling skills are not that great and I get the feeling this shader could look much cooler with a better model, but the effect is there. One thing to note is that when I made the model I uv-mapped the mask to it so that it would fit regardless of the size or how I might stretch the Y scale on the model to make it taller or shorter, and the mask fades to black (alpha) near the bottom. On taller waterfalls this gives the impression that the water is dissipating into mist: 41b_waterfall.zip This last one is just a fun experiment I was messing with. There are techniques for turning a diffuse image into an albedo image in Photoshop or GiMP using the Luminance/Luminosity blend mode. The reason you would do that is because you don't want shadow information in your diffuse texture. You want only color and you want the shadows and highlights work to be done by the lighting, object shape, and normals. The idea behind this shader is that you take the diffuse texture twice (one being the blend and one being the base) and blend these by the luminance so that the color of the blend blends according to the luminosity of the base (or was it the other way around???). This shader simulates that technique (There's a video link I included at the top of the shader that explains it better). You can adjust the contrast and saturation, and I included a post-effect version of it so you can "albedoize" everything all at once - and I have no idea if that's something that should actually be done but it was fun for me (You could maybe treat it as a tone map or something). You can see it colors in the dark areas and sort of flattens out the contrast. I set the diffuse and height textures to uncompressed and it looks pretty good: 53_albedoize.zip
- 2 comments
-
- 10
-
-
I updated and re-uploaded the above shader. I tried it on the tracks and was getting a bad result. It looks right now. Before and after:
-
Yeah you totally can. It's just a matter of changing the alpha value of the diffuse texture in the diffuse + normal decal shader. Try this shader on your decal material: decal alpha + normal.zip I changed only three lines: //Alpha fragData0.a = 0.0; //was probably 1.0 fragData1.a = 1.0; //was fragData0.a; ... was set to the alpha of the diffuse so when you set diffuse alpha to zero it also set normal alpha to zero fragData2 = vec4(vec3(0),1.0); //the alpha channel was fragData0.a I also normalized the ex_tangent, ex_binormal, and ex_normal. Here I just tried it with the bulletmark decal material. Only the normals show up. No diffuse: Also I have the material set like this (not sure how much "pick mode" or "z-sort" matter):
-
Here's the model version: -- create box and attach painter model material to it -- create camera in scene and attach spectator script to it so you can fly around -- create pivot and child it to camera, and attach this script to it painter model.zip
-
Ok so I was able to make this simple painter using a Shadertoy shader. Just put a pivot in a new scene and attach the script to it. The problem I have is when I try to switch the shader over to a model shader, and I change the line in the shader from: if(length((coord*buffersize) - mouse_pos.xy) > radius) discard; ...to this: if(length(ex_vertexposition.xy - cameraposition.xy) > radius) discard; ...and change these updateworld lines also in the script to this: function Script:UpdateWorld() mouse = self.entity:GetPosition(true) self.shader:SetVec3("cameraposition", mouse) end ...I end up with a dot that follows the camera around but it stops leaving trails. I don't understand what I'm losing in the process. Why is that happening? painter.zip
-
That's cool. What script idea did you go with in the end?
-
Yeah the buffer is just a target to render to. All it's doing is double-buffering the scene. In the updateworld function you can see it's toggling between the two, and what occurs on the screen is bound to the buffer using Bind(). I think those were the important parts. I messed with this CCTV script from here at one point http://leadwerks.wikidot.com/start - which is kind of similar - but it never went anywhere. If I recall correctly the trouble I had was figuring out how to use the CCTV in the PostRender function.
-
There's one if you look up "HUD Elements" in the Workshop that I got from Macklebee. You could probably chop that one up and make it work for you. The minimap script creates a bounding sphere around the player and looks for the KeyValue "enemy." So you have to add SetKeyValue to "enemy" in your target script. I think I included a crawler script that has that added in the Start function.