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!



COMMENTS

  • harryabreu 7 months ago  | 

    Thank you very much ;-)

  • rovewar 7 months ago  | 

    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 7 months ago  | 

      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 7 months ago  | 

    How is this for beginners?

    • Bogdan Lazar 7 months ago  | 

      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. :)

  • hitch2 6 months, 4 weeks ago  | 

    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 months, 2 weeks ago  | 

      nice i fix that thing...

      cant wait for part 2

  • teak421 6 months, 3 weeks ago  | 

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

  • ASAHEL ABISAI MARTINEZ 6 months, 3 weeks ago  | 

    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;

    • DosedMartian 1 month ago  | 

      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 5 months ago  | 

    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 3 months, 2 weeks ago  | 

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

    Thanks for your splendid contribution.

  • jerjozwik 3 months, 1 week ago  | 

    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 1 month, 2 weeks ago  | 

    Tutorial part 2 anytime soon ?

    Cheers !

Please log in to leave a comment.