Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Masks compenetrate with head

Featured Replies

Hi guys.

I have a simple function that generates a random face for every ped. It uses SET_PED_HEAD_BLEND_DATA with random mother, father and float for mixing and then calls FINALIZE_HEAD_BLEND. The problem is that if I apply a face mask to this ped (calling Rage.Ped.SetVariation), 80% of the time it compenetrates with his face, obtaining a very bad result. I have never seen something like that happen in GTAO so I think there is something wrong with my approach. 

Can someone help me? 

 

Example:

Spoiler

303753707_GrandTheftAutoV22_09_202215_13_26.thumb.png.4f08f91346a1a7828d4747efd987094e.png

 

Edited by AchilleX
Added image

Check out my FIB HRT Callouts script for LSPDFR!

7 hours ago, AchilleX said:

Hi guys.

I have a simple function that generates a random face for every ped. It uses SET_PED_HEAD_BLEND_DATA with random mother, father and float for mixing and then calls FINALIZE_HEAD_BLEND. The problem is that if I apply a face mask to this ped (calling Rage.Ped.SetVariation), 80% of the time it compenetrates with his face, obtaining a very bad result. I have never seen something like that happen in GTAO so I think there is something wrong with my approach. 

Can someone help me? 

I would not have expected that. It then seams that the geometry-model for a ped-face (mesh) is not automatically adapted by a mask that is added to that face. Interesting!
Of cause if your random-faces are absurd and non-realistic -like several inches noses and other calamities, then i would understand it, and then the solution would be to restrict the variation to human-proportions
I dont know the code for that, sorry.

See my plugin here:
https://www.youtube.com/watch?v=peqSXuTfIyY

Let me know if you find it interesting.
Best Regards.

  • Author
2 hours ago, GTAbear said:

I would not have expected that. It then seams that the geometry-model for a ped-face (mesh) is not automatically adapted by a mask that is added to that face. Interesting!
Of cause if your random-faces are absurd and non-realistic -like several inches noses and other calamities, then i would understand it, and then the solution would be to restrict the variation to human-proportions
I dont know the code for that, sorry.

Faces are ok 😆, the code for setting them up is something like this 

int mother = ...; // random female face 
int father = ...; // random male face 
float mixing;

if (ped.IsMale) 
  mixing = 0.9f - randomFloatBetween0and0.1;
else
  mixing = 0.1f + randomFloatBetween0and0.1;

 

So that women are really women and men are men. I think I have seen worse faces in GTAO 😂

 

Maybe when you put a mask on in GTAO it calls SET_PED_HEAD_BLEND_DATA to reset the face back to the default?

Check out my FIB HRT Callouts script for LSPDFR!

1 hour ago, AchilleX said:

Faces are ok 😆, the code for setting them up is something like this 

int mother = ...; // random female face 
int father = ...; // random male face 
float mixing;

if (ped.IsMale) 
  mixing = 0.9f - randomFloatBetween0and0.1;
else
  mixing = 0.1f + randomFloatBetween0and0.1;

 

So that women are really women and men are men. I think I have seen worse faces in GTAO 😂

 

Maybe when you put a mask on in GTAO it calls SET_PED_HEAD_BLEND_DATA to reset the face back to the default?

The thing you need is a way to 'capture' the values controlling the face-anatomy of the made 'mixing', and that should be the input-values for the 'anatomy' of the mask, as that is build.
But i do not have any idea of how to make that -Sorry
Have you gone through constructors for mask-objects?
Perhaps one has overload for the ...idk 'bones'(?) -well it is a mesh -but how that is set..(?)
Idk..
Is it one specific mask you want.. The 'rubber-animal-masks' i would believe would cover any type of face. Perhaps one of those could be a 'loophole'?

See my plugin here:
https://www.youtube.com/watch?v=peqSXuTfIyY

Let me know if you find it interesting.
Best Regards.

  • Author
11 hours ago, GTAbear said:

The thing you need is a way to 'capture' the values controlling the face-anatomy of the made 'mixing', and that should be the input-values for the 'anatomy' of the mask, as that is build.
But i do not have any idea of how to make that -Sorry
Have you gone through constructors for mask-objects?
Perhaps one has overload for the ...idk 'bones'(?) -well it is a mesh -but how that is set..(?)
Idk..
Is it one specific mask you want.. The 'rubber-animal-masks' i would believe would cover any type of face. Perhaps one of those could be a 'loophole'?

 

Masks are not object nor props. They are a component variation that can be put on calling SET_PED_COMPONENT_VARIATION with componentId=1. I cannot find any native regarding adapting the mask to the face. Similar thing happens with hair (if it's long enough) and mask/hat. I have no idea what Rockstar do in GTAO...

Check out my FIB HRT Callouts script for LSPDFR!

  • Author

My solution for now is something like this 

public static void SetOutfit(Ped ped, Outfit outfit) 
{
  for (int i = 0; i < 12; i++) 
  {
    Component? component = outfit.Components[i];
    if (component is Component value) 
    {	
      // Set the head back to default
      if (i == 1 && value.DrawableID != 0) 
        SetHeadBlendData(ped, 0, 0, 0f);
      ... // Set the component 
    }
  }
  ... // Set props
}

 

Does not work well for women though 😞

Edited by AchilleX

Check out my FIB HRT Callouts script for LSPDFR!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.