Jump to content

havenphillip

Members
  • Content Count

    318
  • Joined

  • Last visited

Community Reputation

116 Excellent

1 Follower

About havenphillip

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male

Recent Profile Visitors

1,359 profile views
  1. Trying to make this toon shader. It's compiling but I'm seeing nothing. https://prideout.net/blog/old/blog/index.html@tag=opengl-silhouette.html
  2. You got them sharper dude I can tell. They look real.
  3. Here it is on the sphere. You can see it only works where you cut the texture:
  4. I've made it work on squares and rectangles but it's best for planes, like if you have a wall segment and want to spice it up you could do that, but put some pillars on either side. I tried it on a beveled cube but the smoothing breaks the parallax, and I made a wall that had a diagonal 45 degree angle and it couldn't make sense of the angle as I walked past it. It did the same with the parallax shader included with Leadwerks, so I figure that has to do with the TBN matrix. It doesn't like diagonals. Besides that, the cutting system I have is horrible because you have to reset it manually for each shape. I currently have to select the brush, click "Select Face" and then center it. Then I have to unhide the alpha square and adjust the size of it, and you have to get those numbers almost perfect or you go too far and don't cut enough and get gaps, or cut too much and lose the effect. So my problems are the cutting system, the sharp lines along the edges nearest the camera, and the FPS cost. I'd like to get it to a point where it works to maybe round the edges of the quad in the shader and generally solve the edge problems. I'm not that good though so it may take me awhile.
  5. Maybe a better explanation: I overlayed the two images so you can see it's all inside the geometry. The space you can see between the red line and the yellow line are actually repetitions of the texture which you can only see because the parallax "sinks in" the texture. You're actually seeing beyond the boundary of the quad. So all I'm cutting are those (infinite, I presume) repetitions of the texture that wouldn't normally be seen anyway.
  6. Thanks, man. It took a long time to get it there.
  7. Dude I sit and drool over the stuff you're making over there. I'll gladly try it with some of your stuff.
  8. The trouble is getting the edges of the quad. But once you have that you can just shrink in a tiny bit and cut them off. My "alpha" is a black box that spans out from the center of the texcoords. Cut them too much and you start to see the gaps. The parallax effect is due to a depth coordinate, so it's actually sunk into the surface of the quad. So all I'm doing is cutting the repetitions of the texture beyond the quad. : quad_edge_sizing = -quad_edge_sizing; vec2 texcoord = abs(parallaxed_texcoords0.xy-0.85)*2.0/texture_size; float leftRight = clamp((quad_edge_sizing.x + texcoord.x - 1.0), 0.0, 1.0); float upDown = clamp((quad_edge_sizing.y + texcoord.y - 1.0), 0.0, 1.0); float alpha = clamp(leftRight + upDown, 0.0, 1.0); if (alpha > 0.0) discard;
  9. Was able to get self-shadowing on the parallax and cut the edges to give it a more 3D look. The shadows slowed it down, and the edge-cutting system isn't really developed at all. There may be better ways to do it. Right now it's mostly just something to look at and poke at. If you open the shader there's a bunch of variables at the top like the light direction(in the vertex shader), the shadow alpha, depth, etc. Still want to find a cheap way to soften the shadows and maybe find a way to round/smooth those sharp mesh edges, as well as get it faster, etc. Also I tried to break down the shader into sections to make it easier to mess with and to see which segment does what. I didn't feel like I quite got the depth before as when I saw some videos of other parallax shaders they looked way better. I'm getting there, though. The picture is the previous parallax/current parallax: Parallax Rocks.zip
  10. I have this parallax shader and got shadows working on it from the heightmap, but my question is is there a directional light uniform that allows me to grab the directional light rotation from the shader? I'm getting some light direction conflict. Also any information on softening shadow edges?
  11. There's this merc. He's got animations.
  12. Couldn't you set the model as a prefab then drag/drop that?
  13. So wait you're actually making 3d models and then creating 2d textures from them?
×
×
  • Create New...