The place to post mesh,and animation related hints and problems.

Animation Blending ?

Animation Blending ?

Postby SpiderMack » 26 Sep 2017, 10:07

Hi

Is animation blending possible ? I didn't find any code example.
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Animation Blending ?

Postby SolarPortal » 26 Sep 2017, 10:15

yes, animation blending is possible as it animation weighting.
The first is easier than the latter.

When playing an animation in lua, it has a set of arguments at the back of the function:
Code: Select all
     anim.playAnimation(objID, "walk", 30, blendEnable);


-- 30 is the speed to blend the new anim from the old anim.
-- blend enable is a 1 or 0 value to enable or disable animation blending when playing another animation.

Other functions you may be interested in:

Code: Select all
    anim.stopAnimation(charID, "walk");
    anim.setSpeed(charID, "walk", Speed); -- -1 will make animations go backwards, useful for backwards walking or running.


The animation mapper is set from the entity property panel, and is retrieved in lua by the command:
Code: Select all
     animation = anim.getFromMap(obj, "Idle1"); -- returns the animation named assigned by the animation mapper for the entity.
     anim.playAnimation(objID, animation, 30, 1);


This allows you to reuse animation keys in the script across many entities that have different animation names, this can be setup from:
Clipboard Image.jpg
Clipboard Image.jpg (6.2 KiB) Viewed 1335 times


Clipboard Image (1).jpg
Clipboard Image (1).jpg (31.07 KiB) Viewed 1335 times
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3151
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Animation Blending ?

Postby SpiderMack » 26 Sep 2017, 12:15

Nice , Skyline looks very complete and incredibly good graphics , almost ready for Steam once examples and templates are back :D

About the "Action Mapper" does it crashes the engine when some Action is not mapped "not Used" and we don't choose some animation ?
Why not play the first available animation when it is used in game and user did not map the action ?
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Animation Blending ?

Postby SolarPortal » 26 Sep 2017, 12:18

Nice , Skyline looks very complete and incredibly good graphics , almost ready for Steam once examples and templates are back :D

Wow, thanks for saying that! Bit motivation booster.. Gen2 is alot more advanced then Gen1 :P

About the "Action Mapper" does it crashes the engine when some Action is not mapped "not Used" and we don't choose some animation ?
Why not play the first available animation when it is used in game and user did not map the action ?


not, sure, will need to check this.. like you say it should use the first one or just fail to play the animation
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3151
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Animation Blending ?

Postby StarFire » 26 Sep 2017, 12:21

If the mapper has an entry of "None" and you call play animation in lua with and entry such as Idle1(which is not set) the character just plays the anim that is set in its base properties.
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1424
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Animation Blending ?

Postby SpiderMack » 26 Sep 2017, 13:37

Wow, thanks for saying that! Bit motivation booster.. Gen2 is alot more advanced then Gen1 :P


I am really astonished by so many many features :
- IBL lighting working great and looking gorgeous
- Physical based rendering shaders looking great already
- Tweakable materials for transparent, double sided and other options
- Super easy Lua coding gameplay
- Visual Scripting :o
- Many detail maps and controls :D
- Full UI + Quest system
- Full FBX and animations import
- Character Physics system
- Player and AI scripts ready to use
- Great particle system :D
- Quality starter materials, textures, characters , scripts for fast prototyping.

Once tutorials and templates are back in the package, i think it will be ready :D

Terrain is not the most important feature, you can do lot of different games without terrain or using your own terrain meshes like some AAA games (Cod, Dishonnored, Bioshock, Prey, adventure games, puzzle games, racing games ...).

StarFire wrote:If the mapper has an entry of "None" and you call play animation in lua with and entry such as Idle1(which is not set) the character just plays the anim that is set in its base properties.

Nice.
Last edited by SpiderMack on 26 Sep 2017, 13:41, edited 1 time in total.
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Animation Blending ?

Postby StarFire » 26 Sep 2017, 13:41

Very happy to see you are enjoying Skyline as much as we do :D
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1424
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Animation Blending ?

Postby SpiderMack » 26 Sep 2017, 13:43

StarFire wrote:Very happy to see you are enjoying Skyline as much as we do :D


The only issue is not the engine but how to make good enought 3D models,level and code good gameplay :lol:
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Animation Blending ?

Postby SolarPortal » 26 Sep 2017, 14:39

Great to hear your thoughts on the engine @SpiderMack.

The only issue is not the engine but how to make good enought 3D models,level and code good gameplay :lol:

lol. thats the same case across all engines :P
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3151
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Animation Blending ?

Postby StarFire » 26 Sep 2017, 14:45

Hopefully our game objects and mechanics systems will give you a head start in creating your game play ;)
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1424
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer


Return to Mesh + Animation

Who is online

Users browsing this forum: No registered users and 1 guest