Seriously!
Get Your Official Serious Sam T-Shirts! (Women's Shirts)
Go Back   Seriously! Forums > Creative Corner > Serious Engine 1 Workshop > Serious Sam Classic SDK

Serious Sam Classic SDK Discuss coding ideas & problems or show tutorials and code snippets.

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 12-31-2011, 11:16 AM   #1  
Kleer
 
SeriousAlexej's Avatar
 
Joined: May 2011
Location: Ukraine
 
SeriousAlexej is offline Steam ID: SeriousAlexej Send a message via Skype™ to SeriousAlexej
Default SDK and SKA

Does anyone know how can I get a Pointer to SKA model's bone or at least how to acces and modify it's rotation values? I know how to get it's ID from SKA String Table, but it gives me nothing
  Reply With Quote
Old 01-01-2012, 04:55 PM   #2  
Khnumilicious!
 
Discy's Avatar
 
Joined: Jul 2003
Location: The Netherlands
 
Discy is offline Steam ID: joey42
Default Re: SDK and SKA

Is this what you're looking for?
__________________
"Is there any better Gerüstbaufirmenvorarbeiterschlüsselanhängerfarbenwasserlöslichkeitskontrollchemiker than discy? No!" -Shrinker
[22:30] Fiendian: Discy, Finzy and Louva shall merge into a superentity known as the Lickyfonz.
  Reply With Quote
Old 01-01-2012, 05:29 PM   #3  
Kleer
 
SeriousAlexej's Avatar
 
Joined: May 2011
Location: Ukraine
 
SeriousAlexej is offline Steam ID: SeriousAlexej Send a message via Skype™ to SeriousAlexej
Default Re: SDK and SKA

No, I need a help in SDK. I want to replace old player mdl files with new smc meshes with cool skeletal animations. Almost evrything is done, but I want a bone called MidTorso to follow player camera, like Body.mdl.
  Reply With Quote
Old 05-05-2012, 07:50 PM   #4  
Kleer
 
SeriousAlexej's Avatar
 
Joined: May 2011
Location: Ukraine
 
SeriousAlexej is offline Steam ID: SeriousAlexej Send a message via Skype™ to SeriousAlexej
Default Re: SDK and SKA

It seems there are only a few people here who know how to work with SKA models.
Well, I'll try another question.
Does anyone know, why do SKA models have static Directional Light orientation?
For example, here everything is OK:

But here the spine is unshaded just like on the previous screenshot, even though the player is now facing the sun:

Is there any special function that updates light direction and must be called manually, or SKA system has been finished only on Xbox and PC version isn't fully working?

------------UPDATED:

Ok, problem solved. You should manually find a Directional light:

CEntityPointer FindDirectionalLight(void)
{

CEntityPointer pen_return = NULL;
{FOREACHINDYNAMICCONTAINER(GetWorld()->wo_cenEntities, CEntity, iten) {
CEntity *pen = iten;
if (IsOfClass(pen, "Light")) {
CLight *light = (CLight *)pen;
if(light->m_ltType==LT_DIRECTIONAL){
pen_return = pen;
}
}
}
}
return pen_return;
}

Then you should calculate the relative normal from it and change the light direction on SKA model (normal must be calculated and applied to the model each tick):

CEntityPointer penDLight = FindDirectionalLight();
if(penDLight!=NULL){
CPlacement3D plDLight = penDLight->GetPlacement(),
plThis = CPlacement3D(FLOAT3D(0,0,0),GetPlacement().pl_Orie ntationAngle);
plDLight.AbsoluteToRelative(plThis);
FLOAT3D fLightDir;
ANGLE3D aLightAng = plDLight.pl_OrientationAngle;
AnglesToDirectionVector(aLightAng, fLightDir);
RM_SetLightDirection(fLightDir);
}

Last edited by SeriousAlexej; 05-06-2012 at 11:52 AM.
  Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:27 PM.