First person legs and body

Level design, models, animations, physics, etc.
29 posts Page 3 of 3
marauder2k9
Posts: 138
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Mon Jul 06, 2015 3:19 am
the arms are actually coming from the first person model for each weapon that u make, the client/player sees the usual first person model file and the third person model file without arms or head, u only have to make accurate reload animations for the first person meshes and not the third person mesh. the third person mesh that will be used for first person body will only need ur basics eg: walk run jump land look etc etc no weapon animations then a separate 3rd person mesh would be used for what the server/multiplayer sees. this is the one that would need to be used for shadows as well otherwise your shadows will have no head or arms lol i think this is similar to what the likes of battlefield uses. Accurate reload animations for every weapon in a third person mesh are rare and also expensive to have. Best to use simple ones and keep expensive ones that can be re-used for your fp arms meshes
marauder2k9
Posts: 138
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Mon Jul 13, 2015 7:08 pm
Image

Image

The result, and problem, shadow needs 2nd lod not 1st anyone know how to change this?

This was just a quick edit of the soldier model to remove arms nothing else just to illustrate how it could be pulled off
Duion
Posts: 756
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Mon Jul 13, 2015 11:29 pm
You probably will need some coding skills for changing the shadowcasting that it will use the third person model for first person shadowcasting.

The easy solution is to just turn it off.
marauder2k9
Posts: 138
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Mon Jul 13, 2015 11:36 pm
i original thought this would be something to do with it $pref::PSSM::detailAdjustScale = "0.85"

but ive changed the value a few different times and im not seeing much difference each time
Azaezel
Posts: 377
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Tue Jul 14, 2015 12:08 am
You're looking for what's touched by https://github.com/GarageGames/Torque3D ... 3db7a637ca though I do have to say at this point, I'm not quite following what it is you're going for here...
marauder2k9
Posts: 138
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Tue Jul 14, 2015 12:27 am
It will become clear when i get it working, the idea is simple, u have 3 meshes, a high poly realistic first person hands mesh and a first person body and legs mesh as seen in the screen shot. but i want shadows to see a separate mesh, i was trying to set it up so it could be done with LOD's though but i dont think that is going to work.

1st LOD = 1st person body and legs
2nd LOD = 3rd person mesh, what the shadowpass and server sees.
then all LOD meshes after this will be as usual

I think that link you shared may be a good place to start, might just take an extra bit of code to read shadows from a separate mesh (wouldnt it be great if it was that easy =/ )
marauder2k9
Posts: 138
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Tue Jul 14, 2015 11:21 pm
anyone know how to add a another image index to the shapeimage.cpp file successfully?
marauder2k9
Posts: 138
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Tue Jul 14, 2015 11:28 pm

Code: Select all

U32 ShapeBase::getImageShapeIndex(const MountedImage& image) const
{
   U32 shapeIndex = ShapeBaseImageData::StandardImageShape;
   

   const ShapeBaseImageData* data = image.dataBlock;
   if (data && data->useFirstPersonShape && isFirstPerson())
      shapeIndex = ShapeBaseImageData::FirstPersonImageShape;

   if (data && data->useShadowShape)
      shapeIndex = ShapeBaseImageData::ShadowImageShape;

   return shapeIndex;
}



so far i have this, it seems to work correctly, i have streams set up to suit, header files set up correctly aswell, i think the problem lies here

Code: Select all

for (U32 i=0; i<MaxShapes; ++i)
   {
      // Shape 0: Standard image shape
      // Shape 1: Optional first person image shape
     // Shape 2: Optional shadow shape
      
      StringTableEntry name;

      if (i == FirstPersonImageShape)
      {
         if ((useEyeOffset || useEyeNode) && shapeNameFP && shapeNameFP[0])
         {
            // Make use of the first person shape
            useFirstPersonShape = true;
            name = shapeNameFP;
         }
         else
         {
            // Skip the first person shape
            continue;
         }
      }
     
     else
      {
         name = shapeName;
      }


Every time i try to add another statement to this for the shadow file, it still builds but u get really bad result.

In player.cpp i have this

Code: Select all

if ( state->isShadowPass() )
   {
      // Force the shadow image shapes for the shadow pass.
      imageShapeIndex = ShapeBaseImageData::ShadowImageShape;
   }


which is just a modification of the code that was already there to use my new image index
marauder2k9
Posts: 138
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Mon Jul 20, 2015 9:00 am
Tried this again last night with a fresh version of torque to see if there was something i missed and i think i forgot to add the resources code into shapebase.cpp aswell. Just out of curiosity has anyone messed with the shape indexes before? anything i should know about like for example should all meshes be a lower index than the fp arms mesh for a reason or is that just coincidence?
29 posts Page 3 of 3

Who is online

Users browsing this forum: No registered users and 2 guests