lightwave and record pivot rotation

Community Forums/Developer Stations/lightwave and record pivot rotation

scribbla(Posted 2004) [#1]
i seem to be having some major problems with lightwaves record pivot rotation,at frame 0 with no other keyframes, i set up a pair of legs did a record pivot rotation on one side to align the pitch handles and when converted using Lees converter it screws up wicked,but on the leg i didnt record piv i just left it as it came into layout and this animated fine, although the pitch handles are all over the place.

any ideas anyone, as ive only just starting using lw8 and the bone tools are awesome, trying to edit the skelegon pitch in modeler is not a easy task

i know its not a weightmap issue as i did a convert on the same leg with and without using record piv rotation

anyone come across this, its seems the new pitch is not getting passed over to the converter..or am i doing something wrong..i dont know im out of ideas. im fed up and im going to bed :(



Dustin(Posted 2004) [#2]
Try this: if you look at the rotation of the bone (after pivot rotation is recorded) you should see the numbers are wacky. Try zeroing out the rotation values of the offending bone and you should then be in good shape.

Also, don't record pivot rotation on a bone more than once. Things will get way wrong very quickly.

Let me know if this doesn't fix it.


scribbla(Posted 2004) [#3]
hi Dustin
well that was worth a try, but no luck
the thing is, its all fine in lightwave after record piv it animates fine
but when converted its major messed up, ive got to be overlooking something as im sure ppl do this with lw8 and the terrabits converter

1:i use the bone twist tool to set the pitch
2: record pivot rotation
3: zero the garbage out

everything looks cool until i convert
one thing i have found is that if i record piv on the 1st bone in the leg this seems fine but then the bone chain for that leg is goosed so the 1st bone animates but the rest of the chain doesnt :/


TeraBit(Posted 2004) [#4]
Sorry Tiler. I don't thing I ever did figure out how to get record pivot rotation going properly. If people are doing it, then I'd be interested in knowing how. The lightwave file format it just too damn complicated for it's own good. :/

I keep promising myself to go back and do it all again. But that's a scary idea. =:0


scribbla(Posted 2004) [#5]
I keep promising myself to go back and do it all again. But that's a scary idea. =:0


lol..big guy like you scared:)

well at least i dont have to go down that road anymore, ive been at it since yesterday morning
shame the new tool set in layout is damn fine

Lee if you ever do get back into the converter and re-write it..why not charge for it,maybe a good incentive, i would be first in line

oh my god ive just thought that means back to widgets in modeler..NOooooooo they never work


TeraBit(Posted 2004) [#6]
Ironically I've just figured out another mystery about 'weirdness' with the convertor!

I finally figured out why some very small or large number go all weird, it's the scientific notation in the numbers. I never noticed that before. Easy enough to fix though...


scribbla(Posted 2004) [#7]
let us know Lee,if theres even the slightest update:)


Mustang(Posted 2004) [#8]
Hey, I want that Convertor update too, although so far everything has worked nicely for me.


TeraBit(Posted 2004) [#9]
Yeah, an update for the Scientific notation should be coming soon. I'll take another look at the record pivot rotation thing too, but I'm not promising anything ;)


scribbla(Posted 2004) [#10]
Excellent:)
it would be great to use all the new stuff in lw8, the bone twist tool is a godsend

fingers and everything else crossed for record pivot rotation:)


TeraBit(Posted 2004) [#11]
Gentlemen,

Could you send me a couple of .LWO/.LWS pairs.

One set that uses Record Pivot and a similar one that doesn't use it, so I can compare what I want to achieve.

Thanks.


scribbla(Posted 2004) [#12]
no problem, will get it together and zip it over

[edit Zipped]


TeraBit(Posted 2004) [#13]
Got it... Now to see what's going on..


TeraBit(Posted 2004) [#14]
Scientific Notation: Done

Pivot Rotation: Now I see why I didn't do it!

It's easy to get the pivot pre rotation from the file. But what do you do with it.

* Add it to / Subract from the HPB - Nice try, don't work.
* Convert to Quaternions and Multiply them - Don't work

Various permutations of the above.

I'm stumped.. I'm going to try adding another node above the hierarchy to see if I can pre-rotate it that way. If that fails...


scribbla(Posted 2004) [#15]
i dont know what to say
i wish i could be of more help but im not much of a coder

if you can get the pre piv rotation then why didnt lightwave simply update the old rotation with the new,if the old rotation (the way it came into layout)is still in the file then they must have 2 piv rotations in the file old and new..if thats so then that is simply strange..but like i said im not much of a coder so just disregard any weird banter from me:|


TeraBit(Posted 2004) [#16]
Nope, the same results from adding nodes. Maybe I'm missing how this works.

If I figure it out I'll let you know.


scribbla(Posted 2004) [#17]
good luck


Dustin(Posted 2004) [#18]
All of us Lightwave guys are rooting for you Lee! Show NewTek 'Who 'da man!'


scribbla(Posted 2004) [#19]
i think i can hear him swearing and cursing=:o


TeraBit(Posted 2004) [#20]
Funny enough it's been quite encouraging. Not that I know what's going on, but I got exactly the same 'Almost right' appearance from Multiplying the Quaternions as I did from adding in extra nodes, so I must be doing it right (and boy do you know it when you do it wrong!!), but missing something in the process. But what...

I think ultimately (looking ahead to BlitzMax) I would like to do a morph based convertor. That would simplify things a bit and allow you to use things like muscle flexing and joint compensation etc.

Although at the moment, that sounds to me like the end of the film 'War Games' where the computer after getting fed up with Thermogobal Nuclear War says, '...how about a nice game of chess?'


Dustin(Posted 2004) [#21]
Lee, seriously! You find a way to convert LW morphs into B3D/BMax and I'll pay good money for it. Not kidding!!!


Mustang(Posted 2004) [#22]
Morps? Wow... Usually boned animation is what you want, but there are cases when you can't do what you want with bones only, or would need tons of them... all kinds of jelly-like blobs and such... and since LW has very nice soft-body dynamics / physics build in it would be SO cool to able use them and output the result as .B3D morps or something. All kinds of "flag waving in the wind" effects would then be possible which are now very hard to do with bones only.

I would gladly donate some money to you too if you manage to give us morphed animation! :)


scribbla(Posted 2004) [#23]
right now id pay for record pivot rotation..i hate modeler widgets we just dont get along

lol...since were making a wish list how about a direct plug-in,since i use it side by side as im animating, do a bit of animation then convert make sure its all working, do a bit more ...and so on

wheres that credit card:)


TeraBit(Posted 2004) [#24]
I'm not giving up on the Pivot Recording just yet.

The thing is, morph maps do not appear to be that hard to get at. The problem is blitz has no in built means of animating morphs.

I've been playing recently with Vertex and Fragment shaders in GLSL, and it looks like it would be well suited to doing Morph Animation. So it shouldn't be hard to add to BlitzMax (I've seen some GLSL running on the PC Version of BlitzMax).

As for pay, to be honest, I believe that programs that convert one file format to another should be free (if a program converts lots of file formats then that's a different matter).

Personally I don't feel that I'm adding any value to what you model, just translating from one thing to another.

If .LWO/.LWS wasn't so tricky, I'd be laughing. :)


Dustin(Posted 2004) [#25]
>As for pay, to be honest, I believe that programs that convert one file format to another should be free (if a program converts lots of file formats then that's a different matter).

I disagree. Your time is money. You are creating something that we are benefiting from. Although I use Guile[s] to compile my objects now I always get better results using your converter rather then importing lwo's into Guile[s]. Now you're talking about possibly adding additional features for BlitzMax (morphs to be specific). This would open so many doors for me, in particular FACIAL ANIMATION!!! You're offering a service that others (at least myself) cannot do for themselves. I (and I hope others) would be willing to pay for that.

One of the KEY REASONS I bought B3D in the first place was because of the LW/B3D pipeline that YOU have made possible!

People get paid for their services. I didn't create Character Shop. I didn't work on the programming, the design or the marketing. But I did work on one part, the animation. And I was paid for my time, my services.

To make a long story short, you're offering to do something that I am not capable (at least at the moment) of doing. And for this I am willing to compensate you and I believe others (maybe tiler & mustang) would as well.

My $.02.


Mustang(Posted 2004) [#26]
And for this I am willing to compensate you and I believe others (maybe tiler & mustang) would as well.

My $.02.



Well actually I was thinking about more than $.02 :), but yes, Dustin is right... being 100% LW addict I wouldn't really be able to do much (characters) with B3D+LW without Lee's Convertor - and Tattoo is useful to me also. So if Lee can make the Convertor even better, I sure wouldn't mind donating few € to Lee.


scribbla(Posted 2004) [#27]
i agree

I'm not giving up on the Pivot Recording just yet.

i hope yet never comes:(


TeraBit(Posted 2004) [#28]
Well, I found where one problem was. Still not quite right, but progress has been made :)

The .LWS format is naff. If you were to pre-rotate a pivot, where would you record it? At the start of a Object Definition? NOPE, at the end after a blank line. (taps foot, I mean really!). I've been applying the rotation to the wrong bones. At least the first half of the leg is going in the right direction now.. just not all of it 8-|.


scribbla(Posted 2004) [#29]
progress thats one of my favourite words:)

i bet you regret you ever replied to this thread;)


TeraBit(Posted 2004) [#30]
Almost cracked it. I managed to get it to work, but I can't understand why. :/

I've used an unholy amount of Quaternion multiplications and can't quite work out why it works. When/if I figure it out I'll post here.


MadJack(Posted 2004) [#31]
Just want to register my appreciation of your LW convertor as well Terrabit.

I use LW to model my level geometry.

Thanks to your convertor, I can load LW files into my dodgy custom level editor, add player info + NPCs + particlefx + sound emitters + pathfinding data and then export to B3d's + data files.


scribbla(Posted 2004) [#32]
Almost cracked it

this is good news...this is very very good news and could even get better:)


TeraBit(Posted 2004) [#33]
Alrighty first attempt:

Download 781kb

Give it a test and let me know how it goes. I still don't quite get it, but it appears to work with the one you sent me.


Mustang(Posted 2004) [#34]
Great! Does this version include the scientific notation fix also?


TeraBit(Posted 2004) [#35]

Great! Does this version include the scientific notation fix also?


Yes. At least I know that bit works properly. :)

As a side point, if you find that the bone rotation thing doesn't work, then send me the scene to play with. Failiure is often more enlightening than success!


scribbla(Posted 2004) [#36]
will give it a good go:)


scribbla(Posted 2004) [#37]
damn and blast, still getting weird behaviour:(

Lee i zipped over the test scene


TeraBit(Posted 2004) [#38]
I'll take a look. I think I know what's going on now...


TeraBit(Posted 2004) [#39]
Nope, no I don't. I think this is as good as it's going to get. If anyone with a bigger brain than me (plenty of those around) would like to take a shot at it, e-mail me for the source.


scribbla(Posted 2004) [#40]
thanks for having a go at it Lee

if you ever have a go at the morph thing and i can help with any media let me know


TeraBit(Posted 2004) [#41]
Ahaaaaaaaaaaaaaaaaaaaaa!

It works. Muhahahahah!

I had left a stray space in the parsing of the scene file (why oh why have scenes in plain ascii, it's soooo ugh..)

That messed up the order of the rotations. No wonder I couldn't get it to go straight.

Now it works with everything I throw at it. 8D

Download 781kb

Give it a good go. I haven't had the time to track down the skelegon thing, but if you put them in a separate layer, it should work out ok.

Now if it all works out, could you send me a .LWO/.LWS with some morphs in it to play with.


scribbla(Posted 2004) [#42]
"WELL DONE SIR"

now for some strange reason i woke up in middle of the night, thought id heard someone shout...was going to have a quick coffe and fiddle with lightwave then back to bed and grab a few hours kip before work...ive no chance now

you beaut first test....works fine

i will put it through its paces more i will also see if i can dig out an old model i have of a head laced with morphs its poly heavy but should be ok for testing, if not give me a little time and will put something together;)

well done Lee, respect ...
"whos da man"
"Lees da man"

no more widgets in modeler:D

edit some morph stuff zipped, have a quick look if this is no good let me know:)

edit 2
ummm having had a few coffees and woken up a bit the zip stuff is probaly no good, i think something more basic like a blitz ready model with some simple facial morphs;)
also ive got a bit of weird stretching on the recordpiv ive zipped it over its the other half of the legs model...its weird because the legs seem to deform great..will test it more tonight


TeraBit(Posted 2004) [#43]
I've got a bit of weird stretching on the recordpiv I've zipped it over, it's the other half of the legs model...it's weird because the legs seem to deform great..will test it more tonight


Remember to set the bones in Layout to weightmap only. By default lightwave will use the weight map and also some bone influence with falloff to deform the points. This can mask areas where the weightmap is not quite right. Of course, in blitz, all you have is weightmaps, so this will show up as deformation wierdness. That may not be it, but it's good to check.


Mustang(Posted 2004) [#44]

It works. Muhahahahah!



Yesh! Coolness, much Kudos to You. And merry Xmas :)


Dustin(Posted 2004) [#45]
Looking forward to this. Do you still need some morph test object?


scribbla(Posted 2004) [#46]
can any one else try this record pivot rotation thing, if its me missing something which is not that unusual,im begining to doubt my own sanity as ive checked the wieghtmaps only 100%...and gone over the file and im still getting wierdness...if its me i cant suss it out

i did a record piv down one side of the model, when converted wierdness down this side, ok on the other with no recordpiv:(

everything seems to rotate fine but stretches as it rotates like its going in a bigger arc than it should


scribbla(Posted 2004) [#47]
ummm the original legs lws i sent you i think works because i only did the record on the 1st bone, if i go through the whole model and record then this is where the problems start
if i just record the 1st bone then it works

but saying this i then tried just doing the record on the only the 1st bone in the arm of the upperbody but got the stretching ?

who ever started this thread..needs a good Pummelling with a wet fish:/
shall we all be quiet and pretend the threads gone away;)


TeraBit(Posted 2004) [#48]
Well, poo is all I can say. I'll see if I missed something.


TeraBit(Posted 2004) [#49]
Fixed it...

Download 781kb

Some more 'Weirdness' in the way I was rotating things (left over from the many different methods I used trying to solve the first problem), that needed removing.

Let me know how it goes.


Dustin(Posted 2004) [#50]
I'm still VERY interested in the implementing morph target discussion. Are you still plugging away on that LW aspect?


TeraBit(Posted 2004) [#51]
Yup. I've got some good material, so that's next on the list.


Dustin(Posted 2004) [#52]
Great! You don't know how happy I am to hear that!!!!


scribbla(Posted 2004) [#53]
thats it you cracked it santa, this is better than the socks i will get for christmas

all the scenes i tested last night that didnt work now work

Lee are you using the cartoony head i sent you for the morphs, i didnt think that would be any good as its a subpatch model, just shout up if you want anything different


TeraBit(Posted 2004) [#54]
If you have anything more suitable then send away. I was just going to remove the subpatches.


scribbla(Posted 2004) [#55]
see how you go with it, any problems let me know and i will knock something together, but i will zip over a more blitz type model just incase;)


the joys of not using modeler widgets, ive still been testing and yep Record piv and using the bone twist tool in lw8 works fine A+ to that man:)


TeraBit(Posted 2004) [#56]
the joys of not using modeler widgets, ive still been testing and yep Record piv and using the bone twist tool in lw8 works fine A+ to that man:)


It has certainly been a bit of a ride. Sad to say that one digit wrong in the parsing code screwed the entire thing up for so long. It was the last hair tearing exercise before giving up that turned up the H-P-B out of order. At which point I went 'Noooooooooooooooooooooooooooooooooooo!!' <rapidly zoom out>

But it works at least. Next time I look for bugs, I'll look for the simple explanation first.

I'll take a look at the Morph stuff in the next few days.

Because Blitz doesn't support Morph animation natively (apart from MD2), I'll probably have a manual set of commands:

ReadMorphs(Mesh, File$)
SetMorph(Mesh, Name$, Factor)

Mesh = LoadMesh("Torso.B3D")
ReadMorphs(Mesh, "Torso.B3D")
SetMorph(Mesh, "Muscle.Bulge", 0.6)

Or something like that.


scribbla(Posted 2004) [#57]
so your looking at having bones and morphs in the same model

say
animate(model,,run,) (bones)
morphanim (model,,MouthOpen)

and is this for blitzmax only ?

At which point I went 'Noooooooooooooooooooooooooooooooooooo!!' <rapidly zoom out>

i think i heard that;)


TeraBit(Posted 2004) [#58]
so your looking at having bones and morphs in the same model


That's the plan, at least for Blitz3D. What it will do essentially is adjust the starting positions for the vertices of the model before any bone deformations happen. Since most of the motion will happen with the bones, you only need the morphs for stuff that is tricky to do with bones alone. Once set, a morph will stay active until the next SetMorph command is issued. You will then be able to revert to the original state by:

SetMorphAbsolute(Mesh, "Base", 1)

Sucesssive SetMorphs will adjust the model further.

That's the plan anyway. Reality might well hit me in the face like a wet trout, but we'll have to see.


scribbla(Posted 2004) [#59]
oh my god...the Potential for animation is mind blowing...wheres this going to end, this sounds most excellent

could do with a new thread,,since you put the record pivot to bed...but why not enjoy christmas first and chill out:)


Dustin(Posted 2004) [#60]
>could do with a new thread

Naaa, I think most LW users: you, me, Mustang and a few others are already watching this thread very closely. Ahhhh, morphs for Christmas. Yes, Virginia there is a CG Santa Clause. *I CAN'T WAIT!!!!*


Dustin(Posted 2005) [#61]
Just sniffing around for an update. Hoping to hear that Lee's making great progress on setting up that "SetMorph" command.

Take your time, but hurry. No pressure! :)


Mustang(Posted 2005) [#62]

bones and morphs in the same model



This - and the command set Lee proposed - surely opens up whole new ways to do animations... well done, Lee! This would be so useful for so many things, not only to character animation... cloth effects for example.


scribbla(Posted 2005) [#63]
i think hes still recovering from the record pivot;)

imagine modeling a character then out of the same qeometry model another and create a morph
and morph it.. ingame...bark at the MOOoooonnn..


Dustin(Posted 2005) [#64]
That's why I'm sniffing around. I'm quickly getting to a point where I'm going to have to decide how I'm going to approach certain parts of my game. Namely, facial animation. There was a morph demo displayed recently but it required duplicates of the model for each morph. That's too much for what I'm doing. Lee's approach would be perfect!


Chaduke(Posted 2005) [#65]
Is there a thread or link to a page that describes some basic instructions on exporting/converting animations from Lightwave to b3d?

I'm just starting to learn animation in LW and I need some general tips on how the scene needs to be setup for it to convert properly, like what to do with the camera/lights, if a bounding box is needed, how the bones need to be setup, and what potential pitfalls could occur.

A simple tutorial would be great even if its just some numbered steps without pictures or anything. I took a look at your kid demo Tiler and its very cool. If you're getting those results out of Lightwave and Lee's utility then I'd like to continue pursuing this. If I don't have to mess with 3DSMax it would be awesome.


scribbla(Posted 2005) [#66]
chaduke did you download the converter from this thread or the specs and utils section..this has a readme for what you need to do to set things up

you dont need to worry about the camera and lights as only the model and keyframes gets converted,

for textures use a UV map
for bones use weightmap only

i did actualy make a lot of notes when i was learning but i lost the lot in my hard drive crash last year, read the notes that came with the converter and let us know how you are doing

just post a new thread for lightwave help theres a few of us around:)


Chaduke(Posted 2005) [#67]
God how could I have not seen the specs and utils section? There's a bunch of stuff in there I hadn't seen before, maybe I was just tired. For some reason I was looking everywhere else.

I did download the one from this thread and tried it on a basic model last night. It didn't export the animation at all and it really garbled the texture on one side.

All I did was take a simple humanoid model and drew in some skelegons into one arm, then sent it to layout and converted to bones, then created a keyframe like on frame 15 or so with the arm up in the air.

Anyways, I downloaded the one from this site just now and I read thru the readme file, that's exactly what I needed. I'll let you know how things work out when I get a chance to use it.


scribbla(Posted 2005) [#68]
the garbled bit ..i will guess is due to leaving the skelegons in the model when you converted,after i have converted to bones i jump back into modeler and delete the skelegons then save the model out as filename$+NoSkelegons jump back into layout and save the scene out as scene$NoSkelegons..this sorts out any garbleness for me;)
some ppl put the skelegons in another layer this however still shows up in layout and i always seem to select that layer instead of the model i delete the suckers at the conversion stage and save as copy;)

also if your using textures make sure you set the model base colour to white as this stops bleed thru
and i dont know if Lee updated the spec & utils with the updated version in this thread..but the docs are the same


Chaduke(Posted 2005) [#69]
I had a chance to tinker with it a bit tonight. I removed the skelegons and checked the base color of the model but I'm still getting the messed up texture problem.

I zipped it up the resulting b3d file and texture so you can see what it's doing to it:

http://www.doresoftware.com/misc/human.zip

Also, I'm getting something in Lightwave I've never seen before or perhaps I'v never noticed it because I haven't done much animation, but for some reason after adding skelegons to the model and bringing it into layout it's not showing the texture when I do a render. It's just showing the white model, and I can't seem to figure out why because everything looks fine in the surface editor.


scribbla(Posted 2005) [#70]
i will have a quick look...2nite after work..sounds like a UV problem

does the textue show in modeller

i dont now how familiar you are with lightwave but..
textures not showing in layout maybe due to a few things
1: try re starting layout sometimes that works for me
2: check you have OpenGL textures ticked in the preferences "d" on the keypad
3:make sure you are set to show "texture shaded solid" in the button next to perspective/camera view


Chaduke(Posted 2005) [#71]
Got the rendering problem fixed, for some reason the layer opacity was set at 0%, but I model in Wings so it could have something to do with the import.

The little preview sphere in the surface editor is still showing as the base white color though, not sure why. I saw in the display properties a setting for texture size and I changed it to 512x512, and wow my model looks quite a bit better in the display panel now.

I'm going to do some more reading about animation and weightmaps today. I've only done animation in Milkshape before which is extremely simplified compared to all the tools and options available in LW.


scribbla(Posted 2005) [#72]
read up on UV maps in lightwave as i think this is where your texture problem is...and start from scratch create the UV in lightwave


scribbla(Posted 2005) [#73]
"I Dont BeLieeeeve it"

...Lee sorts out record piv
LW 8.2 update arrives and they screwed up the bone twist tool,its basicly useless

back to 8.1 me thinks
---------------------------------------------------


scribbla(Posted 2005) [#74]

Record Pivot Rotation
on the weirdness scale this was way up there =:o

i had some major weirdness with the record piv
the mesh just folded up on conversion, looked fine in LW..if this happens to you

try this, it works perfect for me


Using LWDeform, Record Pivot Rotation and Record Bone Rest Position

1: at frame 0

2: Record Pivot Rotation Through the model, UpperCase ”P”
stopping here will most likely cause the mesh to fold up on conversion

3: apply Bone Rest Position Through the model “r” on keyboard
DON’T PANIC when it all mashes up..just scroll Through the bones applying Record Bone Rest Position, you should see the mesh straighten itself out, and it converts fine


that just soaked up a few hours