Git Product home page Git Product logo

Comments (8)

JRicaurte1985 avatar JRicaurte1985 commented on May 22, 2024 2

I too hope this is in the works. Your tutorials have been very useful and easy to follow.

BTW was hoping to find more info from the link, but the metlab link gives a 404 =(

from directxtk.

walbourn avatar walbourn commented on May 22, 2024 1

The main things missing at this point are an animation controller, support for loading skeletons and animation data from SDKMESH_ANIM or CMO.

That said, the original XNA product didn't include an animation controller as this was generally something the community implemented. As such, I need to at least provide a basic sample that provides a starting point for an animation controller.

from directxtk.

walbourn avatar walbourn commented on May 22, 2024 1

http://metlab.cse.msu.edu/betterskinned.html

from directxtk.

krupitskas avatar krupitskas commented on May 22, 2024 1

Hey! Any progress on this?

from directxtk.

walbourn avatar walbourn commented on May 22, 2024

Associated with changeset 31658: DirectXTK: Skinned Model support
◾Updated DGSLEffect with support for skinning
◾IEffectSkinning interface added
◾Updated SkinnedEffect to use default texture if no texture set
◾Updated Model loading to use skinned effects and vertex types

from directxtk.

walbourn avatar walbourn commented on May 22, 2024

One option would be to clean up the original D3DX9 ID3DXAnimationController / ID3DXAnimationSet code into a generic open source form. The main challenge is that it would leave loading/saving the animation data as an exercise to the client since the original code was focused on the now deprecated x file format. Should be fairly easy to use with SDKMESH or CMO animation data.

I would implement the equivalent to ID3DXKeyframedAnimationSet. Implementing the Compress method and ID3DXCompressedAnimationSet would likely be a 'stretch goal' or a v2 thing.

from directxtk.

dudedude1234 avatar dudedude1234 commented on May 22, 2024

This is how far I got:

pch.h
`ID3DXAnimationController^                           _animCtrl;`
ID3DXAnimationController.h
`#pragma once
#include <pch.h>





ref class  ID3DXAnimationController
{
public:

    HRESULT ID3DXAnimationController::AdvanceTime(
        DOUBLE TimeDelta,
        LPD3DXANIMATIONCALLBACKHANDLER pCallbackHandler);

    HRESULT ID3DXAnimationController::SetTrackAnimationSet(
        UINT Track,
        ID3DXCompressedAnimationSet  pAnimSet);

    HRESULT ID3DXAnimationController::GetAnimationSet(
        UINT Index,
        ID3DXCompressedAnimationSet* ppAnimSet);

    HRESULT ID3DXAnimationController::SetTrackEnable(
        UINT Track,
        BOOL Enable // True to enable and false to disable.
    );

    HRESULT ID3DXAnimationController::SetTrackSpeed(
        UINT Track,
        FLOAT Speed);

    HRESULT ID3DXAnimationController::SetTrackWeight(
        UINT Track,
        FLOAT Weight);

    HRESULT ID3DXAnimationController::SetTrackPriority(
        UINT Track,
        DXGI_OFFER_RESOURCE_PRIORITY Priority
    );

     HRESULT ID3DXAnimationController::ResetTime();
};`

ID3DXAnimationController.cpp
`#include "ID3DXAnimationController.h"

HRESULT ID3DXAnimationController::AdvanceTime(DOUBLE TimeDelta, LPD3DXANIMATIONCALLBACKHANDLER pCallbackHandler)
{
	return E_NOTIMPL;
}

HRESULT ID3DXAnimationController::SetTrackAnimationSet(UINT Track, LPD3DXANIMATIONSET pAnimSet)
{
	return E_NOTIMPL;
}

HRESULT ID3DXAnimationController::GetAnimationSet(UINT Index, LPD3DXANIMATIONSET* ppAnimSet)
{
	return E_NOTIMPL;
}

HRESULT ID3DXAnimationController::SetTrackEnable(UINT Track, BOOL Enable)
{
	return E_NOTIMPL;
}

HRESULT ID3DXAnimationController::SetTrackSpeed(UINT Track, FLOAT Speed)
{
	return E_NOTIMPL;
}

HRESULT ID3DXAnimationController::SetTrackWeight(UINT Track, FLOAT Weight)
{
	return E_NOTIMPL;
}

HRESULT ID3DXAnimationController::SetTrackPriority(UINT Track, DXGI_OFFER_RESOURCE_PRIORITY Priority)
{
	return E_NOTIMPL;
}

HRESULT ID3DXAnimationController::ResetTime()
{
	return E_NOTIMPL;
}`



Player.cpp

`void Player::Idle()
{
    ID3DXAnimationSet* idle = 0;
    _animCtrl->GetAnimationSet(Idle_INDEX, &idle);
    _animCtrl->SetTrackAnimationSet(0, idle);
    _animCtrl->ResetTime();
}`

I couldn't find a replacement for LPD3DXANIMATIONCALLBACKHANDLER, ID3DXCompressedAnimationSet and ID3DXCompressedAnimationSet

from directxtk.

walbourn avatar walbourn commented on May 22, 2024

DirectX12 version microsoft/DirectXTK12#104

from directxtk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.