Is it possible to create a 3D Texture/Material in UE4, similar to the 3D textures in Maya, that would allow me to apply a texture to multiple meshes within a volume? My goal is to have a bunch of textured objects in a level and have a 3D texture applying between 3-6 different colors to all of the objects, in a similar fashion to what you see from photoshop’s render clouds button, but with lots of colors, not just 2. The colors would not cover up the textures that are already there, but would add colors to them.
I really wanted to use a 3D texture and not just color the textures outside of UE4 so that I can move the objects around in the editor and always have them matching up colorwise instead of having sharp edges where different colors start and stop.
Also, Ideally, I would want to be able to define what objects would be affected by the 3D texture, and to define how many colors the 3D texture used and what those colors are.
Have you looked through this page? It has some world space projection functions that you might be able to use.
I am currently using the WorldCoordinate3Way function to add macro variations to static meshes. It’s not a full 3D texture but might still be what you are a looking for.
When I say 3D texture, I mean a texture that exists in a 3D box that is, I think, math generated and it gives anything inside the box the texture. Here is an example of Maya’s 3D textures: http://www.youtube.com/watch?v=kfsz9wS3iHI
WorldAlignedTexture node in the material editor is the closest thing to that i think. It doesnt generate a texture though, it aligns the texture you give in world space and blends the seams.
The material editor actually has a perlin noise function. It operates on 3d vectors so you can make a fully procedural material. It is not the fastest technique for realtime though so we have not focused on it yet; there are no nicely packaged material types made this way yet. A few years ago I used the noise function to make a procedural wood grain that turned out fairly decent. If you want to explore it on your own I could help.
I do much more these days with what I’d call ‘semi-procedural’ materials. That’s where you use things like worldposition or UVs to mathematically generate brick patterns or something like that, and then mix it with tiling texture parameters with lots of material parameter controls.
Several of the brick and concrete and wood plank materials that are included with the starter content set were generated using these semi procedural techniques. The result was baked down to flat textures in the editor using the highresscreenshot command with the option set to include the visualization buffers which gives the normals and roughness etc. Hopefully within a few months we will be able to make these semi procedural generation tools public, and maybe toss in a few true-3d perlin noise based procedural material examples.
Even though I don’t understand 3/4 of what you just said, I think thats exactly the type of thing that I want to use… probably. What I want is to have “clouds” of color affect multiple objects, without the color seeming to repeat itself, and for objects that are near each other to be able to share the same “cloud” and have them look connected, even though I would still be able to re-position them. This is an example of what I mean. The back brickwork in the image could be the same brick wall duplicated for simplicity’s sake, but the color “clouds” are not repeated, but is singular, if that makes any sense. The goal would to be able to build one wall piece, duplicate it a bunch of times, but have the coloration on the wall be unique the entire length of the wall. I dont really care if it is truly procedural or not, so long as I get that kind of functionality.
You can possibly try multiplying the diffuse through mask (with some noise) and keep the UV to be either worldspace or screenspace.
I guess that you can split the “noise” into few separate instances driven by parameters, so you could shift each “tint cloud” around within an instanced material.
That’s the implementation i can think of from the top of my head, without looking at the editor.
//
Besides, from that scene i believe the color comes from stained glass light shafts. But yeah, if colored walls are what you need then you should perhaps look into what i said above.
I’ve toyed with the perlin noise in there. It’s cool, but you’ll have to do something in your material to filter based on distance (and perhaps angle). Whenever I used it, it chattered like crazy when the octaves got smaller in the distance.