Opaque Translucent Material For VolumetricMesh

Hello every one, I’m new to unreal and need help.

I want a material with the following specifications for a volumetric mesh that is manufactured as a procedure in run time and constantly updated( that image is attached):

1- The upper part of the mesh is like an opaque object and does not pass through light.

2- As we move from the top to the bottom of the mesh, its stiffness is reduced and looks like a transparent jelly body and passes through the light.

[FONT=Lohit Devanagari]3- The mesh walls should be able to display good normal map.
Thanks.

ps: about my setup: ue 4.20 , ubuntu os.

Take this all with a grain of salt as im not too skilled at ue4, and i don’t exactly get the question.

For the upper part/outer layer: Just use simple opaque/masked materials unless im misunderstanding completely, easy peasy.

“volumetric mesh”: Not even google or wikipedia knows what this means, almost definitely not supported, on all engines, likely forever. Unless your just asking for a simple volumetric effect, then try modifying one of the local volumetric fog tutorials, or are asking for a secondary layer inside, then ignore all of this and just use 2 materials, 1 inside 1 outside.

“that is manufactured as a procedure in run time and constantly updated”: If there is any alternative with an .obj or and .fbx, that is your best bet, as runtime is mostly plugin-dependant here as far as im aware. And updating it is likely easy with blueprint and materials.

“As we move from the top to the bottom of the mesh, its stiffness is reduced and looks like a transparent jelly body and passes through the light.”, People struggle with getting water opacity right, to such a degree finding a shader that doesn’t just make it opaque, fixed opacity, or depth fade is incredibly rare, and volumetric lighting requires either modifying the engine’s source, a hack, using some sort of volume material, or being really, really smart

what the heck is it?

I appreciate your reply.
I model the cutting of a tissue that is mechanically produced by another engine (which supports a volumetric mesh) and its output is sent to unreal at tick time by our plugin. The output is an obj procedural mesh with one section.
As you mentioned, an opaque material is good for the upper part and a transparent material is suitable for the lower part. But the mesh in question is integrated and I want this top-down material change to be Smooth.
Can I have two materials for an .obj mesh?
I tried to make this with dither opacity mask and height map.But I had two problems with jittering and ghosting.
I’m working on a Linux operating system, and I have some restrictions on using Unreal capabilities. For example, I don’t have volumetric light, volumetric fog, and Ray Tracing.
“… it opaque, fixed opacity, or depth fade is incredibly rare, and volumetric lighting requires either modifying the engine’s source, a hack, using some sort of volume material, or being really, really smart”
My friends and I are very excited to be able to create this feature. If you introduce us a tutorial, we would be very grateful.

Can you share a picture of the mesh?

You can definitely do what you want with just one material, but how you go about it depends tremendously on the exact geometry and the UV unwrap.

You could essentially even generate different UV maps to apply different textures that way, but you need to be able to control the initial geometry. Is that possible?

I produce procedural mesh with c++ source code. I have access to all of the mesh components, including the vertices, normals ,triangles, and the UVs.
I calculate the UV in the Blender , extract the UV data from the obj file and use in my code.
I’m new to modeling. Please explain your idea further.
I attach the mesh image in the initilal.
thanks.

Ok, so the mesh has nothing “on top” that can act as the glossy effect you have in the image.
The first thing would be to create a shell that has the same exact geometry of the overall circle - minus the kink. Also, for performance sake, you only really need this overlayed on top - and it can be a simple circle with matching segments of the 1st inner rim that merges into 1 point at the center.
Unwrap this to a a flat circle. if you can control whatever - assign a separate material to it. It will be the basis of the reflection/gloss transparency seen int he image above.

Now, this material can be developed to take the camera position and the object position into account.
I would do a Distance between the two, and use the output to drive the opacity.
The closer we get the more transparent you want, therefore multiply the distance by -1 to get it’s inverse, and pipe it into a Clamp node.
This node should control your overall distances - up-close for the min, and far away for the max. Max distance depends on the scale of the item in engine - you need to eyeball it.
Then you can move this clamp into a Lerp. A and B values will be your Min and Max opacity.

That should about cover it, unless you need to move Into the actual mesh. if that’s the case you need to separate the 2 meshes and just push the transparent ring back down along with the camera position, taking care to also modify the opacity via a scalar parameter in the material. A simple dynamic material instance will help with that on the object itself.

No need to do anything fancy with multiple UV maps if you can add geometry and materials at will.

(it’s probably something like a knee endoscopy but it also looks like an iris oddly enough?)