First part of a 90 minutes tutorial about how to simulate a realistic Sun in Houdini software.  It covers topics like : vex coding, vector calculus, VDB volumes, particle simulation , magnetic field and much more. I hope you'll enjoy watching this as much as i enjoyed doing it. Second part coming soon

If you have any questions about this setup, write me at bogdan@golemstudio.ro.

Thank you and enjoy!



コメント

  • harryabreu 6 年, 12 ヶ月 前  | 

    Thank you very much ;-)

  • rove 6 年, 12 ヶ月 前  | 

    Very nice tutorial!

    When I add the popgrains and start the simulation, the points start to slowly move away from the sun's surface. I added the popgrains without changing any of it's default settings. If I bypass the popgrains they again stick to the surface. Any idea what's up with that?

    • Bogdan Lazar 6 年, 12 ヶ月 前  | 

      Hi
      Could be many causes.
      Did you create an pscale attribute? If yes , try lower it. My guess is that when you activate grains, they collide to closely. or they are too many . So try to lower the pscale radius. Hope it helps

  • DevinHoudini 6 年, 12 ヶ月 前  | 

    How is this for beginners?

    • Bogdan Lazar 6 年, 12 ヶ月 前  | 

      I had a lot of comments from friends that is not so hard what i do here. So i decided to call it "Begginer"tut. :)

  • i_HiTcH 6 年, 11 ヶ月 前  | 

    thanks for great tut indeed
    i wanted to do some rendering test
    i just having some issues on rendering the mantra cant fir geometry obj/Magentic_field/merge2

    • i_HiTcH 6 年, 11 ヶ月 前  | 

      nice i fix that thing...

      cant wait for part 2

  • teak421 6 年, 11 ヶ月 前  | 

    Outstanding tutorial... When are you planning on releasing part 2? Thanks!

  • ASAHEL ABISAI MARTINEZ 6 年, 11 ヶ月 前  | 

    I have some error when I put the code in the wrangle node, its this correct ?



    //open a point cloud for all points in Input 2 where (our pole points are connected)

    int handle = pcopen(@OpIput2, "P", v@P, 10.0, 50);

    //initalise a vector (magVecField) with no values

    vector magVecField = set(0.0,0.0,0.0);

    // "iterate" with "while" loop through all the retrieved points ( pts) using "pciterate" VEX function

    while (pciterate(handle))

    {

    // define cariables to work with - float (pole) for magnetic charge and vect (pts) for points position

    float pole;
    vector pts;

    // import the (pole) value from the points in input 2

    pcimport( handle, "pole", pole);

    // import position of the points (pts)

    pcimport(handle, "P", pts);

    // calculate the vector (dist) between (pts) and voxel position (v@P)

    vector dist = v@P - pts;

    // calculate magnitude (mag) of vector (dist)

    float mag = length(dist);

    // calculate normalise distance (ndist)

    vector ndist = normalize(dist);

    // find magVecField by multypling pole with ndist and with invers of the squared dist *NEW

    magVectField += pole*ndist*(1.0/(mag*mag));


    }

    // set our magneticfield inside voxel (v@P) to magVecField

    v@magneticfield = magVecField;

    • rbjork 6 年, 6 ヶ月 前  | 

      It seems you're missing an "n" when defining "handle".

      This code worked for me(no comments though):

      int handle = pcopen(@0pInput2, "P", v@P, 100.0, 100);

      vector magVecField = set(0.0, 0.0, 0.0);

      while (pciterate(handle))
      {

      float pole;
      vector pts;

      pcimport( handle, "pole", pole);

      pcimport(handle, "P", pts);

      vector dist = v@P - pts;

      float mag = length(dist);

      vector ndist = normalize(dist);

      magVecField += pole * ndist*(1.0/(mag*mag));

      }

      v@magneticField = magVecField;

  • ragupasta 6 年, 9 ヶ月 前  | 

    I agree that this is not a beginner tutorial.

    However: It is a very good tutorial. it has a lot of depth, it's well made and the theory really helps in understanding what is going on.

    Part 2 needs uploading, will be amazing to see this finished.

    Thank you.

  • Isaac_Peral 6 年, 8 ヶ月 前  | 

    Hi Bogdan,
    The entire planet wait for the second part of your sun.

    Thanks for your splendid contribution.

  • ujerjozwik 6 年, 8 ヶ月 前  | 

    i just started houdini tutorials 2 days ago, this was a bit of a struggle for beginner but i was able to complete it and am seriously impressed by it. my mind was buzzing all night thinking of other applications for this!

  • Imconected 6 年, 6 ヶ月 前  | 

    Tutorial part 2 anytime soon ?

    Cheers !

  • Grigrory Sadovnikov 6 年, 4 ヶ月 前  | 

    i want watch 2nd part, very interesting tutorial! THX!!!

  • mrWolf 6 年, 4 ヶ月 前  | 

    I worked on something very similar a few years ago. But your tut looks a lot easier to understand. Well done !!

    http://pepefx.blogspot.com/2015/08/how-to-create-magnetic-vector-field-in.html

  • zhoukai 6 年, 4 ヶ月 前  | 

    cool,thx.

  • Michael White 5 年, 11 ヶ月 前  | 

    I love this tutorial, but am I the only one that can't get past entering the code into the volume wrangle.
    No mater what I get error compliling VEX code. I've started over 3 times with a fresh scene and still no matter what I can't get the proper results entertaining
    (int handle = pcopen(@0pInput2, "P", v@P, 100.0, 100);

    vector magVecField = set(0.0, 0.0, 0.0);

    while (pciterate(handle))
    {

    float pole;
    vector pts;

    pcimport( handle, "pole", pole);

    pcimport(handle, "P", pts);

    vector dist = v@P - pts;

    float mag = length(dist);

    vector ndist = normalize(dist);

    magVecField += pole * ndist*(1.0/(mag*mag));

    }

    v@magneticField = magVecField;)

    I only put ( ) to show the code separate from my question no I didn't enter the code with ( ) at the beginning nor the end in the volume wrangle.
    I do have some idea of coding after 28 years in the 3D world with 3DS and 3DS Max. Actually had IPAS procedural textures on the market back in the early 90's SDP's SXP's

    I get perfect results with only entering v@magneticfield = set(1.0,0.0,0.0);

    What I've noticed though if I go into volume wrangle and volume trails to see the reasons for the error there's a blast1 and blast2 in which I did not put in there. Are they supposed to be there? I wish I could attach screen caps from what I'm seeing. The errors are way to many for me to input typing with my phone. I could go through the computer and copy and paste them in here. My thoughts is that the blast1 and blast2 are the issues. I'm new to Houdini since I never had such a powerful computer as I have now a Z800 Xeon 6 Core hyoerthreading and 48 gigs of ram. This tutorial is barely using any of the CPU or RAM only like 6 megs of RAM being used and 1 to 3% of the 12 logical processors.

    Thats why I've wanted to break into Houdini since its not that big of a resource hog as other software I use.
    Also check out Prisma which is free linking all software together.
    Well anyone have a solution please let me know. I would love to finish the tutorial. I'm basically stuck at the point of entering the code and can't continue no mater what I try since when I try to remove the blast1 and blast2 I get access denied. Weird.

  • TreevDee 5 年, 7 ヶ月 前  | 

    When I added the v@magneticfield and put in the values, nothing happened. Is there something I missed?

  • TreevDee 5 年, 7 ヶ月 前  | 

    I followed everything you did to a T, but it still doesn't work

  • forrestvfx 5 年, 4 ヶ月 前  | 

    I would love to see this done on VOP instead of VEX. My brain hurts.

Please log in to leave a comment.