Unreal Cook Book: The Magical Spline Mesh

Source: Internet
Author: User
What is spline Mesh?

Unreal 4 engine and unity3d A major difference is: Unreal 4 engine provides a very very many kinds of functions. This is because epic also develops games and is a very successful masterpiece. They will integrate some of the features that have been validated in the game project and can be reused by other developers to the engine layer. So the Unreal 4 engine has a lot to learn, but if you get the most out of it, it's probably easier to start a project. :)

This article describes a fun component of the Unreal 4 engine: spline and spline Mesh. Spline is a curve that you can add to the editor, move the control point, set the tangent of the point, and so on, while the spline mesh binds a static mesh to the specified spline curve and distorts the mesh based on the curve. This feature can be used to quickly make racing lanes, rivers, pipes, ropes/chains, etc. as shown.

The yellow pipes in the demo are built dynamically by the spline Mesh component, and the original footage is just this section of the tube.

Demo Project code Resources download

See CSDN Code Project: Https://code.csdn.net/neil3d/unrealcookbook
After you open this project, see the "Splinemeshdemo" directory.

Functional implementation of the detailed

This magical feature is implemented through a simple blueprint.
First, we need to create a base class for the actor blueprint class, and then add a spline component. This component is used to edit the curve in the editor.
Then, in construction script, we detected a few paragraphs of this spline, adding a Splinemesh component dynamically for each section. As shown in blueprint below. The newly added spline mesh needs to be attach to the parent node and is subject to information such as its start point, end point, tangent, and so on.

Unreal Cook Book: The Magical Spline Mesh

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: info-contact@alibabacloud.com 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.