Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Lightning Limbs - new edition

Author
Message
Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 14th Mar 2010 13:56 Edited at: 13th May 2010 11:37
Lightning Limbs (available for download here) has been given it's first demo

Currently, only the GUI is implemented (more features still to be added) but animation features will drop into place quite quickly now. It is also open source, with the code freely available to anyone who wants it. All media, code, etc. is enclosed in the attached Zip file.

I'd welcome any comments, and I've got a concept screenie, showing what LL will look like in the new build:


My currently planned changes are:
Introduce Scale Limb feature
Introduce Code-driven texture changing/scale-scroll texture as part of animation
Use custom export animation routine (involving manual calculation of quaternion keyframes )
Ability to set rotation limits on joints
Rebuild GUI for screen resolution independance
Modifiable landscape terrain
Open Source project

Hope to hear from you soon!

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."

Attachments

Login to view attachments
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 14th Mar 2010 17:12 Edited at: 14th Mar 2010 17:13
Considering that Lightning Limbs is freeware, would you consider sharing the source code?

Your software is very interesting and I would love to see how it's done, especially considering it was done in DarkBasic Classic.

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 14th Mar 2010 20:04 Edited at: 15th Mar 2010 19:24
Hello RTR,

In the last couple of weeks I pulled out your program to see if I could tweak a couple of animations being used in the DarkPros porject. I ran into a few problems so I'll list those as potential "wish list" inclusions/fixes .

1. Upon loading the model, the original animation that was attached to the model was gone.

2. The model I was using was untextured, as intended, however, in lightning limbs it is loaded in as completely blanched, there seems to be no normal or lighting control on the model. It looks as if the ambient is set to pure white so the model itself is lost in a flat color. On top of that, the nodes are also pure white so it becomes very confusing - and the nodes as spheres have no shading as well - the 3d effect is lost the model looks 2d. I'll attach a picture.

This situation isn't limited to only this model - it happens with every model I've tired that doesn't use textures. But even with the textures, the normals don't seem to be present.

3. The camera control is a bit difficult to understand and navigate. By default on every screen, I would like there to be a standard camera control. Somthing like, mouse click 1 selects limbs and/or menu options. Depending on the limb adjustment mode (scale, rotate, translate) holding the left mouse click and dragging transforms the limb based on the current orientation of the camera. Holding right mouse click moves the camera up/down/left/right. Mouse click 3 focuses the model being worked on as the center and then by holding and dragging, the camera x and y rotates around that focus.

Maybe using the + and - keys to zoom in or out based on the center focus point.

The center focus point should also be able to be changed. Perhaps the user wants to just center on the head or a finger, in that case either the limb position can be used or a hidden object can be created and placed where ever the user wishes.

4. The camera menu controls shouldn't include the animation playback controls. You have an animation menu without playback, and a camera menu with animation playback. It's a bit confusing and inconsistent.

5. I can't find an individual frame indicator. It would be nice to see the current playing frame and have a timeline that shows the keyframes of rotations, scale, and translations in a grid or chart format. It would be nice if this chart was editable.

6. I would like to see settings for automatic fixed camera views. Top view, bottom view, left view, right view, front view, back view. A single click to orient the camera to any of these view would be very helpful.

7. A multi-view camera option would be nice. It would be helpful to be able to have split screens of separate views.

8. When opening a new project, or any file access for that matter, it would be nice if double clicking on an item automatically loaded it.

9. It would be nice to have an Onion-skin type of view. Since DBC can wax towards being slow when there are a lot of objects displayed at once, this could be limited or adjusted by the user to a certain number of frames before and after the current frame being worked on. An onion-skin is a ghosted pose of other frames leading up to or after the current frame so that you can tweak your frames to make a better flow of the animation. You see the frames at once. This can be achieved using ghosting and controlling the objects ambient light and the fade command to make the ghosted objects as opaque or transparent as needed.

10. Similar to the avi file, it would be nice to be able to load a reference model with it's own animation that your project model can be posed to emulate. A separate series of timing keys would have to be loaded for the reference model.

