In this video, I am using the awesome power of UE4 C++ to render High Definition Torus Knots…during Gametime!
That’s right, the editor was not open! This video was filmed in an independent game instance!
I adjust the various settings on the torus knot, leading up to HD, using my in-game UI system!
This video is dedicated to Epic’s choice to give us all C++ access!
Thank you Epic!
This video is also sharing with all of you, showing you how truly we can doing anything in UE4 thanks to C++ access
**HD Torus Knot** By the end of the video I am rendering torus knots with P 52 and Q 53 with 4096 circle segements! UE4 C++ is awesome!
My entire UI system is based in the HUD class!
I created my own user input field class / edit box class.
I also setup up the TABing feature for my input fields
**Implementation** I am using DynamicMeshBuilder to render the torus knot! For examples of using DynamicMeshBuilder check out PrimitiveDrawingUtils.cpp. Everything about the Torus Knot is under my control because I am supplying the code for generating the torus knot vertex and triangle render data. The reason the Torus Knot renders in stages is because I am controlling that myself in the C++, as the calculations are too much to do in a single tick. I could have calculated everything much faster actually, the speed I chose was for stylistic / artistic reasons :) I wanted to be able to see the shape building itself!
The data is not regenerated every tick, I simply load the cached vertex/triangle data into DynamicMeshBuilder.
**PDI** I was originally on a long hunt to figure out how to draw a 3d space triangle! To do this I knew I needed to access the PDI, the base 3d drawing surface. I cant disclose the code here due to legal reasons, but to get a sense of how to draw to the PDI of a UPrimitiveComponent, check out the .cpp for BoxComponent, and especially CreateSceneProxy()
UE4 C++ is awesome!
We can do anything!
Thank you Epic!
I hope everyone enjoys my HD Torus Knot Video!