I have a character, who’s eyes are so big, that they are clipping with the head-shape. (I just need big flat eyes for the cartoon style).
I solve this problem in blender with a boolean modifier, the bool object is bound to the head bone. Although (I could do this with an empty-object and texture transparency.)
But how would you “hide” a part of the eyes inside unreal? The transparent texture would have to read the headbone position and rotation.
I have an eyes SKM, body SKM, and use blendshapes/morphtargets for the eye rotation, no eye bones. the body_SKM is parent of the eyes_SKM (they follow the animations, just like clothes).
You would just add an an alpha to the eye material (either with an alpha channel on base color texture or a separate grayscale texture), plug that into alpha pin on material output, and in details of material change it from opaque to translucent.
Or you could just apply the boolean modifier in blender to permanently chop of the unneeded geometry. How do you currently make eyes look around in animations? Are you moving the eyes up/down/left/right? If so, might be better to make a dynamic material instance, and just pan the texture on the eyes.
I currently use a boolean modifier, not applied, in blender. the boolean object is attached to the headbone.
The eyes are so big, they also overlap each other. Significantly.
I use a complex eye model not just a texture with a painted iris, otherwise i would have done something different. I would like to do it with transparency inside unreal, but the problem is, it would have to dynamicaly change the transparency in 3d space, not on UV Space. Otherwise, the transparency might hide too much of the eye.
If you’re already using blendshapes/morph targets to turn the eyes you could apply the bool to nuetral postion, then use the morphs to just move the pupil/iris geo, leaving the sclera geo pined to sockets
this was a suggestion by unreal developer assistant. result goes to opacity mask. The masking itself works and i can edit the coordinates. but the custom primitive data from the blueprint seems to not work.
Did you edit the skeletal mesh component and add custom primitive data to it first? If the component doesn’t already have CPD setup, setting it won’t do anything. Could write coords straight to material with a dynamic material instance instead.
As for following rotation, the BoxMask3D function is pretty much a a dumb axis-aligned box like bounds. To make it “follow” rotation, you’d probably need to convert vertex positions to pre-skinned location in the material then do the math on them. That, plus writing the transfrom in tick is gonna be expensive tho, probably killing your fps if there’s more than one character on screen.
I’d try experimenting with editing the blendshapes/morphs in Blender first. Or just paint the iris and pupil onto the eyeball material and pan the texture to look around.
The problewm with applying the bool modifiers inside blender is, the eye model is quite realistic and not simple. I would have to edit a lot, and hope it just works…