11. Instead of an environment (though it's a nice option) I would like to see a grid that represents the X and Z plane as well as a global indicator of the axes in view. When an object is loaded, it's useful to have a perspective on it's position relative to a ground at (0,0,0).

This is a pretty big list to get you started! If you don't understand something, feel free to ask.

Enjoy your day.

Attachments

Login to view attachments
Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 16th Mar 2010 17:30
@Mistrel
Quote: "Would you consider sharing the source code?"

By all means, although I'd prefer to hang fire for the moment. I seem to have started improving V1.0 last year but never finished it and I'm not sure what state the code's in at the moment.

@Latch
Wow! Long list, but some brilliant ideas! The GUI doe need restructuring, maybe add a node control panel (with colour sliders, scale features, ambient/diffuse/specular controls) and a new environment control panel (optional skybox, matrix terrain, or just a flat grid)

I'm a little confused about 7 - I didn't think multiple camera views were possible in DBC (which is why I couldn't get an anaglyph 3D mode working - now that would be impressive!)

I'm also puzzled why the normals don't load on your 3D objects, I just use the standard "Load object" command. Does DBC have any special normalisation commands that I should be using, or is it just the way the default light is angled/positioned?

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 16th Mar 2010 19:36 Edited at: 16th Mar 2010 19:39
Number 7:
Quote: "I'm a little confused about 7 - I didn't think multiple camera views were possible in DBC (which is why I couldn't get an anaglyph 3D mode working - now that would be impressive!)"

Split screens are possible. The anaglyph problem with split cameras is that the camera views aren't drawn simultaneously so you have 1 drawn after the other - overwriting the last or causing major flickering. When the camera views don't overlap, they are drawn 1 at a time so you get the illusion of multiple camera views at once without flickering.



In order to update any one camera view, a sync has to be called after the camera view is sized. This, however, will destroy the speed of your program if you sync after each camera view setup in a single iteration. In the example, there are 4 camera views which could mean syncing 4 times per main loop. In order to get around this, in the above example I update 1 camera view per iteration instead of all 4 at once. This allows me to call 1 sync to update all 4 views. For your application, a variation would be to update a view when the mouse pointer is in that window. This will greatly speed up your app because a smaller 3d camera view ,takes up a lot less rendering power than a full screen camera view. So, if handled properly, a split screen view is less expensive than a full screen view.

Quote: "I'm also puzzled why the normals don't load on your 3D objects, I just use the standard "Load object" command. Does DBC have any special normalisation commands that I should be using, or is it just the way the default light is angled/positioned?"


I think this has to do with the animation being stripped out of the direct x file. If I'm not mistaken, it seems that an already animated directx object is losing it's animation upon loading into lightning limbs. The frame templates that hold the mesh, material, normal, and uv information are often tied to the animation keys if there are any. There is a frametransformmatrix template within the frame templates. This controls the initial transformations of the mesh. The animation keys are like mini matrices that are multiplied against the frametransformmatrix to create the transformation of the limbs. The animation keys, and the transform matrix can therefore go hand and hand.

What seems to be an absence of normals, is some kinda of funky transformation that isn't quite right. The mesh could be inside out, or the normals could be at 0 - I don't really know. I'd have to see the state of the directx file after it was loaded into lightning limbs.

I'm kamking a lot of assumptions here. Are you stripping the animation from the direct x file upon loading?

Enjoy your day.
Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 20th Mar 2010 19:17
Wow, the split screen view is amazing, running at 295fps on my system, regardless of any FPS Hike Enhancements. I'll definitly be including an option to create multiple views, could be brilliant for the XYZ axis restrictions - if in the XZ view then only Y-rotation is available (by default). I see what you mean about the 4 sync's destroying the frame rate, it sets the text flickering as well!

Anyway, I've been trying out different ideas in the last few days and I'm starting to make some headway with the project. The onion skin feature works in theory, though i'll need to experiment with ghosting, ambient, diffuse and emissive to make it useable.

I'm also planning to modify the timeline to include a play/pause, stop and fast-forward/rewind button set. The timeline will also display a progress meter showing what point in the animation has been reached. I'm also thinking of removing the delete keyframe buttons on the Limb toolbar in favour of right-click the line on the timeline to remove a single frame - what do you think? I'm running out of space on the limb toolbar for the features I've got planned!

I'm also thinking of adding in keyboard shortcut keys to control the XYZ axis active - since LL is mouse-driven, my left hand never does anything except sit on the keyboard around the WASD keys (I've spent too much time playing with FPSC free...). What about making the number keys 1,2,3 toggle the XYZ axis as required, and save WASD for camera control in all modes? Perhaps A and D spin the model round, WS zoom in and out. Maybe throw in an alternative FPS view, where you control the camera as you would an FPS game?

Concerning your problems with normals, I've checked back through the code and I do call "Clear All Object Keyframes", and nothing else concerning the object's appearence. I'm not sure how to remove the object's animation without damaging any of the normals, though I've not had a chance to experiment yet.

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 23rd Mar 2010 01:06
Wow. What a Find! what have we here? RTR! cool dude, glad to see you are back!

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 23rd Mar 2010 21:04
Quote: "Concerning your problems with normals, I've checked back through the code and I do call "Clear All Object Keyframes", and nothing else concerning the object's appearence. I'm not sure how to remove the object's animation without damaging any of the normals, though I've not had a chance to experiment yet."

I don't know if it's just the normals that are being effected. Whatever the case, the mesh is losing it's visible detail and that may be a result of removing those animation keys. Why are you removing them in the first place? Wouldn't it make sense for someone to load in an animated model and then they want to tweak the animation, add to it, or change it?

I guess you'll have to test it out with non textured models to see how they look. But even your sphere nodes are appearing without detail. There should be some shading on them so they don't look 2D.

Quote: "I'm also planning to modify the timeline to include a play/pause, stop and fast-forward/rewind button set. The timeline will also display a progress meter showing what point in the animation has been reached. I'm also thinking of removing the delete keyframe buttons on the Limb toolbar in favour of right-click the line on the timeline to remove a single frame - what do you think?"

Are you storing your own animation keys and frames in an array? If so, this makes sense and what you propose seems like it can be done. If you are writing the key frames directly to DBC using set object keyframe then I think you will run into problems. Ideally, you will bypass the DBC animation commands and custom build your own. That's the approach I was using with my animator. With the d3drm.dll file, calculating the quaternions for rotations is pretty straightforward. But I think you already have your own quaternion dll if I recall. To test the animation, you slerp your own keys and convert the rotations to euler angles and rotate the limbs directly.

Quote: "I'm also thinking of adding in keyboard shortcut keys to control the XYZ axis active - since LL is mouse-driven, my left hand never does anything except sit on the keyboard around the WASD keys (I've spent too much time playing with FPSC free...). What about making the number keys 1,2,3 toggle the XYZ axis as required, and save WASD for camera control in all modes? Perhaps A and D spin the model round, WS zoom in and out. Maybe throw in an alternative FPS view, where you control the camera as you would an FPS game?"

You should ask on this board and on the 3D chat board about what 3D modeling applications people use. It might make sense to base your interface and shortcut keys on the most used 3D apps so it seems familiar. For me, I use Blender most of the time. I'm used to making selections on the model itself with mouse click 2. I'm used to moving the camera or rotating it with mouse click 1 and 2 at the same time (mouse click 3). I'm used to selecting menu options with mouse click 1. I also use anim8or, and Deled 3d. I've used 3D canvas and I generally don't like the camera control by clicking on the little axis icons on the screen. Wings is kinda similar to Blender. Fragmotion is similar to Blender also.

I use the mouse with my left hand so I don't really feel comfortable with using WASD with my right hand because my right hand is usually on the arrow keys. So, ask a lot of people in different on the different forum boards to get a general idea of "the most common" interface to use. And there's no reason not to have several keys assigned to the same function (like arrow keys and WASD).

Enjoy your day.
Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 23rd Mar 2010 23:15
@Dark Dragon
It's nice to be back (though I'm noticing, a lot of DBC users are going DBPro...)

