• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

132 Neutral

About MtSMox

  • Rank
  1. Animate textures

      I think it will come down to something like this.       I don't really understand what you are saying here. Do you mean frames as in multiple copies of the same mesh in one vertexbuffer? You mentioning a matrix makes it look like a skinned mesh again.
  2. Animate textures

    So I guess I will need the depth information for that. I will look into it, thanks!
  3. Animate textures

      I've recently also been looking into outlining and I guess this could use the same techniques. Rendering to a texture, blurring the texture and then render the result back on a fullscreen quad.   Would this not be a problem with occlusion? The blur could probably go over the occluding object, could it not?   But I do think you make a good point. I should think about my rendering needs and setup the required architecture. Lately i've also been looking a deferred shading, which could also help here I think. Though I'm not sure if that is overkill right now.
  4. Animate textures

    Having a glow material would require me to render it as a separate pass would it not? And the single ring mesh above that would be another pass, for each ring that I move it up and down for. So that is a lot of passes. Making it really glow instead of only changing the diffuse saturation would probably require another pass, but I would like to keep the passes to a minimum.     For encoding the ring index I was also thinking of adding it as the alpha channel for the diffuse channel. Decoding this could be messy, but should work. Although this will mean that every ring will have to get its own uv space, this should probably only be a few pixels for each ring. Without this every ring could occupy the same uv-space.But including a color attribute will also waste space. In the end you always have to store it somewhere    --edit I guess storing an int in the alpha value could be problematic with mipmapping. You wouldn't want the indices to blend together. Otherwise it seems to work. But I guess separate vertex attributes are better. Be it as color or as extra uvs.
  5. Animate textures

    Yeah, I think that might do the trick. Gives me a lot of freedom to base the animation on. Thanks.
  6. Animate textures

    Do you mean doing another render pass to only draw the coils? To set the parts of the coil that should glow? I think that still leaves me with the task of finding out what part of the coil should be setting the mask. If not, what should the texture mask look like?   I also thought about making a complete linear glow, that could be based on the z-coordinate of the vertices. But I would like to keep the glow of a ring the same for all the vertices off the ring. Something like the following.   [attachment=24944:coils2.jpg]   I don't know yet whether I will like this 'discrete' glow, but I want to animate this before trying the complete linear approach.
  7. Hi,   I'm working on a model that I would like to animate some part of.   [attachment=24943:coils.jpg]   Here the red rings of each coil should glow, while the timing of the glow should make it look like it is going down the complete coil.   For "normal" animation by skinning or even vertex keyframes I have the habit of keeping all of the vertices in one object. But as far as I can tell there is no good way to keep all the rings in one object and still animate this color transition separate for each ring. Maybe I could have 2 sets of uv's? But even then I don't see a flexible way of changing the timings: duration of glow, delay between next ring to start glowing, delay before first ring starts next sequence.   One solution I see is making each ring its own object so it can have its own timing variable for the shader. But I don't like this as it increases the draw calls by a lot.   Is there a better way to animate something like this?   Thanks, Mox
  8. Curvature of a Spline

    Hi, While doing research on the subjects of splines (cubic b-splines with uniform knots in my case), I found the following posts on calculating the curvature of a spline. Spline Radius of Curvature Quote:K(t) = Length(Cross(X'(t),X"(t)))/pow(Length(X'(t)),3) Curvature of a Bezier *SOLVED* Quote:dT/ds = (v' / |v|^2) - (v * (v.v') / |v|^4) I also found the first equation on http://mathworld.wolfram.com/Curvature.html That was the first equation I tried, but it gave weird results. Most of the time it showed promissing results, but it looked like it was not really working. It kinda looks like it is dT/dt instead of dT/ds, as it gives high values were the curve isn't changing that much. The second equation works better, but I'm not sure if it is correct, since I can't seem to produce the same equation following the steps taken in that thread. It's a bit hard to describe the differences, because the problem only becomes evident when you apply the equation on a complete curve to test if is working. I'll look if I can generate a rendering of the outcome to make it clear. So my first question is: what is the difference between the two equations? And the second question: Why wouldn't the first one work? Could it be a problem with my implementation? Or does the equation require a spline parameterized to arc length (mine isn't right now, but this doesn't seem to stop equation 2). Hope somebody can help me clearify this. Thanks, Joren [EDIT] Of course it turns out it's just a bug in my code that made the difference. I devided by |X''|^3 instead of |X'|^3 I would still like to know if equation 2 is correct. As I can only get to something like this: dT/ds = (v'*|v| - |v|'*v)/|v|3 But I don't really know what |v|' is. All I could think of that |v|' might be rewritten as: d|v|/dt = d|v|/ds * ds/dt = 1 * ds/dt = |v| but I don't know if this is correct as this doesn't lead to equation 2. I assume d|v|/ds is 1 as I want constant speed for arc length, but don't know if this is valid. I do like equation 2 better as it returns a vector and for equation 1 I don't know how to get the direction of the curve. Joren [Edited by - MtSMox on February 12, 2010 5:03:58 PM]
  9. B-Spline walking at constant speed

    Thanks for the link Maze Master, that article has a lot of interesting techniques. Currently I only have uniform B-splines with no extra info for the control points for movement. So the Euler integration looks interesting. I'll see which method works best, that one or one of the methods in the article. What do you mean by singularities? Discontinuities in the spline? Due to knots with higher multiplicity or something like that? So I probably don't have to worry about that with uniform B-splines. And any thoughts about clamping the spline? Thanks, Mox
  10. B-Spline walking at constant speed

    Ok, thanks. And I was thinking I had read almost everything on splines in the last few days. Those are some new terms. Always good to get new input. By the way, my current implementation only covers uniform cubic B-Splines, but I would really like to clamp them (interpolate begin and end point). But I believe this requires me to have different basis functions for each knot. Am I correct? Now I'm using 1 matrix, which really makes things easy. Is there an easy way to clamp the spline? The way I do it now is extend the first and last segment with one extra point. But is there another way? Thanks, Mox
  11. Hi all, I have a question about B-Splines, but it probably applies to other curves as well. I've been thinking about using B-Splines some time and finally have some implementation that also includes derivatives. But now I have a question about their application. They are very widely used and I was thinking of using them to do camera movement and other path related things. So I can use the calculated position I'm currently using for the position and the derivative to point the camera or other object traveling along the curve. But I'm having trouble letting the camera travel at a constant speed. As some parts of the curve can be more stretched than others. This could probably be solved by changing the control points, but this isn't desirable. Is there a way to travel over a curve with a constant speed? Would forward difference also help here, as I've read that some people use this? Or could this make things more difficult? Thanks, Joren
  • Advertisement