Jump to content

havenphillip

Members
  • Posts

    550
  • Joined

  • Last visited

Posts posted by havenphillip

  1. 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.

    • Upvote 1
  2. Ok I tried downloading a few cars and scripts. I cant get it working it's getting too complicated. Would it be easy for you to write a single track script in the 3rd person player script so that the player leaves one trail behind? I just need something simple. I think you understand this decal thing better.

  3. "There is a last option they could have used in the video..maybe it is possible to create a surface with mud material and move it, as you want using the vertex coordinates. With this method it was easy to recreate little waves like water could do, so it could be possible to move a surface as mud would do?"

    Yeah that's pretty much the idea. But I need to move the vertex according to the trails that are left in the wake of the tires. So the trails from the tires act as the heightmap. Getting the trails to "stay on the ground" is the trouble. If I can get that I can work out the rest of it.

    You posted a partial script for your trails recently:



    I think I would need that whole script - or some simplified version of it. From there I think I could work out a shader. I don't think it's the "proper" way, though, but it might work. I also don't know if I could get that working on terrain. On a model more likely.

    From what I understand the correct way to do it is to create a buffer and somehow mix the buffer and the color texture together so that the renderer saves the created trail path.
     

    • Like 1
  4. The decals thing might work but you'd have to loan me the script. If so it would just be a matter of connecting the decals to a tesselation shader and figuring out some kind of tesselation lod. It would look cooler if it was drawing in height rather than on the diffuse, and it's possible you could randomize a few textures to get that mud up on the sides of the tires if a sprite sheet doesn't work.

    The veggies moving shader only records a small area around the player. It doesn't remember where the player has been - so no trails still. But if I could get trails that one could be useful, especially for improving that particular shader.

    • Like 1
  5. That's a pretty sick shader but it has like 5 buffers. It's insane. The problem would still be how to do trails. I can draw a point at the player. But how to make it remember every point the player has been and draw that line? Sounds like Josh is saying use a render to texture - which makes me think of the minimap. Seems like maybe in script all I need is to bind a texture? I just need to start doing experiments.

  6. 3 hours ago, Marcousik said:

    So Is it correct to say that the parallax shader uses the "displacement" slot?

    And I found a diffuse+normal+specular+parallax+roughness.shader -> this should use the 5 first slots of a material, correct?

    You're probably right. That would be my assumption as well. You can always look in the shader and see which textures are being used for what. If it's the mighty Shadmar he usually wrote in some good notes on which texture was which.

     

    • Thanks 1
  7. Yeah I don't know how to do channels on GIMP but I"ve seen videos on it. But I'm pretty sure that's the set-up. In shader it would just look like this:

           float col1 = texture(texture0,ex_texcoords0).r;

           float col2 = texture(texture0,ex_texcoords0).g;

           float col3 = texture(texture0,ex_texcoords0).b;

    ...where each of the color channels would be a different noise or whatever.

  8. I want to make a PBR shader for these. I've seen some tutorials around. I just haven't gotten to it. I don't know how well Leadwerks would handle it but I do know that the more textures you add to a shader the more it eats at your FPS. Albedo is like a diffuse map where the shadows are all reduced, which is better. You want the lighting and normals to handle the shadows. Not the diffuse. Your specular is probably the roughness, or the inversion of the roughness. PBR stuff looks really cool, though.

    • Like 1
×
×
  • Create New...