@Latch
I don't think removing animation keys has an effect on the object as such, though rotating limbs has an unusual effect. Taking the Dark matter Alien mutant as an example, the root limb is scaled to 0.1,0.1,0.1 as a keyframe at 0. Yet when you rotate the limb, the scale keyframe is automatically destroyed.

Regarding the lighting on the nodes, I'm not entirely sure what's happening - I'll have to check, but I may have called "Hide Light 0". The LL V1.0 was made in DBC 1.13, so maybe the lack of specular/ambient etc. has an effect.

I am storing my animation keys in an array, and i am planning a custom animation routine - not only to bypass the DBC animation glitch, but also to allow the use of scale keys. Strangely, although DBC allows you to scale limbs, the scale is not stored in "Save Object Animation".

Maybe I should just make the user interface fully customisable - a bit like the StarWraith Games. Could be tricky to define the actual key strokes in terms of Ctrl and Shift, but I think Ctrl trigger a special set of ASCII codes...

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 29th Mar 2010 18:22
Quote: "Maybe I should just make the user interface fully customisable - a bit like the StarWraith Games. Could be tricky to define the actual key strokes in terms of Ctrl and Shift, but I think Ctrl trigger a special set of ASCII codes..."

If you use keystate() you can detect multiple key presses at once. You can't do it effectively if you just check scancode() because the order of the scancodes have precedence.



Enjoy your day.
Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 2nd Apr 2010 17:52
Looks good, I think I see a nice easy way to insert a custom-keystroke routine as well.



Actually, LL may not be having any updates for another week, but i am still working on it. Very little of my original code is going to survive my rewrite - to ensure that it runs on all screen resolutions, I need a flexible, modular and easily adjusted GUI. I'm now coding one!

Elements will probably appear after the weekend (keep an eye out for a separate post called DarkGUI), I've had chunks of this on the drawing board for DBpro for ages, but in DBC it simplifies beautifully. Just have to port it over...

Happy Easter!

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Apr 2010 23:08
@RTR



Can't you leave away the "<> 0" ? I don't expect it to be less than 0.

If it does, then use ! instead of <>, it's 7 times faster:




I also advise you to check out this:

http://forum.thegamecreators.com/?m=forum_view&t=160974&b=6&p=0


Anyway, I am looking forward to this! Keep up the great work! I do have one question though. Why are you posting it in the DBC board and not in the WIP?

TheComet

Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 5th Apr 2010 16:15
@TheComet
Thanks for the link, it looks impressive! I'll have to keep that in mind, could come in handy.

Quote: "If it does, then use ! instead of <>, it's 7 times faster:"

Ah, I've only just figured out the & operator, but the ! is new to me - I assume that Not's all the bits? I use <> a air bit, I'll have to change that (every little bit of speed helps! )

Quote: "I do have one question though. Why are you posting it in the DBC board and not in the WIP?"

I don't even have a screenshot yet, so the mods would lock a WIP post for sure! Once I've got something to show, I might start a WIP thread, but I'm not sure how many non-DBC users would be interested - everything seems to be bone-based animation now.

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 5th Apr 2010 22:51
Quote: "Ah, I've only just figured out the & operator, but the ! is new to me - I assume that Not's all the bits? I use <> a air bit, I'll have to change that (every little bit of speed helps! )"




Enjoy your day.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Apr 2010 15:15
Quote: "everything seems to be bone-based animation now."


Well, that's the state of the art today...

I always avoided using <> in DBC, but in DBP they don't have the ! anymore, so I am forced to use <>.

I did find a command called "not", but you use it like this:



And guess what? It's slower than <>...

TheComet

Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 6th Apr 2010 19:04
DBPro has other bitwise operators. It's hidden in the principles section of the DBPro help files under "Operators" (% = binary number, but then I guess you knew that already ):



"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 7th Apr 2010 03:13
Quote: "RTR: everything seems to be bone-based animation now.

TheComet: Well, that's the state of the art today..."

For organic character animation perhaps. But when you have things like machinery or non-deforming interlocking parts, or vehicles, hierarchical animation is a much easier and practical way to go.

Quote: "I might start a WIP thread, but I'm not sure how many non-DBC users would be interested "

And I don't think one could build an animator in DBPro too easily. There aren't any methods to set keyframes and such. You'd have to build your own bone animation system so I don't know if there would be an advantage to coding an animator in DBPro (except for the fact that's compiled and not interpretted).

Enjoy your day.
Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 7th Apr 2010 17:01
Quote: "And I don't think one could build an animator in DBPro too easily."

Actually - I think you could. The EnhancedAnim plugin has a suite of custom keyframe commands. They all refer to limbs, but I think in DBPro "limbs" and "bones" are interchangeable.

The only problem comes with setting up the bones (that's not allowed) and exporting the animation (it can only be saved in the EnAn file format, so users would need the plugin to decode the animation data).

It's something I'd like to try and learn more about, but I can't get my head round the binary .X format!

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
seppgirty
FPSC Developer
14
Years of Service
User Offline
Joined: 3rd Jul 2009
Location: pittsburgh, pa.
Posted: 22nd Apr 2010 04:05
just wanted to add my 2 cents. if you are looking at other animation programs for ideas, i sugguest looking at truespace. (god rest it's soul ) i always thought it had a great user interface and the fact that you could select and edit in the 3d veiw made it so much easier to work with.....

gamer, lover, filmmaker
Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 1st May 2010 16:53
I did have truespace once (got it when it came out for free), but I never liked is GUI - maybe I should have persevered, but I never got it to do anything. I guess I'm just not good at 3D model making.

I will see what I can do to make LL more "3D based" for its editing, I think you may be in for a surprise when you start seeing some demos. DarkGUi is at the point where i can start using it, so LL should be getting started fairly soon...

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
seppgirty
FPSC Developer
14
Years of Service
User Offline
Joined: 3rd Jul 2009
Location: pittsburgh, pa.
Posted: 5th May 2010 21:05
i can't wait to see what you come up with robert.

p.s. truespace always got a bad rap for it's GUI, but once you got used to it, it was a great and easy to use program. it had such a smooth feel to it and now everything else i use (milkshape3d, fragmotion) seems so stiff and restricting.

gamer, lover, filmmaker
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 7th May 2010 00:14
@RTR
I was able to recreate the blanching error 3 ways:

1. by not setting a display mode
2. by having bad frame and bad animation keys in the directx file
3. setting the object DIFFUSE to 0. This makes sense because it basically eliminates surface reflection. The surface of the object itself is giving off no color reflection from it's material.

And a note, in my tests, using FADE OBJECT and SPECUALR at the same time give terrible results. Don't use specular set to anything but 0 if you use fade object (for the onion skins as an example). Of course it could be a problem with my video card... but specular by itself works well, and fade by itself works well. Together they give an effect (while cool) that can be undesirable.

Enjoy your day.
Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 13th May 2010 11:40
Lightning Limbs v1.1 has a demo release!

The download is in the first post, and includes full media and source code. While the demo is more of a showcase of DarkGUI than anything else, I've managed to implement the main menus, and got most of the buttons clickable. Only the limb submenus are implemented (offset/rotate limb etc.) and you can't even begin to do any animation yet, but I wanted to get the GUI working before I handled the important stuff.

@Latch
I've been playing around with the commands, and I think I just need to turn down the Object Ambient setting to something like "Set Object Ambient Obj, RGB(128,128,128). Playing with the diffuse seems to do some good as well, but turning that down to RGB(64,64,64) seems to leave the whites as a dark grey. Not sure how useful that would be, but it's worth playing about with, I'll see what more I can come up with.

I may not be online much for the next fortnight, but I will be keeping LL going, and should have another demo ready soon. My aim is to have LL 1.1 polished off by the end of June at the latest, and be well on my way to a DBPro Bone-based editor - "Blitz Bones". Here's hoping!

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."

Login to post a reply

Server time is: 2024-04-18 20:05:10
Your offset time is: 2024-04-18 20:05:10