#UnrealEngine#UE4#UE5#UnrealTips 1/7 Translucency see-through trick that might be useful... sort-of? This is usually done with custom stencil/depth (which has its benefits) but using a translucency material allows you to cheat a bit...⬇️
2/7 First we'll make a translucent material that has Depth Test disabled. Then we're going to sample the SceneDepth and recompute the world position of anything that was occluding our view...
3/7 ... then get the squared distance (cheaper) from that scene world position to the camera and compare it with the squared distance of our own position to the camera. If ours is higher, means we're behind something! We can then get a binary mask with an if statement.
4/7 Translucent materials can not only sample the SceneDepth but the SceneColor as well! So we can output that SceneColor into the emissive color if our mask is white (meaning when translucent pixel should be occluded)
5/7 Perfect illusion! At this point we're literally drawing the scene color on those translucent pixels when they are occluded, kinda like a magic stamp
6/7 Now we may add some different Base Color based on that binary occlusion mask...
7/7 ... and voilà! See-through illusion. Not sure how helpful that may be and the potential limitations of that technique (there's *always* limitations with translucency :D) but I thought I'd share anyway ;)
• • •
Missing some Tweet in this thread? You can try to
force a refresh
The challenge was to create subtle per-star lens flares that would always face the camera and remain straight, exactly like billboards. 🧵⬇️
To create star billboards, each star would need to rotate around their own pivot point to face the camera but pivots are all lost once exported to a single mesh... :(
... I could bake pivots in UVs but that'd actually be overkill here! I don't actually care about the precise XYZ position of each star... 🧐
Heya! I'm back😇Was good to take a break from work and socials a bit, but it's time to get back to work!
I guess I'll start 2023 showcasing how to efficiently create a sharp-looking night sky using a single 512x512 16bits texture and 3 cheap materials. Vista mesh has ~5k tris.
That wasn't planned but I needed a night sky and then I thought it'd make a good subject for a quick YT video while I work on more time-consuming incoming projects :D
Video shouldn't be too long to produce so I'm hoping for a release in two days?
#UnrealEngine#UETips#UE5
You can use a Procedural Mesh Component or Geometry Scripting to iteratively slice a given mesh, render the generated cap and composite the result into an atlas texture to generate a distance field/volume texture ⬇️
I was lazy and used the good old procedural mesh component because it's what I know and it's easy. Do a loop and slice a mesh a little bit further each time (based on the object's bounding box and amount of slices to generate). Capture the cap using a scene capture component...
...and composite the captured texture into the atlas render target using an additive material that renders that texture at a specific XY tile.
#UnrealEngine#UE4#UE5
Cute simplistic trees are available as a Tier 2 reward on my Patreon :) Have a look at the thread below to see how they were made ⬇️
0/22 First of all, some technical stats: Each tree is ~3K tris for LOD0. 2 draw calls per tree (one material for the leaves, one for the trunk). 2*1K textures (one normal map, one mask). ~160 pixels instructions for the foliage material.
1/22 It all begins with the leaf texture creation. There's many ways to do this, I tend to model a single leaf in 3D then group a bunch of them together like so.
#UnrealEngine#UE4#UE5
Dunno why I love to prototype random stuff in BP so much. It's 5am, what am I doing🤪I guess this could be used to generate random positions with random radius and no overlaps. Blueprint graphs below ⬇️
Tick event to see the simulation progressing. Clear & Generate Circles are two functions callable in-editor.