Houdini Algorithmic Live #060 - Quadrilateral Remesh Junichiro Horikawa・2 minutes read
Junior Horikawa hosts a tutorial on quad remeshing in Houdini using algorithmic design methods, showcasing a method to create quad faces from any geometry. The tutorial emphasizes the importance of maintaining 90-degree angles at each corner, using various techniques like dissolving edges, splitting and collapsing, and applying directional forces to achieve a clean quad face.
Insights The tutorial by Junior Horikawa demonstrates a recursive method for quad remeshing in Houdini without plugins, focusing on achieving smooth quad faces from any input geometry. The quad remeshing process involves dissolving edges based on principal curvature calculations, utilizing feedback loops to gradually transition triangles into quads, and applying forces to balance quad areas for optimal results. By emphasizing the importance of principal curvature, directional values, and iterative smoothing within a solver, the tutorial showcases a comprehensive approach to creating clean quad faces with 90-degree angles, providing a foundation for further exploration of advanced techniques. Get key ideas from YouTube videos. It’s free Summary 00:00
Creating Quad Remesh in Houdini Tutorial Junior Horikawa hosts a weekly tutorial live for Houdini using algorithmic design methods. The 60th episode focuses on creating a quick and dirty quad remesh from any input geometry. The method involves using a recursive method or a solver to achieve the quad remesh without plugins. The quad remesh aims for smoothness but may not match the quality of sophisticated plugins. The tutorial showcases an easy process to create quad faces from any geometry. Ideal quad faces have four neighbors to maintain a 90-degree angle at each corner. The method can be applied to various software, including game engines. Steps include triangular remeshing, defining flow based on principal curvature, dissolving edges, and splitting and collapsing. Isolated triangles are addressed by subdividing the mesh to convert triangles into quads. A final step involves optimizing deformed quad faces to resemble squares through simple simulations. 27:24
"Quad Remeshing: Precision in Geometry Reconstruction" To create a clean quad face, a directional value is established from the corner to the cross corner point, with a gradual reduction in distance to align all edges with the average. The process involves moving each quad point slowly to maintain square shapes, considering the small steps to prevent neighbor interference. An additional force is applied to balance quad areas by calculating the average face area and adjusting each face's size accordingly. The difference between the average area and each face's area determines whether to shrink or expand the geometry, influencing the vertices' movement. The strength of the forces applied to move vertices towards or away from the center should be minimized to prevent drastic changes that could disrupt the geometry. Smoothing the geometry involves dissolving edges based on principal curvature calculations, which are refined by blurring the geometry for smoother results. The principal curvature is calculated from a higher-resolution original geometry to ensure accuracy, guiding the edge dissolution process. The point positions are restored to their original state after curvature calculations to maintain accuracy for edge dissolution decisions. Using a feedback loop, points are iteratively selected based on neighbor count to dissolve edges gradually until all triangles have four neighbors. Starting with points having the highest neighbor count, edges are dissolved based on directional information and principal curvature to achieve a quad remesh. 52:30
Efficiently dissolve edges in geometry with code. To dissolve edges in a geometry, use the Dissolve node and define the edge group to dissolve. Create an attribute wrangle to identify edges for dissolving by looking at each point. Name the group as "dissolve edge group" to use in the Dissolve node. Use a detail attribute wrangle to avoid simultaneous calculations for each point. Write code to loop through all points, checking neighbor information and edge lengths. Skip dissolving edges if the neighbor count is less than or equal to three to maintain mesh structure. Retrieve curvature values at each point position for calculations. Calculate dot products between triangle centers to find edges for dissolving. Update the edge group with the chosen edges to dissolve. Stop the loop when all points have been checked and edges dissolved. 01:18:05
"Stop feedback loops by dissolving edges" To stop the feedback loop, set the detail attribute to "stop" at 1. Start by adding "dissolve" and identify the dissolved edge. Check the curvature of the reshaped edge to determine the direction. Dissolve edges based on the curvature direction similarity. Increase loop iterations to dissolve more edges until no triangle pairs remain. Use stop conditions to halt the loop when no triangle pairs are found. Reduce feedback loops by setting stop conditions based on the detail attribute. Maximum feedback loop number is 212. Adjust the smoothness of curvature to impact dissolving results. Skip dissolving edges in specific conditions, like when a point has three primitive neighbors or when half edge values are equal. 01:43:57
Analyzing Mesh Structure with Half-Edges The situation involves working with a quad, not triangles, with four points. Looping through neighbor points using a loop and length of neighbors to obtain neighbor point information. Retrieving half-edge information at one of the points to establish connections with neighbor points. Utilizing functions like 'edge next equivalent' to retrieve equivalent half-edges. The process involves identifying triangles and quads and transitioning between them. Retrieving half-edges for different primitives to determine the structure of the mesh. Using the retrieved half-edges to estimate the primitive conditions (e.g., 3-4-3) for further actions. Exploring the use of 'half-edge' for mesh analysis and structure understanding. Retrieving primitive and vertex numbers from the obtained half-edges. Creating new quads based on the obtained points and removing unnecessary primitives to refine the mesh structure. 02:11:43
"Creating Square Quads with 90-Degree Angles" To add two quads, compare diagonal lengths and skip splitting if the edge to be split is longer than the other diagonal edge. Calculate the distance between diagonal points to determine if splitting is needed. Create a split line if the distance between points is smaller than the diagonal distance. Continue creating splits until no more are found, then stop the loop. Use a subdivide node to split and collapse triangles into quads. Smooth out faces to achieve square-shaped quads with 90-degree angles at corners. Implement forces to adjust quad shapes, focusing on achieving 90-degree angles. Calculate average point positions for each quad to guide point movement. Use a feedback loop to iteratively adjust point positions for smoother quad shapes. Use a primitive wrangle to rotate points and achieve desired quad shapes. 02:38:51
Rotating Points to Create Square Mesh The process involves creating a nesting loop starting from n equal to i plus 1, iterating through four points. For each iteration, the point is rotated either 90, 180, or 270 degrees counterclockwise based on the value of n. The rotation angle is determined by multiplying 90 degrees by an incrementing integer count. After rotation, the rotated positions are added to the average point positions and divided by four to get the average positions. The center of the primitive is accessed to rotate the points around it using a rotational matrix. The process involves rotating only three points for each iteration, not all four points. The directional force is calculated by subtracting the current point positions from a target position and normalizing it. The force is then multiplied by a distance factor and a coefficient value to control its strength. The force direction is added as an attribute to each point using the add option. The force is used to move the points towards the target direction in a feedback loop, aiming to create a square mesh. 03:05:24
"Area difference determines shrink or expand" The difference in area between the current and average areas determines whether to shrink or expand the current primitive area. Directional values are calculated based on the area, with direction one going from the current point position to the center of the primitive. Multiplying the directional value by the difference in area determines whether to shrink or expand. The directional value is squared to create a force, then multiplied by 0.5 and half the area. Two directional values are added together to determine the final direction. Updating the square and area values after each iteration refines the remeshing process. Resetting the directional value to zero after calculations prevents unwanted results. Increasing the number of iterations results in a smoother remeshed surface. Using a solver allows for iterative smoothing of the geometry. Fixing unshared edge positions and maintaining corner points ensures a cleaner and more accurate remeshing result. 03:33:46
Optimizing Point Positioning for Quad Meshes Check each point in the geometry to find the closest distance to a naked edge, especially focusing on corner points. Use the "near point" function with the end and near positions to calculate distances and identify points needing adjustment. Fix points with distances close to zero by resetting their positions to the original. Adjust the conditions and iteration values to ensure proper point positioning. Implement the process within a solver by connecting inputs and ensuring smooth movement based on time. Increase the coefficient value for faster results in grid shapes. Demonstrate the process of creating a quad mesh from any input geometry, emphasizing the importance of principal curvature and suggesting further exploration into more sophisticated methods.