Try to recreate this effect with unreal material

Hello, i start a few months with vfx and un this moment i try to recreate the effects i like or i hace interest.
I Saw this shader from jettely on Twitter and try yo do It myself. Maybe i search with the wrongs words but i can’t find help so i post here.
First of all I can’t create the Up face with sdf on unreal material and at this point how can i match the center with the texture? I need custom node for recreate this??
Allí help are welcome thanks for read at this point :slight_smile:
Lemon

The shader are from jettely anda this is the original tweet https://twitter.com/ushadersbible/status/1565516936548696069?t=doMZLJ-f4pw4YPIuQp9bMg&s=08

3 Likes

To be honest, I never used UE, I only use unity and as far as I know, you will need to use custom functions at some point in this shader but maybe the UE node system has more to offer, so I will explain the method, in general, and if you want to get deep at it, let me know.

  • The shader uses a technique called signed distance field (SDF) rendering to create the appearance of a fruit. SDF rendering involves casting a ray from the camera through each pixel on the screen and calculating the distance between the ray and the surface of the object. The shader then uses this information to calculate the color of the pixel.

image_2023-02-24_190639408

  • The shader also contains two functions: “planeSDF” and “sphereCasting”. These functions are used to calculate the position of the object’s surface in 3D space.

  • The “planeSDF” function calculates the distance between a point in space and a plane defined by the user-set “_Edge” property.

  • The “sphereCasting” function casts a ray from the camera’s position into the scene and determines where it intersects with the object’s surface using the “planeSDF” function.

SDF_FruitlowRes

2 Likes

I would attempt something like this using this shader network I created a while back thanks to a tutorial by CGHow. Hope it helps.

I think the only way to make that kind of boolean operation on one shader without using tricks with multiple ones is with Raymarching and costume HLSL code. Here is a great introduction video on the topic:

There is also wonderful series for HLSL coding from Ben Cloward.

I hope it helps.

2 Likes

Thanks all of you.
i will look the videos and try to do it, if i can recreate y will reply with the material.
Thanks