Announcement

Collapse
No announcement yet.

[Video] The Power & Grace of UE4 C++: Dynamic Rendering of HD Torus Knots (for fun)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Video] The Power & Grace of UE4 C++: Dynamic Rendering of HD Torus Knots (for fun)

    Dear Community,

    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!

    ~~~

    UI

    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!

    ~~~

    Efficiency

    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()

    ~~~

    Summary

    UE4 C++ is awesome!

    We can do anything!

    Thank you Epic!

    I hope everyone enjoys my HD Torus Knot Video!

    Rama
    Last edited by Rama; 04-11-2014, 01:04 AM.
    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

    ♥ Rama

    #2
    bump, enjoy the video!
    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

    ♥ Rama

    Comment


      #3
      Nice work, Rama!
      Gerke Max Preussner | UE4 Programming Consultant

      Logo
      Follow me on Github | Goodreads | Linkedin | Pinterest | SlideShare | Twitter.
      Chat with me as gmpreussner on Discord.

      Comment


        #4
        Originally posted by gmpreussner View Post
        Nice work, Rama!
        Hee hee thanks GmPreussner!

        Thank you for UE4 C++ !



        Rama
        UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

        ♥ Rama

        Comment


          #5
          This was really helpful, as I was also trying to figure out how to draw 3d world space triangles like this.

          Thanks for the pointers in the right direction Rama!

          Comment


            #6
            Nice post !

            There is some way of getting mouseclick () events or get hit proxies on primitives draw with FDynamicMeshBuilder ?

            On docs https://docs.unrealengine.com/latest...h/2/index.html we have a parameter with HHitProxy* that can we pass when use GetMesh(...)

            GetMesh
            (
            const FMatrix & LocalToWorld,
            const FMaterialRenderProxy * MaterialRenderProxy,
            uint8 DepthPriorityGroup,
            bool bDisableBackfaceCulling,
            bool bReceivesDecals,
            bool bUseSelectionOutline,
            int32 ViewIndex,
            FMeshElementCollector & Collector,
            HHitProxy * HitProxy
            )

            But how can I get That HitProxy* on other parts of code not only on CustomMeshComponent using a FSceneProxy()

            Thanks

            Comment

            Working...
            X