Jump to content

lightning effect round an object (eg torus)


anthonymcgrath

Recommended Posts

hi chaps i've had a search first and found a few threads but most of them seem to be point to point affairs and test scenes.  I'm trying to create a lightning effect around a simple torus shape but not sure how to tackle it really.  I dived into L systems and seen that it has a lightning preset - but the only thing i seemed able to do was use a bend or deform to sort of twist it into a circle.  Does anyone have any quick suggestions or example scenes on how to tackle this?  I need to output geometry too at the end so i can use it as an emissive light source too potentially :)

thanks!
ant

Link to comment
Share on other sites

Here was my first thought.

What if you take a l-system lightning preset and remove the default randomization on the seed. Then you resample and animate a carve to make it draw on, reveal it's full shape then draw off. Run that through a Ray sop with the torus as the collision object. Follow up the line with a polywire and a little lift and the lightning appears to travel around the collision object. I duplicated that setup and chose another l-system seed for the second copy. I shifted the animation on this version a little farther down the timeline. This gives you an initial effect and then a follow up.

You can even animate the collision object just watch out for using too much lift in that case.

lightning_torus.gif

ap_lightning_torus.hipnc

  • Like 1
Link to comment
Share on other sites

ok chaps i've put a little test scene together based on some of things i've read - its pretty simple... torus.. points from volume.. create wires with adjacent node thing..  then polywire.

however i'm having an issue trying to get the wire thickness to be editable by a ramp - so each wire in the polywire has a thickness of 0 to 1 to 0 for example based on a ramp value.  I've attached a scene if anyone has any ideas cos its giving me the red a$$  :(  i'm still struggling with all the attribute create/wrangle and wotnot sadly :/
 

torus_lightning_test.hip

Link to comment
Share on other sites

Here is a simple setup. An attributeWrangle, running in point mode, creates a spare parameter called @my_wire_radius. This can be used directly as the value for the wire radius in the polywire node. The basic permis is that the points are ordered and that the current point number is essentially a percentage between 0 and the total point count. This percentage is fed into the chramp("ramp_profile", pct); which returns the current value from the ramp from left to right, 0-1.

Untitled-1.jpg

ap_vex_links_ramp_to_polywire_profile.hiplc

Link to comment
Share on other sites

On 10/24/2016 at 11:30 AM, anthonymcgrath said:

ok chaps i've put a little test scene together based on some of things i've read - its pretty simple... torus.. points from volume.. create wires with adjacent node thing..  then polywire.

however i'm having an issue trying to get the wire thickness to be editable by a ramp - so each wire in the polywire has a thickness of 0 to 1 to 0 for example based on a ramp value.  I've attached a scene if anyone has any ideas cos its giving me the red a$$  :(  i'm still struggling with all the attribute create/wrangle and wotnot sadly :/
 

torus_lightning_test.hip

Hey there, an easy way to get gradients on curves is to use fit with the point number with a max of npt (total number of points)-1, you can also use the uv texture node set to rows & columns which should produce a 0 to 1 u value gradient. 

 

In terms of lsystems, unless you are customizing it a great deal, I would turn to pops to create your lightning arcs. More control and organic behavior possible there. Here is an example of a 'Rolling lightning' test I did for a job way back when:

 

For this I had 'arc points' scattered in the volume and a single particle would lead the direction of the arc. As it moved across the point cloud it would send out replicants that would try to connect nearby arc points as well as respect any custom forces (for example I wanted them to go from top to bottom, so they would do a point cloud lookup and get their desired target point then add in whatever custom downwards vector or noise I specified). If this seems like overkill then stick to lsystems, I just wanted to share the concept with you thinking maybe it would get some gears turning :) 

 

On another note there is a thread: here where a user put forth his space colonization otl that I could see also being very helpful in creating organic arc like shapes. Its a very similar process from what I did only its wrapped up nicely and fairly easy to understand if you take it node by node ;)

 

-N

Edited by narbuckl
  • Like 3
Link to comment
Share on other sites

@narbuckl
 - that is REALLY cool - very subtle but love the way it traverses and rolls across the cloud - that kinda thing would be perfect.  What you say makes sense there with the setup altho i'm still trying to wrap my head around the particle side of houdini really.  man i really need to dig into houdini some more i freaking love it but it blows my mind the way ppl who use it frequently wrap their head around the procedural thinking of tackling such tasks!

Link to comment
Share on other sites

23 hours ago, anthonymcgrath said:

