Page 1 of 3

Unit Poser (modding tool or w/e)

Posted: 13 Jan 2011, 20:01
by knorke
/* EDIT: LATEST VERSION HERE: http://springrts.com/phpbb/viewtopic.php?t=27268 */
original post below
---


Image
a unit poser 8)
bash buttons, pieces of unit move and rotate.
dump/b-export current positions as a list of Turn&Move commands.
only works on last spawned unit, similiar to boxxy http://springrts.com/phpbb/viewtopic.php?f=14&t=24882

gallery, some are .gif, most suck:
http://www.abload.de/gallery.php?key=bq7TpOYa

you can make it write a list of pieces, useable in a unit script ie like
local body, head, leftarm, rightarm = piece ("body", "head", "leftarm", "rightarm")
Also writes all the needed Move/Turn commands to get the unit into the current pose. Which is a long list but you can just c&p that, change POSENAME to ie "StandOnLeftLeg" and call it like StandOnLeftLeg (movespeed, turnspeed)
Look at the examples in scripts\, its simple really.

This is not useable to automagically make walkscript, attack animations etc yet(?) at best it is a helper. if you wanted to make a walk animation, you have to remove all the commands refering to non-legs yourself so hands, turrets etc are not moved when walking. Also must add WaitForTurn/Move yourself.

button sender -> luaui\widgets
unit message transmitter -> luarules\gadgets
tpkeyframeus.lua -> set as script in unitdef

so you do not have to set up all that stuff, i compiled a demo mod with some units. thanks to the original modelers!
smoth, KDR_11k, Wartender, Forboding Angel , maackey

/give pose [press tab]
for list of all poseable units

/give ani [press tab]
for list of some animations i made.
Originally planned to make at least one ani for every unit but got lazy and whatever gay reason like no time. So only the gundam zaku, lolimod schoolgirl and evo crabthing have an ani.

How to use:
/cheat
/give pose[whateverunit]
mash those buttons:
w/s next/prev piece
a switch edit mode turn <-> move
4/6 x axis
8/2 z axis
7/9 y axis
5 change stepsize, ie 1┬░, 10┬░ 45┬░ for rotation
d write current position to infolog
also writes a piece list

currently selected piece flashes (game must not be paused)
to get a screenshot of the posed model without missing pieces, you have to pause in the correct moment when the piece is visible :regret:
If no piece is flashing, it is probally an empty piece like an emitpoint for muzzleflashes etc.

If you type in console, it will likely spam some errors if you use some letters, but you can just ignore those.

Download is a zipped as .7z with an .sdd inside so you can test it on your own models easier.
http://www.file-upload.net/download-312 ... dd.7z.html
This is a working mod but of course no playable game. Also lol leftover unneeded files like weapondefs but yeah, its just a demo.

I plan to use this to animate a unit i have yet to make so maybe advances will follow or maybe not.
Planned*:
-autoadjust move/turn speed so all pieces finish moving at same time
-smarter exporting of piece position instead of long ass-list
-option not to move all pieces (like a walk animation should only move legs, not arms)
-better organization of gadget/widget/unit script
-piece reset to nullpos, skip empty pieces with no child pieces
...
blablabla.

*in a thousand years maybe

Re: Unit Poser (modding tool or w/e)

Posted: 14 Jan 2011, 02:49
by Beherith
Really awesome stuff, knorke. Highly needed, as I am stumped on how to animate my kbots .

Re: Unit Poser (modding tool or w/e)

Posted: 14 Jan 2011, 03:18
by Peet
This is a really wonderful thing and its continuation into a full ingame WYSIWYG unit editing suite would be a really really wonderful thing.

Re: Unit Poser (modding tool or w/e)

Posted: 14 Jan 2011, 06:19
by smoke_th
How i like to say in those in cases like this one-
"At fucking least". :lol:

Re: Unit Poser (modding tool or w/e)

Posted: 15 Jan 2011, 08:35
by MidKnight
This is really awesome.
Peet wrote:This is a really wonderful thing and its continuation into a full ingame WYSIWYG unit editing suite would be a really really wonderful thing.
I agree with this, except with more 'really's

