For example…
This is just a made up example…but it is similar.
Say I have a shader that displays the solar system and planets rotating around the sun.
I can create a custom HLSL node and make a material that displays it.
But it is being displayed on a 2D surface.
How do I make it so it exists in the 3D world of the scene itself?
So that I can have my character walk around it?
Another example…
Say I have a shader…
It displays a 3D cube, the cube morphs back and forth between a 3D cube and a 3D sphere.
Now I can make a custom HLSL shader/material, with that shader.
It will display the object morphing back and forth between cube/sphere on the 2D surface (if it’s a plane).
I want the shader to display this effect in the 3D space of the scene…
Look into “procedural generation” of meshes, there’s an example in the Content Examples iirc. You can write C++ code or draw Blueprints that create model geometry you can place as static meshes within levels and walk around etc Procedural Mesh | Unreal Engine Documentation
Very basic example which just creates a single triangle Jan Wlosok | Procedural Mesh in UE4 #1 – Triangle
…then like, add more triangles to create your menger sponge or snowflake mandelbulb or whatever
What would be cool…
Is to make those writhing tentacles a 3D entity(not a mesh per say) in the scene…
This seems to a more difficult task than I thought it would be.
I think you might be able to do that using the Niagara particle system, it’s meant for making like lightning bolts or fog clouds or swarms of insects out of lots of flat semitransparent images laid on top of each other.
Here is what my imaginary process would look like…
Whether needing to use a particle system or not, is another issue…probably it would be needed.
Have two materials
One HLSL material, that simply creates the “3D entity” (contains pixel colors)
Uses shader in #1 but outputs not a color, but the z-buffer information.
Use the pixel color values in #1, and the z-buffer values in #2, to create a 3D entity in the scene.
Perhaps create tiny sprite particles from #3 to create the 3D entity.