Is there a way to create a performance-friendly version of this material in U4?...

I apologize if this is a butt easy question; I’m kinda new to Unreal 4: but i was wondering how i can achieve this same effect in Unreal 4? This was rendered in cinema 4D which doesn’t translate well over to game engines, but how would you achieve a similar material in Unreal 4? A sort of “hail - stone” material i guess is the best way I can describe it. It is also important to note that this can’t be just baked on as I need the lighting on these objects to be dynamic:
T9DN74m.gif

Thanks for any help with this! :slight_smile:

Just a regular material set to the Subsurface shading model should do it. You can just use a very subtle bluish cloud texture as the base color, then set subsurface color to be blue/grey and then make “opacity” a scalar parameter and tweak it while looking at the shadows since that will define how thick the subsurface occlusion is. Note that it is nonlinear so very small values change quickly.

Can you fake it with vertex color somehow ? (for mobile)

well he said dynamic. you could bake it into the vertex colors (with a 3d modelling program like max) but then it would not react to changing the sphere or light positions.

Ah, true. However, isn’t there a way to paint vertex colors real-time, using another actor as “paintbrush” ? (or transfer vertex color from a sphere around that mesh; sphere would have gradient fill and would rotate with primary light source or something like that)

not currently. you can fill the vertices with a solid color or apply a linear gradient along the local bounds but so far that is it. And to get correct depth based fallof you would end up having to reapply that ‘brush’ at regular intervals spaced towards the light and you would basically end up writing a ray marcher to do it.

you could ray march it all but it will take a way to specify the coordinates of every sphere that it could possibly be shadowed by which is not going to be easy. That is why for the prototar demo meta balls i restricted it to only seeing neighbors in groups of 4, otherwise your code function needs to list every single sphere distance field out in lines of text and it gets pretty cumbersome.

Yes i had a feeling subsurface shading would get the effect i needed, however i will need possibly thousands of these balls on screen at a time with dynamic lighting and im just not to sure how performance heavy subsurface-shading can be or even if older graphics cards can support it considering it is a relatively new feature in gaming.

yes… i was thinking this very same thing, if there werent an already built in way to do this i was just going to code a script to handle dynamically changing the vertex color while possibly applying ambient occlusion aswell.

Yes not by default but it may be possible to do change the vertex coloring positions of each sphere programmatically as the light source moves. I’d rather not do that though because I may have to start messing around with real-time ambient occlusion and soft shadows to get the right effect in that case. :stuck_out_tongue:

Wow, yea a lot more to consider if I were to script a way to “fake the lighting through the vertex normals”. Also, what an honor to get an answer from the sr. Technical Artist from Epic Games! Thanks so much for taking the time guys! :slight_smile: