Announcement

Collapse
No announcement yet.

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

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

  • replied
    Thank you so much for this script! I can't believe I just stumbled onto this (thanks Tim!), I've been playing with it for a few hours now and am having a lot of fun with this.

    I thought creating Vector Fields would be so much more difficult, this is great!

    Leave a comment:


  • replied
    Awesome work!! 5 stars!!!

    can anyone port this as a blender plugin??? Its a free software and for simple stuff like generating a Vector field, I don't think we need max. So if anyone could make this work in blender that would be totally cool.

    Leave a comment:


  • replied
    Great script !!!

    This is an excellent tool ! Great for creating 'defined path' type vector fields that would be difficult or impossible using Epic's Maya fluids tool (which is more suited for creating complex simulation fields)

    I just did a test and it works great:

    Click image for larger version

Name:	VF_splines_Maxscript.jpg
Views:	1
Size:	104.9 KB
ID:	1057813

    Click image for larger version

Name:	VF_splines1_Thumb.jpg
Views:	1
Size:	27.5 KB
ID:	1057814




    One question. I would like to use NURBS curves instead of regular splines. I didn't see an obvious way to convert NURBS curves into editable splines, so do you know if this possible? If not that might be a cool feature for your script (allowing NURBS curves to be used).

    Thank you for writing this script and sharing it with us!!
    Last edited by sunlite; 10-15-2014, 01:32 PM. Reason: minor tweak

    Leave a comment:


  • replied
    good men

    Thank you men

    Leave a comment:


  • replied
    That looks pretty awesome man!
    I've been pretty busy lately but I'll try to work on version 2 soon after seeing what you guys are doing.
    Last edited by swat3d; 06-05-2014, 07:02 PM.

    Leave a comment:


  • replied
    currently trying to export a 128 density complex vector field setup.
    Maybe I should book a vacation

    Nontheless, I am so enjoying this plugin!
    So once more, thanks!

    Edit:

    Last edited by Luos; 05-09-2014, 01:16 PM.

    Leave a comment:


  • replied
    That a super handy plugin man! Thx for sharing.

    Leave a comment:


  • replied
    This is an excellent plugin! Guess I won't be putting off learning particle systems now. Can't wait to try it out. In terms of features, however, in order to speed up the processing of the voxels, you might want to try and allow the user to define what voxels will not be used, like having them place geometry in areas that will not be used and having the voxels check for that geometry.

    Leave a comment:


  • replied
    hey again!

    That makes sense, I tried making a 1x64 and it was quite fast. I forgot to take a screenshot of it, but here is the 32x1 version:

    Click image for larger version

Name:	spiralvf.PNG
Views:	2
Size:	256.0 KB
ID:	1050390

    One issue I am having is the direction of the flow. I see there are parts to the voxel array, voxels hit and voxels not hit. is there a way to assign a force to the voxels hit? Would it make sense if I wanted voxels hit to "leave" and voxels not hit to attract? or vice versa? And I have a couple more questions, if you don't mind

    Do the length, width, and height segments affect the VF at all?

    What is the general rule regarding vector size?

    Also, In my mushroom cloud experiment from before, the flow of force came out strange.

    Click image for larger version

Name:	shape1.PNG
Views:	3
Size:	4.0 KB
ID:	1050389

    I couldn't get the particles to go up through the main shaft and then curl around, they would only curl around if the particles came from above the mushroom cloud top. I will experiment with it more to see if I can make the particles behave, this is still new to me but I a m catching on quick!
    Last edited by p1LL; 05-01-2014, 08:22 PM. Reason: update

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    Wow this looks amazing. Great job.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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

    Leave a comment:

Working...
X