Jump to content

  • Log In with Google      Sign In   
  • Create Account


Alundra

Member Since 19 Jul 2011
Offline Last Active Today, 01:41 PM
-----

Posts I've Made

In Topic: Post-Process Fog and Transparent Object

14 July 2014 - 11:27 AM

Interesting, that demand research on the atmospheric scattering rendering.

It's surely a better option than old school fog, more modern, I should look at GPU Pro 5.


In Topic: Post-Process Fog and Transparent Object

13 July 2014 - 08:17 AM

This is the only option I found too, sounds like no other way exist.


In Topic: State Machine

08 July 2014 - 06:18 AM


As example, I use a mix of behavior trees and FSM, my fsm are integrated in my BTs and look something like this:
int state = getState();
if(state==INIT) {
...start movement...
state = MOVE;
} else if(state==MOVE) {
// check if target reached
if(targetReached()) {
state=DONE;
} else if(movementBlocked()) {
state=BLOCKED;
} else if(state==BLOCKED) {
if(timeoutReached()) {
state=MOVE;
}
}
setState(state);
You dont need any fancy, tool supported, generic state machine for simple stuff like this. More complex stuff is handled by my BTs.

This is what I have in my character animation state machine using if/else without state machine system :

enum TPlayerState
{
  PS_IDLE = 0,
  PS_MOVE = 1
};

// Animation state machine.
if( m_MoveDirection != DE::CVector2( 0.0f, 0.0f ) )
{
  ...
  m_PlayerState = PS_MOVE;
}
else
{
  // Check if we changed of state.
  if( m_PlayerState != PS_IDLE )
  {
    ...
    m_PlayerState = PS_IDLE;
  }
}
Go to AIGameDev.com, join for free (this will give you a restricted access), and read e.g. the articles / listen the recordings

Thanks for the link didn't knew that one smile.png


In Topic: State Machine

07 July 2014 - 09:51 PM

The good point of state machine is it could be reused for my motion system, who is good if the state machine is generic.

But someone told me behavior tree is better, any information about that ?


In Topic: Cascaded Shadow Map Geometry Shader Frustum Culling

04 July 2014 - 09:33 AM

Here the geometry shader :

struct GS_OUTPUT
{
  float4 Position : SV_POSITION;
  uint RT_Index   : SV_RenderTargetArrayIndex;
};

cbuffer CASCADED_SHADOW_CBUFFER : register( b0 )
{
  float4x4 ViewProjection[4];
};

[maxvertexcount(12)]
void main(triangle float4 InPos[3] : SV_Position, inout TriangleStream<GS_OUTPUT> OutStream)
{
  for(uint i = 0; i < 4; ++i )
  {
    GS_OUTPUT Output;
    Output.RT_Index = i;
    for(int v = 0; v < 3; v++ )
    {
      Output.Position = mul(InPos[v], ViewProjection[i]);
      OutStream.Append(Output);
    }
    OutStream.RestartStrip();
  }
}

The culling has to be done here, since it's cascaded shadow, maybe the same code used to have the good cascade index can be used.


PARTNERS