Re: Unit Poser (modding tool or w/e)

Posted: 15 Jan 2011, 08:45
by KingRaptor
Why do I forsee the main use of this being to make Garry's Mod-style comics?

Re: Unit Poser (modding tool or w/e)

Posted: 19 Jan 2011, 01:33
by Wartender
YAAAAAAAAAAAAAAAAAAAAAAY it's my mech :D

Re: Unit Poser (modding tool or w/e)

Posted: 19 Jan 2011, 01:43
by Wombat
Wartender wrote:YAAAAAAAAAAAAAAAAAAAAAAY it's my mech :D
im disapointed ur last one :,

btw why knorke got no tag or something. 'Royal Coder' maybe

Re: Unit Poser (modding tool or w/e)

Posted: 19 Jan 2011, 01:54
by knorke
ya srsly whats with that!
As alternative to tag, i also accept higher file size limit for animated avatars or just gold 8)

Re: Unit Poser (modding tool or w/e)

Posted: 19 Jan 2011, 02:08
by Wombat
knorke wrote:As alternative to tag, i also accept higher file size limit for animated avatars or just gold 8)
uh oh ill make some models for this one

Re: Unit Poser (modding tool or w/e)

Posted: 19 Jan 2011, 03:22
by Wartender
Wombat wrote:
Wartender wrote:YAAAAAAAAAAAAAAAAAAAAAAY it's my mech :D
im disapointed ur last one :,

btw why knorke got no tag or something. 'Royal Coder' maybe
i counter your statement with unfinished models that i never textured from about the same time i made the mech

Image
Image

tank kinda sucks but i like the spider mech (except the guns)

Re: Unit Poser (modding tool or w/e)

Posted: 19 Jan 2011, 04:33
by MidKnight
Wombat wrote:
Wartender wrote:YAAAAAAAAAAAAAAAAAAAAAAY it's my mech :D
im disapointed ur last one :,

btw why knorke got no tag or something. 'Royal Coder' maybe
I propose 'Rhymes with Bjork'

Re: Unit Poser (modding tool or w/e)

Posted: 06 Mar 2011, 07:33
by CarRepairer
Animator complete!!

Image

Re: Unit Poser (modding tool or w/e)

Posted: 06 Mar 2011, 07:37
by MidKnight
\o/
Woo!

Re: Unit Poser (modding tool or w/e)

Posted: 06 Mar 2011, 10:30
by knorke
CarRepairer wrote:Animator complete!!
[img]http://i.imgur.com/aYNKD.jpg[img]
feel free to release. as said in chat, i am doing an UI and some other things myself but that will be at least 9000 years because low prio.

Re: Unit Poser (modding tool or w/e)

Posted: 06 Mar 2011, 14:11
by klapmongool
So we can have dancing units at last?

Re: Unit Poser (modding tool or w/e)

Posted: 06 Mar 2011, 14:40
by knorke
Image

Re: Unit Poser (modding tool or w/e)

Posted: 06 Mar 2011, 16:35
by bobthedinosaur
Can you export or save the pose information on each frame?

Re: Unit Poser (modding tool or w/e)

Posted: 06 Mar 2011, 18:46
by FLOZi
CarRepairer wrote:Animator complete!!

Image
Looks awesome, but how difficult is it to use?

Do we drop it into our mod (if so does it require a working chilli framework?)

or do we drop our models into it?

Re: Unit Poser (modding tool or w/e)

Posted: 06 Mar 2011, 19:12
by CarRepairer
Just a gadget and widget, using some code from knorke's unitposer. If your mod has chili, just drop them in. I'll post them later today, after I set this up to work in a modoption.

Only caveat is right now it doesn't stop the units from doing their own animations (if you accidentally tell them to move they will ruin their pose). I think it could be solved with a unitdefspost block to detect when modoption is on and set the units to use an empty LUS.
bobthedinosaur wrote:Can you export or save the pose information on each frame?
knorke wrote:Also writes all the needed Move/Turn commands to get the unit into the current pose. Which is a long list but you can just c&p that, change POSENAME to ie "StandOnLeftLeg" and call it like StandOnLeftLeg (movespeed, turnspeed)