PDA

View Full Version : Spline control problems for "Tank" treads



Ma3rk
06-01-2014, 07:14 PM
Hey all,

I'm in the process of creating “tank” treads using Spline control in 11.6.2 and running into some problems. I've watched the videos a couple times & read through the docs, but the solutions there don't stop the problem.

First problem is with the object flipping on the pitch.

See a vid here:

https://www.youtube.com/watch?v=cvMBsY2PaLU&list=UUxXlr4ml7IjKRJ8ckEWdwCg

I've set the tread objects motion options to use Spline control only for the Pitch and tried setting limits but no help. Stepping through frame by frame, the Pitch value jumps 180 deg. Even setting Bank limits both to 0, it still jumps on Pitch. It's almost like an Euler flip, but only the Pitch values are changing.

Also, but not always, it seems that where the flip happens is when the key frame is at a node.

I set the bottom nodes Pitch to be 180 as w/o that the tread wouldn't invert. That worked but still getting the Pitch flip problem.

Fractional frames is OFF. Toggling the World check box in Motion options makes no difference either.

The second problem is with instancing

https://www.youtube.com/watch?v=tHzWydlkxIg&list=UUxXlr4ml7IjKRJ8ckEWdwCg

The instances get created and along the Spline, but they don't move, nor do they align to the spline.

Obviously I'm missing something but what? Is my Spline wonky is some way such as too many nodes?

Thanks,
M.

Ryan Roye
06-01-2014, 07:29 PM
This video may be helpful: skip to the 1 hour 15 second mark, Jennifer explains some important details about spline control's nuances. Basically, check to see if your spline point's heading values are all pointing towards the intended path of the spline. This should fix the flipping issue.


http://youtu.be/So0xSgPUqXs

In regards to the instancing problem, read up on it in the LW user manual; there should be an option in there that lets you distribute an object repeatedly along a spline and have it move with the "copy" it is referencing.

RebelHill
06-01-2014, 08:24 PM
Most likely its the orientation of the spline control nodes... see here around the 14 min mark.


https://www.youtube.com/watch?v=gCVneRb141I&index=17&list=PLTds3QePYrWEWipwKkLmyNT4Tf_JTigM2

Ma3rk
06-02-2014, 04:34 PM
Had some success with this finally.

Actually, I was at that meeting but as the vid was posted under Raycast, I forgot that Jen touched on Spline Control as well.

Even so, I was referring to the other vid (LightWave 11.6 - Spline Instancing) on the Newtek site where she's using a curve made in Modeler then using the convert script. I made a sort of rounded cornered trapezoid arrangement of points, all at X=0 and centered along Z. I carefully selected the points in order and created an Open curve, loaded that in Layout and used the Curve to Spline script.

I made a simpler curve (fewer points) this AM and slowed down the objects z-axis travel and not only had the same problem but could really see the problem. Each time it got to one of the joints, the object would do a "somersault".

I then rewatched Craigs video and then built the spline from scratch in Layout. This worked although when I applied instancing, I had one node out of 20 that was causing a problem. I simply disabled it for now and will go back to examine it closer to see why it's misbehaving.

Ah. Found it. I had two nulls at the same position. OpError.

The instancing problem was simply that I have to animate the offset in the Instance panel and set the object to Local transform handling.

I guess the only question remaining is why is a Modeler created curve acting weird. All the rotations are the same and their X positions are set to 0, but at one section of the spline, I can actually see a loop type of a bulge. It's as if there's a tension or continuity value set somewhere like in the graph editor. As they're technically a bone, I'm wondering if there's a rest rotation issue.

Don't know if that's a bug or not. Will fiddle around some more with that & see what I can glean.

Thanks guys.

M.

lertola2
06-02-2014, 06:36 PM
I submitted a bug report in February when I thought that spline instancing not orienting correctly. I was told that I could fix it by adjusting the bank of the nodes. Here is the bug report: https://fogbugz.newtek.com/default.asp?68820_0j0vjkm2kso3u6u4

-Joe

Ma3rk
06-03-2014, 09:43 AM
When I looked at the rotation settings of the nodes on the Modeler created spline, they were all at 0 on Bank. Yet, the item will flip as it passes through some but not all of the nodes. When it gets to the "bottom" of the curve, where the treads would touch the ground, the instanced objects would invert and remains that way until the spline curves up again at the "front".

The spline constructed from scratch in Layout behaves as desired. The instances all remain on the outside of the curve through the entire trip around. The only exception was as mentioned when I mistakenly had two nodes at the same position. The objects would flip there very much like the problem nodes on the modeler made spline. Once I removed the redundant node, it behaved correctly.

In your scene attached to the bug report, was your spline originally made in Modeler?

I hope to spend some time today making some new tests.

M.

jeric_synergy
06-03-2014, 10:13 AM
Thanks for working on this. Sometimes it seems as if there's some hidden rotation values on modeler points when used as spline guides, but I don't believe this actually exists, it's just an artifact of the curve of the spline. --As a feature, this would have possibilities. But currently, I think all LWM points are rotation-free.

On following videos: sometimes you have to take it VERY slowly, as a critical switch or point gets casually zoomed by.

Ma3rk
06-03-2014, 12:07 PM
I just whanged out a quick test and sure enough, the spline made by converting a Modeler made curve indeed has rotation issues. Replicating the spline by making it by hand in Layout, no problems.

So, whether its the conversion script or something in Modeler I've no idea and will leave to the propeller heads to sort out.

I'll attach the test here then fogbugz it.

I guess my reputation as a bug magnet remains intact.

M.

122167

122166

jeric_synergy
06-03-2014, 04:06 PM
pshhh! I can't get thru a session w/o finding 3 bugs...