marauder2k9 Posted July 13, 2015 Author Share Posted July 13, 2015 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 legs2nd 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 =/ ) Quote Link to comment Share on other sites More sharing options...
marauder2k9 Posted July 14, 2015 Author Share Posted July 14, 2015 anyone know how to add a another image index to the shapeimage.cpp file successfully? Quote Link to comment Share on other sites More sharing options...
marauder2k9 Posted July 14, 2015 Author Share Posted July 14, 2015 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 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 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 Quote Link to comment Share on other sites More sharing options...
marauder2k9 Posted July 20, 2015 Author Share Posted July 20, 2015 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? Quote Link to comment Share on other sites More sharing options...
marauder2k9 Posted February 13, 2018 Author Share Posted February 13, 2018 Okay i think i have this finally working, attached to this post is how most devs do first person models for their characters. You see no torso up until the point the player can seeScreenshot from alien isolation. The problem i was having before was that with a mesh similar to this it was only rendering a shadow for the arms legs etc, the 2nd lod of the model (the one used for 3rd person) had everything in the model and i wanted the shadow to come from that instead. Now i am able to do this to some extent in torque but i have to use an alpha mask for the parts of the model i want hidden. So far its been the only way i can find to do it. Quote Link to comment Share on other sites More sharing options...
Duion Posted February 14, 2018 Share Posted February 14, 2018 Why don't you just use the same model for both. Quote Link to comment Share on other sites More sharing options...
marauder2k9 Posted February 14, 2018 Author Share Posted February 14, 2018 high fidelity animations in fp arms for weapons and such (finger movement etc etc) simpler animations for third person. I am getting a mocap setup soon so i probably wont need the separation of the two but most AAA devs separate them out still due to camera bleeding through parts of the mesh if the animation isnt perfect so its still good practice to remove those parts of the mesh and have the camera sitting just inside the head behind the eyes to give the proper viewpoint. This has been the usual for some time in a lot of fps games its also why in a lot of fps games there is no shadow for the playable character but for immersion reasons i want shadows on mine to suit the game style. Also if ur camera is locked to a bone that is in turn linked to other bones that have mocap movements applied to them the camera becomes really jittery and weird for the player Quote Link to comment Share on other sites More sharing options...
Duion Posted February 15, 2018 Share Posted February 15, 2018 There is a simple checkbox where you enable the shadows in first person of the third person model, it works well and I use it. So I do not really understand your problem. It is kind of irrelevant of what you use in first person, the shadow will always work. Quote Link to comment Share on other sites More sharing options...
marauder2k9 Posted February 15, 2018 Author Share Posted February 15, 2018 This was the problem when using the use 3rd person shadowand this was the problem with using the original mesh Quote Link to comment Share on other sites More sharing options...
Jason Campbell Posted February 15, 2018 Share Posted February 15, 2018 I remember trying to get a mirror working and it was the opposite but same issue I think. You got it working though? Quote Link to comment Share on other sites More sharing options...
Duion Posted February 15, 2018 Share Posted February 15, 2018 Then why does it work for me and not for you? What did you change? Quote Link to comment Share on other sites More sharing options...
marauder2k9 Posted February 22, 2018 Author Share Posted February 22, 2018 I remember trying to get a mirror working and it was the opposite but same issue I think. You got it working though? I got it working for what i wanted, i dont think a mirror would work though i will try and create a mock level and upload a few screens of it with mirrors and things when i get a chance. Quote Link to comment Share on other sites More sharing options...
noemen Posted December 10, 2019 Share Posted December 10, 2019 I'm having big problems when I'm going to put the iron sights. The Eye node does not follow and the hand is outside the weapon. It is not cool. Could you find a solution? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.