Ped Shadow and texture problem

GTA:V Modding with ZModeler3 discussion.
Post Reply
ForsenE
Posts: 2
Joined: Sun Jun 27, 2021 1:02 am

Ped Shadow and texture problem

Post by ForsenE »

Tried finding a possible solution for this for a while but couldnt get any,
Image
Whenever I use ped_alpha the glass of the gasmask work (both the hair and the glass have the same texture image) but the shadow doesnt work for the hair
Image
So I switched to ped_hair_cutout_alpha and the glass disappears, the shadow works though, along with the rest of the textures in the hair.
Couldnt find a solution for this so Im asking Oleg and other experts on the matter for help here.
User avatar
Oleg
Site Admin
Posts: 14102
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped Shadow and texture problem

Post by Oleg »

the "cutout" version of shader cuts pixels (makes them invisible) below some alpha value. quite good for sharp alpha cut on foliage for example. The ped_alpha uses alpha channel to make pixels semitransparent. I don't know how game generates shadow data but quite likely it has it's own decision making code whether semitransparent pixel drops shadow or not.

I advise to make hair and mask as two different components, so you can use different shaders. Also, if I'm not mistaken, one ped component can use different shaders, while it is constrained to one texture file. So, what about using different materials (and different shaders) for the mask and for the hair?
ForsenE
Posts: 2
Joined: Sun Jun 27, 2021 1:02 am

Re: Ped Shadow and texture problem

Post by ForsenE »

Oleg wrote: Fri Dec 10, 2021 10:48 am the "cutout" version of shader cuts pixels (makes them invisible) below some alpha value. quite good for sharp alpha cut on foliage for example. The ped_alpha uses alpha channel to make pixels semitransparent. I don't know how game generates shadow data but quite likely it has it's own decision making code whether semitransparent pixel drops shadow or not.

I advise to make hair and mask as two different components, so you can use different shaders. Also, if I'm not mistaken, one ped component can use different shaders, while it is constrained to one texture file. So, what about using different materials (and different shaders) for the mask and for the hair?
Didnt think about that when I was making it but it works now, Thanks Oleg. But as for using the same texture file in a .ytd file for 2 different components I know nothing about that.
Post Reply