Jump to content

havenphillip

Members
  • Posts

    550
  • Joined

  • Last visited

Everything posted by havenphillip

  1. Good grief. Way to go, Josh.
  2. You put this on Steam? I looked for it couldn't find it.
  3. havenphillip

    Geometry

    So we went through a lot of fragment shaders. Did some vertex displacement. Went through tessellation. Now, some geometry. I don't have much to say about it. Just keep poking at it with a proverbial stick and eventually situations start to look familiar and you know what to do because it's similar to stuff you've encountered before. It does seem to me that there's not a lot of variety in geometry shaders. There's a bit, though. Enough to make it interesting. But grab these shaders and you'll have the gist of it. Here's a normals visualizer. This is like the first geometry shader everyone makes. The blue lines are the faces, the yellow lines are the vertices: 43_normals visualizer.zip A simple instance geometry shader. There's a bool in the geometry stage. If you set it to true it works for simple boxes but not for more complex shapes. If set to false the corners break on the box but the more complex shapes look great. There are two instances here and in the shader you'll notice "EndPrimitive()" after each. You'll also always see "EmitVertex()." You can emit many vertices per primitive. But once you end primitive it means you're moving on to something else. Check it out: 44_silhouette.zip This shader uses a technique called shell texturing. In it, the geometry shader is used to duplicate the surface several times according to a height map, and with each new layer the alpha areas grow. I call this "short fur" because it's a little temperamental. If your fur is too long you need more steps, which eats at your FPS. Too short and you don't get much of an effect. I come back to this shader periodically, just trying to improve it, and you will probably be able to see why. It gets a little "twinkly" around the edges due to the viewing angle. But it's a nice little shader. Not too complex: 45_short fur.zip Same basic idea in the geometry shader as the previous. Just set the cloud plane in the scene and attach the script and it will set it up in the sky for you. Also included the cloudless skybox material and shader: 46_volumetric clouds.zip I want to make a LOD system for this in the future so I can make whole fields. In the pic it's scaled to about 20x1x20 and the tessellation is set at about 32 in the control stage. There are three noise textures. One for wind, one for grass heights, and one which I used to randomize the grass blade positions so they didn't look like nice little rows and columns. By all means mess with all the numbers, but it's kind of nice to just sit and watch this one blow in the wind (also set the wind texture to uncompressed to eliminate some of that banding - that way you get a nice rolling wind).. Check the links in the shader to see how it's done, but basically you just draw one blade of grass in the geometry shader and then tessellate it. That blade of grass reoccurs at every vertex. Throw in some bada-bing/bada-boom and it looks pretty natural: 47_geometry grass.zip I'm thinking I'm going to attempt to do a PBR shader. So I'll call that next. But it may take me several weeks so I may vanish for a bit. Let me know if there are any shaders you want to see in the future. I'm thinking after I hit 52 shaders I'll just keep posting. But at that point I'll just do it more at my leisure. There's a lot of things I still want to make. Happy shading! Next: PBR...
  4. @klepto2 I'm quite certain you know more about this stuff so I defer to you. I just assumed. If it was me I'd try to find a rain shader that uses noise instead of going through a script with the noise buffer.
  5. Ok so you set the "col" to vec3(0,0,0) that's where the black is coming from. You're sort of just trying to add the effect over a black screen. The screencolor texture for post effect shaders is texture1. That gives you the standard screen. Set it instead to: uniform sampler2D texture1; //color ... vec3 col = texture(texture1, q ).xyz;
  6. I don't think there's an official tutorial or anything but I made a tutorial on how to convert from Shadertoy to Leadwerks. If you look around the community you can find things here and there. Also I made a blog with a bunch of different shaders you can grab. Once you get the hang of them you should be able to figure them out. ...and the blog:
  7. Dude that looks unbelievably good. I'm impressed with HOW MUCH stuff you got in the level. That foliage thing you came up with is awesome. I want to get in there and work on some of the textures and effects. The movement on the plants too. Love it all. How "done" is the level and is it updated to that point? I want to go through everything and fix the specular on the rocks, etc. Add that subsurface scattering to the plants, and is there a bed carved for a river?
  8. Ah that's a cool idea. I like the whole TV theme. Nice choice of song too haha
  9. You can cull backfaces in shaders. In your material shaders you can try adding this anywhere under the main. I haven't tested it to see what kind of FPS bump you'd get but maybe it'll help: if (!gl_FrontFacing) discard;
  10. havenphillip

    Dron.jpg

    I like this idea. You going to make the camera switch back and forth from drone to player?
  11. Oh I see what you're doing. You could use a single material to do it. The thing that makes emission is really simple it's just the first three vectors of the specular output. You could set up an if statement in the shader something like this: uniform float light_on; .... if (light_on == 1.0) { fragData2 = vec4(1,1,0,1); } else { fragData2 = vec4(0,0,0,specular); } Then in your script somewhere you set the float and set it to the flashlight function. Something like: Script.flashlightOn == 0.0 ... self.shader:SetFloat("light_on",self.flashlightOn) function Script:UpdatePhysics() ... --Toggle the flash light on and off if window:KeyHit(Key.F) then if self.sound.flashlight~=nil then self.sound.flashlight:Play() end if self.flashlightOn == 0.0 then self.flashlightOn == 1.0 else self.flashlightOn == 0.0 end end
  12. You want the scene to reflect on the helmet visor?
  13. havenphillip

    Sky.jpg

    Yeah it does look cool. I keep wanting to see a Mars base with a garage for the vehicle.
  14. Aggror's flowgui did something like that. There's a map on it that shows how to set it all up.
  15. There's a documentation page: https://www.leadwerks.com/learn?page= The community is pretty good but it can be a bit difficult if you're a total beginner but most people I've seen seem to pick it up pretty fast. I didn't code at all when I started but I discovered you can pretty much figure out how to do anything. Not entirely sure what you're saying but look up "HUD Elements" in the Workshop. Stuff I found in the community mostly. It's got lua and shaders working together. Your stuff looks cool. Looks like you already know what you're doing.
  16. @Epsylon you reacted to one of my early shader posts I made a blog since then if you're looking for more. Utterly shameless self-promotion:
  17. What's funny to me is I saw the headline and I still scrolled through this.
  18. This is rad this is the kind of game I want to make.
  19. I'm super pumped about this decision but I still think you should keep the subscription option. Buying the standalone one-time payment, then buying all the DLC separately should be the "hard way" to do things. A subscription that was like 75% of the cost in one year of what it would cost to buy the standalone plus all the DLC separately would appeal to a different kind of person (or whatever just so that subscription is the much better deal). I'll happily do things the "hard way" because that's just my own matrix of wants/needs but I think subscription could still work relative to the standalone option. It changes the payoffs. Instead of "paying rent" I'm "paying less so I don't have to pay more like those nerds over there." I don't know the industry but it seems like maybe the people you're selling the subscription to may be serious game developers who don't like the way Unreal essentially punishes people for being successful. I've seen your blog posts and all the work that went into it. I think your work speaks for itself, and Ultra does like 10X what Leadwerks 4 does and I bought Leadwerks for $100 like seven years ago. I'd gladly pay $150 - $200 for Ultra (I probably shouldn't say that but it's true. I mean some guy was willing to give you $700 for it).
  20. https://media.giphy.com/media/dVTnzQa3xUlKo/giphy.gif
  21. Best I can come up with is to find a simple ripple shader on Shadertoy and then get normals from that noise and plug it into a decal shader, then just use it like you would in your tire tread decal system. I made one and tried it on the FPS gun bullet decal material. It works ok. I left the diffuse output at 0 so only the normals show up. You can adjust the speed, zoom, frequency and centering on the ripple. I found one where the ripples fade out on the edges. Also that's how the decal material is set up I don't know how much that matters to the effect: decal ripple.zip
  22. Yeah sorry man I don't know what's going on with that. If it works in game then I guess it's cool. That mud looks good. I wish I could figure out the footprint thing but it's still beyond me at this point.
×
×
  • Create New...