Announcement

Collapse
No announcement yet.

[TOOL TUTORIAL] Vector Fields from splines in 3ds Max

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

    [TOOL TUTORIAL] Vector Fields from splines in 3ds Max

    Hi everyone,

    I'd like to share a Maxscript i've been working on to create vector fields for UE4 by using spline shapes in 3ds Max.

    You can download VFShapes from here: https://dl.dropboxusercontent.com/u/...1/VFShapes.mcr

    Feedback is more than welcome. If you guys make anything cool with it, please post it in this thread, i'd love to see it!




    Thanks.

    Ruben Henares
    Senior Technical Artist

    #2
    This is insane!

    Thank you Ruben!
    FREE VR Drum Kit Project
    FREE Color LUT Collection
    FREE Physics Driven Spacecraft Project
    FREE GTA Style Vehicle Interaction
    Dynamic DoF(Depth of Field)
    Camera Crossfade

    Comment


      #3
      I'm glad you like it Jacky. Let me know if you try it out and find any features you'd like to see added.

      Comment


        #4
        Wow...I'll check it when i get home. I once made a VectorField generator using Maxscript with FumeFX but it didnt go well.
        Unreal Issue Tracker - Desktop App for Unreal Engine Issues
        Unreal Nexus - Create Share and Experience!

        Unreal Engine 4 World-Wide User Map

        [PLUGIN] Aws Gamelift Client Plugin
        [TOOL] Create your own binary release of UE4 from GitHub source
        [Marketplace] Vehicle Soccer Template
        [Marketplace] Objective Waypoint System
        My UE4 Tutorials and Misc Tools

        Lead Programmer at YetiTech Studios
        Your Friendly Neighborhood
        Satheesh PV (a.k.a RyanJon2040) | Twitter, Instagram, Facebook, LinkedIn, YouTube, Google+

        Comment


          #5
          That was going to be my next project actually. I've seen a few guys asking about VF tools for Max. What was it that went wrong?

          Comment


            #6
            Originally posted by swat3d View Post
            Hi everyone,

            I'd like to share a Maxscript i've been working on to create vector fields for UE4 by using spline shapes in 3ds Max.

            You can download VFShapes from here: https://dl.dropboxusercontent.com/u/...1/VFShapes.mcr

            Feedback is more than welcome. If you guys make anything cool with it, please post it in this thread, i'd love to see it!




            Thanks.

            Ruben Henares
            Senior Technical Artist
            That was awesome
            UE4 high res character modelling, rigging for facial and full body animation - HERE
            Dave Saxon/AKA Lex Luthor Channel
            Seek And Destroy Games Channel
            Our Website here.
            Download free animations here

            Comment


              #7
              Hello Ruben, I have been using this tool now for a bit (great tool! thank you for this!), and would love to use it in combination with VF Rotation rate (rotates the vector field) but when I move the pivot in 3dsmax to the center of the box instead of at the bottom (to give it a propper rotation) it wont accept it and resets it back to the bottom.

              which results in this:

              Click image for larger version

Name:	2fd87ac8300d145152a1af44a9b76a48.png
Views:	1
Size:	20.5 KB
ID:	1050159

              The rotation in the particle editor results in this if I move the pivot


              (not moving one)


              Any ideas? suggestions? did i miss something?
              Attached Files

              Comment


                #8
                Hi Luos,

                I see what you mean. The pivot point in 3ds max is not used in UE. If you want the pivot of the VF to be centered in Cascade, you need to position your splines and the template box centered in the world. The origin of the world will be the pivot point position of your VF.

                Hope it helps.

                Comment


                  #9
                  Ahh, why didnt I think of that
                  Thanks! works like a charm now!

                  Comment


                    #10
                    Works great!!

                    Click image for larger version

Name:	sm1.png
Views:	2
Size:	568.7 KB
ID:	1050310

                    the plugin works pretty well but if I do 64x64x, my computer becomes nearly unusable, completely slammed by whatever processing it's doing..

                    Great work my friend, so happy you made this! One suggestion might be to allow to select different sizes, like 8x32, or 1x256

                    Let me know if I can help bug test or whatever. I am using max 2013. Thanks!
                    Last edited by p1LL; 04-29-2014, 11:20 PM. Reason: oops

                    Comment


                      #11
                      Hey,

                      Yes, maxscript isn't very fast really, try disabling the previewing of boxes and vectors, that should really help.

                      It actually supports the sizes that you mentioned. The density setting only determines the number of voxels for the longest side, if you scale the bounding box non uniformly you can get whatever size you want, it doesn't have to be square, it will round it to the nearest power of 2.

                      Thanks for the feedback! Let me know if you'd like any feature implemented or bug fixed.

                      Comment


                        #12
                        Wow this looks amazing. Great job.

                        Comment


                          #13
                          Should my computer be almost crashing with only 64x64? I don't have the live update on.. When I click "update" my computer becomes overwhelmed by whatever its doing..

                          is it slower with more complex splines? what number of vertices do you recommend keeping things under? In the example I used a text spline that spelled out my full name. is that too complex of a spline? I will try it again and optimize the spline and see if I dare try 256

                          Comment


                            #14
                            Hello again,

                            The script is taking forever.. so I figured I would take this opportunity to show you what I am working with, maybe I am doing something wrong. the 3 images pretty much show everything.


                            Click image for larger version

Name:	shape1.PNG
Views:	3
Size:	4.0 KB
ID:	1050339 Click image for larger version

Name:	top1.PNG
Views:	2
Size:	3.7 KB
ID:	1050341 Click image for larger version

Name:	settings1.PNG
Views:	1
Size:	30.4 KB
ID:	1050340

                            I forgot to optimize the curves, but they couldn't be more than 200 total..

                            Ok, so I optimized the curve, and started with 4x4. Worked fperfect, and took about 5 seconds..

                            Then I tried 8x8. no problem, took a bit longer..
                            then I tried 16x16. takes about 30 seconds..

                            So if I tried 128x128, I am thinking it will take 2 hours! Is that taking longer than it should?

                            UPDATE: I recreated the spline, simpler this time, and now I am trying 32x32 and... still going.. it will most likely finish but is taking approximately .. at least 5 minutes but it's not finished yet.. here is the current setup (I added red dots to show spline complexity):

                            Click image for larger version

Name:	Capture44.PNG
Views:	2
Size:	67.0 KB
ID:	1050342

                            Thanks in advance for your help!

                            ~s
                            Last edited by p1LL; 04-30-2014, 07:22 PM. Reason: update

                            Comment


                              #15
                              Hi,

                              It's a script so it's slow, it's not multithreaded. The complexity of the spline doesn't have a big impact, the main factor is the resolution of the grid. Take into account that it's a 3d voxel grid.
                              So if your bounding box is perfectly square and you set the resolution to 8, it's computing 8x8x8 = 512 voxels, increasing it to 16 is not twice as much, 16x16x16 = 4096 and 32x32x32 = 36864.

                              It's not crashing is just taking exponentially longer.

                              The only thing you can do is try to adjust the bounding box pretty close to your splines on all 3 axis to reduce the number of wasted voxels.

                              It could definitely be optimized by using custom functions and an octree to find the intersecting voxels and moving the heavy processing code to .net to take advantage of multi threading. But I haven't had the time to do that.
                              Last edited by swat3d; 05-01-2014, 04:03 PM.

                              Comment

                              Working...
                              X