Jump to content

havenphillip

Members
  • Posts

    555
  • Joined

  • Last visited

4 Followers

Recent Profile Visitors

9,759 profile views

havenphillip's Achievements

Community Regular

Community Regular (8/14)

  • Conversation Starter
  • Very Popular
  • First Post
  • Posting Machine
  • Collaborator

Recent Badges

424

Reputation

7

Community Answers

  1. havenphillip

    Extras 2

    I haven't picked up Ultra yet. I think Josh said at one point that it would be capable of all the same stuff.
  2. havenphillip

    Tessellation Shadows

    How fast is the tessellation?
  3. havenphillip

    Terrain Tessellation

    Good grief, dude. I'm amazed at how much Ultra seems to be able to handle. It looks rad and it doesn't even look like you're using a LOD system.
  4. I use something like this: Script.healthBonus = 25 -- int "Health Bonus" Script.height = 1.1 -- float "Hover Height" Script.speed = 2.0 -- float "Rotate Speed" function Script:Start() --Load a sound self.sound = Sound:Load("Sound/Interaction/switch12.wav") self.entity:SetMass(0) self.entity:SetCollisionType(Collision.Trigger) local pos = self.entity:GetPosition() self.entity:SetPosition(pos.x,pos.y+self.height,pos.z) end function Script:UpdateWorld() self.entity:Turn(0,Time:GetSpeed() * self.speed,0,true) end function Script:Collision(entity, position, normal, speed) --if collision with key value type is "player" if entity:GetKeyValue("type")=="player" then --add health if entity.script.health < entity.script.maxHealth then entity.script.health = entity.script.health + self.healthBonus end --cap max health if entity.script.health > entity.script.maxHealth then entity.script.health = entity.script.maxHealth end --play sound if self.sound then self.sound:Play() end --despawn item self:DespawnItem() end end function Script:DespawnItem() self.entity:Hide() self.entity:Release() self.entity = nil end A couple of things for this to work: 1. You want to make sure this line is in the Start function of your player's script: self.entity:SetKeyValue("type","player") 2. Also your health kit model has to have physics on it for the collision to work. You can just double click the model and the page should pop up. I just use basic box physics.
  5. You put this on Steam? I looked for it couldn't find it.
  6. 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...
  7. @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.
  8. 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;
  9. 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:
  10. 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?
  11. Ah that's a cool idea. I like the whole TV theme. Nice choice of song too haha
×
×
  • Create New...