Accurate motion blur for spark rendering in Houdini--a method for nonlinear difference of motion blur and a method for fixing particle number points

Source: Internet
Author: User

It is estimated that motion blur is performed using the speed of movement, but often the motion blur is linearly variable, although at first glance there is no problem, but if you want the fuzzy trajectory of each frame to be curved rather than stiff, A motion blur that uses trail to calculate speed is never going to do that.

Here I want to talk about some of the better ways I know about the motion blur of the usual spark (spark).

Motion blur in the so-called rendering is nothing more than a difference algorithm. At present, there are two main kinds of more used. The first is the direct use of the linear difference in speed, this method calculates the velocity direction of each point, calculates the position of the previous frame or the next frame, and linearly samples the current frame between two points to get the feeling of motion. The other is directly the displacement between the frame and the frame, let the geometry deformation difference to calculate the middle fuzzy state. In fact, the two methods are similar, but the latter has a benefit is that if the rendering target is Substep, then the first use of these substep to find the middle value between the frames, then substep is we get accurate motion effect blur.

Look at the comparison of the three graphs before you go into detail:

1 2 3

Three pictures are all using the same point of rotation animation, here for comparison I put the camera shutter open to 1, that is, each frame is a full-length difference, the other is set to the fuzzy offset is 0, that is, the front frame takes half the frame half to complete the current frame of the fuzzy rendering. The first graph directly uses the velocity values to interpolate the blur, can obviously see that the final form of the pattern even a closed loop is not counted. The second picture uses the traditional displacement interpolation, but the substep between each frame is linearly transformed, so it can be seen that a high-speed turn turns out to be a similar multi-deformation effect. The last one is calculated using my method of the median value, although not absolutely perfect match the ring, but the effect of the curve is very obvious, and has been very consistent with the eye to see the residual.

If we use scripts or expressions to drive animations in Houdini, we don't have to worry about the middle Substep because Houdini will help us find the exact location, because all the paths are calculated, no matter what point in time. And if we dump these animations in the form of geometry to the hard drive, the substep will all turn into linear interpolation between each frame (like Figure 2). And this is the same as the topology and the number of points before and after the premise of consistency. In the future, we'll talk about how to solve problems like particles changing in points on the timeline. We can extract the linear displacement animation directly into the chop to carry out more advanced nonlinear interpolation, so that the motion blur can have a smooth curve sense. Such as:

Through the bar P point data to be imported into the animation to get t[xyz] three curves, based on the current frame, respectively, more than two frames before and after the import (in fact, a frame can also, but two frames more secure), in the use of resample node between the segment and the paragraph to add a new point. It is worth noting that the use of cubic, that is, this brings a sense of nonlinearity. This method also ensures that all previous control points are on the curve, so it does not change the position of the points on each integer frame.

The interpolation method is this, and then the other is used in the spark of a very practical problem, that is the problem of the number of points instability. The method mentioned above must be based on the premise that the front and back frame points are certain. So if the particle life is not enough animation length, it is likely that the above method will directly die. But this problem also has a breakthrough, that is, the particle has a point attribute called ID. When the animation is finished, we pull to the last frame to know exactly what the last ID number is, and this number also represents how many of the particles have appeared.

The solution to this problem is to first generate the default point of the maximum number of IDs directly, whichever is better (preferably placing the initial position at the center point of the emitter). And then by the number of IDs and their own points, consistent, the position of the particle and other necessary properties directly to the generated fixed point, so that from the point of change to a fixed number of points up. This process I used a little vex:

1 intPopnum = Npoints (1);2Vector startpos = Point (2,"P",0);3 4  for(inti =0; i < Popnum; i++){5         intPopid = Point (1,"ID", i);6         if(@ptnum = =popid) {7Vector Poppos = Point (1,"P", i);8@P =Poppos;9[Email protected] =1;Ten                  Break; One}Else{ A@P =startpos; -[Email protected] =0; -         } the}

The alpha here is not visible when the dots are temporarily rendered without moving them.

I said that it is better to place the initial position in the center of the source, because this method combined with the above fuzzy difference or there is a small problem, that is, from the default point position to the point of the particle emission, the middle of this distance will also produce ambiguity, but this ambiguity is absolutely incorrect and not required, But fortunately the particles are generally emitted from the surface or volume of the object, we can completely use the source to cover this frame error.

below to see the effect of the spark contrast, in order to see the effect of the shutter or 1, but clearly can see which is inferior:

Traditional methods

The method of nonlinear difference value

Accurate motion blur for spark rendering in Houdini--a method for nonlinear difference of motion blur and a method for fixing particle number points

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.