@narbuckl
 - that is REALLY cool - very subtle but love the way it traverses and rolls across the cloud - that kinda thing would be perfect.  What you say makes sense there with the setup altho i'm still trying to wrap my head around the particle side of houdini really.  man i really need to dig into houdini some more i freaking love it but it blows my mind the way ppl who use it frequently wrap their head around the procedural thinking of tackling such tasks!

Thanks, glad you like it :)!

 And yes Houdini is a magical creature! One of the things I tell Junior TD's or students when they start is that you need to treat Houdini like a blank canvas with all the paint brushes in the world. You can literally do whatever you want, but its not going to tell you how to do anything, don't be afraid to just try shit based on the 'this should work' logic, because thats all it is :P Don't be afraid to break it! Its all just data and figuring out different ways to get from point A to point B with that data.

That test was from an old job directory, I'll see if I can get my hipfile unarchived for it and let ya have a go if ya want! I know I always learn the most by working backwards through more complicated setups, plus you get to see how other people think! If I can't get it onlined I'll put together something new for ya to play with, if thats something you might be interested in?

-Nathan

  • Like 2
Link to comment
Share on other sites

@narbucklthat would be awesome if you can share a basic scene setup! :)

Yep I'm very fond of playing about in houdini it really is a superb toolbox to twiddle in. I did a digital dancers anim in 2 weeks for a laugh and most of that was following a few tutorials and reverse engineering some setups to do what I needed with it. It's pretty basic but was great fun to do!  That level of flexibility and creativity is something I've never been able to do in maya tbh

 

Link to comment
Share on other sites

  • 2 weeks later...
On 10/27/2016 at 0:35 PM, Sepu said:

Hey Nathan I think everybody will benefit from that, so I do not have anything to do with this, but I'm interested! ; )

Thanks!

 

On 10/28/2016 at 2:03 AM, anthonymcgrath said:

@narbucklthat would be awesome if you can share a basic scene setup! :)

Yep I'm very fond of playing about in houdini it really is a superb toolbox to twiddle in. I did a digital dancers anim in 2 weeks for a laugh and most of that was following a few tutorials and reverse engineering some setups to do what I needed with it. It's pretty basic but was great fun to do!  That level of flexibility and creativity is something I've never been able to do in maya tbh

 

Found the file but odforce is having some issues with posting files on their forum, shoot me your emails, otherwise I will post it once Marc fixes the upload file problem.

 

-N

Link to comment
Share on other sites

I followed this tutorial along.. took me about 20 mins to run thru.. very simple trick but effective!

And an hour later I had this by simply plugging an alembic char walk cycle into the top.. exported the lightning to maya.. stuck the char in the middle and made him a light source mesh :P

 

  • Like 2
Link to comment
Share on other sites

On 11/13/2016 at 10:03 AM, stickman said:

narbuckl... still struggling with the scene. But no matter... it's so cool!

If three is some part of the setup I can shed light on I would be happy to, just ask :) 

It gets a little involved simply because I really wanted a very specific behavior of the lightning, and I wanted it to be directable. So everything is done to cater to that purpose.

 

If the scene complains about missing asset definitions I can assure you that they aren't necessary for the fx network to compute. It's probably just the backdrop and some informational nodes. The backdrop was modeled after a standard photoshoot type backdrop so L shaped with curved intersection.

 

-N

Link to comment
Share on other sites

  • 10 months later...
On 10/24/2016 at 8:02 PM, Atom said:

Here is a simple setup. An attributeWrangle, running in point mode, creates a spare parameter called @my_wire_radius. This can be used directly as the value for the wire radius in the polywire node. The basic permis is that the points are ordered and that the current point number is essentially a percentage between 0 and the total point count. This percentage is fed into the chramp("ramp_profile", pct); which returns the current value from the ramp from left to right, 0-1.

Untitled-1.jpg

ap_vex_links_ramp_to_polywire_profile.hiplc

 

thread revival time !  :)

 

i'm trying to apply this to a volumevop that uses cur noise on a grid - the prob is I cant seem to sort out the curl noise curves properly - right now when this wrangle is applied the wires are thicker at one side of the grid and go thinner to the other side.  when i look at the numbers the ones on the left have a higher number than the ones on the right like the grid would be too.

so is  there a way to take all these curl noise curves and map them so they are (for example) 0 to 1 on each curve?  I've tried twiddling a sort node but i think i need something else with it just dont know what :/

thanks
ant

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...