Popular Tags:

Bezier Splines in Layout – the scripts

February 22, 2014 at 7:18 am

Sorry, I forgot to post the finished scripts. Sure you could cobble them together from the bits and pieces I did post, but what a pain. And a final note: These scripts work, but probably aren’t the best code in the world. I already see things I did poorly, or optimizations just waiting to happen. But there’s enough there to play with, so please. Have fun. And if somethign’s not working for anyone, please let me know.

Bezier Splines in Layout – Move It!

February 21, 2014 at 2:26 pm

It seems like everyone likes the idea of Bezier Splines in Layout. I’ve gotten a lot of hits since I started posting about them, so I know you’re all waiting for this post. This will be a little more complicated than previous posts as we’ll be dealing with three separate scripts: a custom object, an item motion and a helper library. The easiest to start with will be the custom object script. It really only has three major changes. First we need to import the SplineOps library (which you’ll see later). The next big change is during our initialization, we […]

Bezier Splines in Layout – Move It! – GUI

February 21, 2014 at 6:30 am

Being able to draw a pretty spline in layout is nice, but fairly pointless. We want to move items along the spline, don’t we? Yes we do. Since we’ve already started off by making things a little different than the way Lightwave handles their spline, let’s keep right on doing that. By default, Lightwave takes the distance your object has moved on Z, and makes it move the same distance along the spline. This can make it hard to make sure that your object gets all the way to the end, but doesn’t go past it, especially if you animate […]

Bezier Splines in Layout – Custom Object

February 20, 2014 at 4:57 am

In the last post we coded up the foundation upon which our script for today will be written. In the next post, we’ll look at using the spline to control the motion of objects, but right now, we just want to draw one using a Custom Object. This can help us make sure we got our math right, and it’ll be usful when we start animating along it, so we can see where things are supposed to go, and make sure they’re actually going there. Kinda important. So we start with the basic mostly-GUI version found here. We’re going to […]

Bezier Splines in Layout – Setup

February 19, 2014 at 4:21 pm

Now that we know what a spline is, we can get to work on our script. A cubic Bezier spline is made up of a number of spline segments. These segments go from node to node to node, and are shaped with two tangents per node, incoming and outgoing. So before we go any further, we need some way of telling Lightwave what the Nodes are and what the tangents are. We’ll steal from Lightwave’s own book and set things up this way: The parent object will be the Spline. Parented to the spline are a number of Nulls named […]

Bezier Splines in Layout – what is a spline really?

February 19, 2014 at 9:57 am

We all love Bezier splines. They’re so round and smooth and bezier than any other kind of spline. Which is why I was a little flummoxed when Layout suddenly got the ability to move things around on splines, but they weren’t Beziers. I was sad. I decided to learn python to rectify the situation. Yep. I took up the task of learning python for Lightwave because I wanted Bezier Splines in Layout, dammit! And now the world shall get to see the results. Prepare to be underwhelmed. Or maybe even whelmed if you’re easily impressed. Before we start off tackling […]

Q2 – a new surfacing assignment script – the Works

February 18, 2014 at 10:13 am

Back in this post, we built an interface that works – or at least all the buttons and whatnot do something predictable. Nothing to be scoffed at, mind you. Today we’ll look at getting information about the surfaces in modeler, and figure out how to save a config file, so the script can remember the last 10 surfaces it’s worked on, even when you close and reopen modeler. We’ll go through the whole script, highlighting the changes we’re making from the GUI-only version. Initially, things look pretty much the same, but we’ve added some new imports. sys and os.path to […]

Q2 – a new surfacing assignment script – the GUI

February 18, 2014 at 6:03 am

One of the most often used shortcuts in modeler is ‘q’ – A.K.A ‘Change Surface.” It brings up a nice, simple little panel where you can type in a surface name, or select one from a list, and even assign a few settings to your new surface. But could it be better? What happens if you’ve got objects with hundreds of surfaces and you need to wade through all those names just to find the one you want? And how come you can only give your surface a color, a diffuse and a specular? Let’s try making a new way […]

Dynamic Objects Looksee

February 13, 2014 at 2:03 pm

This looks like a jumbled mess – but represents something pretty darn cool. I’ll walk you through what’s going on. First I add a null to an empty scene. Then I add my script and point it at a .pfx file. (The same one in the particle Tubes video, actually.) Then all that’s needed is to create a quick preview. Each frame, the .pfx file is scanned for the particle positions at that frame, then I create a delaunay triangulation around the particles (which basically makes a bunch of tertahedrons with the particles at the corners), and convert that raw […]

Dynamic Objects

February 13, 2014 at 11:17 am

I have a few scripts tucked away that pre-calculate a sequence of objects to be used with an Object Replacement plugin. So you can run a particle simulation, save the pfx and load that into my pfxTubes generic. This will create the object sequence which will be loaded by the Object Replacement plugin, Object Sequencer. It works, it’s starting to be cool, but it’s a cumbersome process. What we really need to do is have everything in the object replacement script which will create a temporary object file on the fly whenever it goes to a new frame. I have […]