I'll just make a bit of an explanation about that one, later. I'll show the material setup as well.
Awesome! looking forward to it! combining this with quad chamfered objects and vertex baked ao for additional dirt plus mesh decals should result in some nice fidelity for non-uniquely textured objects.
Your current normal based solution looks great btw. Probably only works within a normalmap setup of within a single material right? so it's probably not possible this way to use a mesh decal normal map as a basis to create dirt on the base mesh material. A colleague of mine suggested it might be possible to exploit the deferred rendering pipeline to get the combined resulting normal from base mesh material + mesh decal material and add the dirt after... probably as a post effect. Looking into that once we got some spare time.
In the meanwhile, here is something else. An another preview from the video series that I'm making to explain how to use the noise material node. But in this preview, I was kinda making my own noise as an experiment... https://www.youtube.com/watch?v=m-zjrzQxkMY
People were asking about that edge wear material so here is something. Originally I wanted to make a video that covers the whole thing, but unfortunately I didn't have enough time to make that. Maybe later...
Until now here is the basics of it. A few things about it: - this works the best on hard surface shapes - the vertex normal one can do its job only if the input mesh has support loops or bevels with custom normals - normal map one does its job the best if you use it with a normalmap that contains only details, and not shading information.
How does it work: It will check the dot product between the input normals and a value, and return a gradient based on the angle changes. Then this is fed into an if with a threshold so we get a black and white mask.
- to break up the straight lines, you can manipulate the coordinates of the input, or mask it afterwards. - you can also make it controlled by vertex colors, like i did in one of the videos earlier.
Thats it for now, as I said, video may still come later.
Sphere - signed 2D Sphere - signed 3D Box - signed 2D Box - signed 3D Box - unsigned 2D Box - unsigned 3D Rounded box - signed 2D Rounded box - signed 3D Rounded box - unsigned 2D Rounded box - unsigned 3D Torus - signed 2D Torus - signed 3D
An experiment with world position offset and parameter randomization without a need of the random per instance node. I used noise, sine, and actor position to make them appearing randomly on all of the cylinders.
The actor position can be added to the noise/sine coordinated so the offset/position of it will appear random as you randomly place it with a mesh in the level.
Back to blueprints... I'm learning AI and in the meanwhile, i thought it would be cool to have a lot of gore and blood when the enemy dies so i made a couple of actors to help this. The enemy has some sockets on the skeleton, where it can spawn the bleeding actor. Then the bleeding actor spawns the blood drops which are projectiles, and therefore they have relatively nice physics and also i can track their transform, and properly spawn decals upon impact.
Bleeding is a bit crazy and the long arm guys are spawning the spiders gibs but getting there...
I had a bit of a trouble with getting the navmesh to properly work with the static and moving blueprint collisions, and runtime regeneration, but it worked at the end.
- first person character and camera with controls and mouse - inventory, weapon, and pickup system - AIs that tries to approach the player, they take damage, die, spawn blood, ufter some negative life threshold, they spawn more blood and gibs that simulates physics. - Most of the blood effects are done through projectiles, collision detection, and decals - Enemy spawners that can be triggered and connected to various environmental assets
- to break up the straight lines, you can manipulate the coordinates of the input, or mask it afterwards.
Hey Obscura, thanks for posting the function to try this out; it's really cool. Could you give any hints on how to go about breaking up /distorting the mask? Even just search terms would be helpful. I've played around with blending the mask against textures and masking the overall effect via vertex colours, but what it really needs is some random inflation/distortion — which sounds like what you mention, manipulating the coords of the input.
Yes. The fancy term would be domain warping. But it just means you are warping the coordinates.
Place some noise texture, or anything that you want to use to break up the edge lines. multiply if by some value - this will be the intensity of the coordinate distortion. Then take the red and green channel of it, and add or subtract from the coordinates of the normal map.
The main menu is animated through a level sequence, and the ui is drawn on top of that. I still need to make the player ui hiding here...
This is how that press machine setup looks like in the editor, when its trigger is selected. You can add the ones into an array, that you want to activate, when the player starts overlapping this trigger. It also draws lines to the ones that it connected to, so its easy to see what does what.
And this is the press thing itself. There are some parameters to set the speed, open time, and a delay, to randomize. Start and end position is also exposed, so it can be adjusted to different room heights.
This thing arrived to a point when its good enough to show I think. Here is a little look into what I'm working on currently as my personal project. An alternative material editor with a possiblity of infinite amounts of layers if you have enough powa...
- Paint, erase, fill, clear - Physically based material properties - Works just like any layer based painter - dynamic layers and layer properties - custom brushes and brush settings - Full bake
This is fully independent of vertex density. Its like regular mask painting - This is intended to bring something similar to Substance Painter right into Unreal. You can even place this right into your very own level, so you have the exact same lighting.
Wow, now that is really interesting... pretty unprecedented in my eyes! I'm not that experienced with game engines, but i ask you anyway. I'm really curious to know what properties did you used to track the strokes in the mesh surface. Translate them into the flat texture?
Currently base color, roughness, and metallic is handled properly, and a plain normal layer, or normal textur blended with the underlaying layers, plus a baked one. I already have something for brush stroke normals but not good enough yet, so I'm looking into a better possibility. Eventually you should be able to set this for stroke edges or used textures - which are already supported, per channel.
Anyways, this thing is very wip, I'm only working on it for a month. I think I got nice progress so be patient, this was just like an announcement I'm planning and have plenty of other features to come. Height blend just to mention one. And stencils...
Anyone knows a way for getting information about pen pressure inside blueprints? Based on my google-ing and what I tried, it doesn't seem to be possible.
Wow!!! This is awesome!! As someone who enjoys texturing to the max, Thumbs up. Great work, Obscura. Have you decided what the highest texture resolution that can be painted using this plugin in ue4?
I'm mainly testing on 2k document size, and then i can have 100 layers with acceptable performance, fully interactive painting. ~ 30 fps. But this will still depend on some factors. I will add features like the curvature to mask, with some dynamic parameters, and some other similar features to make things easier, like in Substance, for example. Adding these to every layers will have a visible effect on the performance, as its expected.
I see. Scene management is always important when doing 3d stuff even in good old Photoshop. Too many layers is gonna drop performance especially when painting. Well, it looks great.
Not this time, because of demonstration purpise. Thats why I had 4 / 6 of the function placed. One would be one iteration of the loop if it would be in a custom node.
Man what a thread! So many great things. Loved the fractals etc. That painting program inside unreal WTF!
Also for the pen pressure thing it should be fairly easy to write but you have to write C or C sharp or wutever UE is using these days. (im not a coder....yet)
I saw how you brought different brush alphas into UE and was thinking would you be able to change the mesh paint brush alpha? Is this hard to do?
Thanks. I don't think I could do that with the built in one. But similarly to the texture painter, a vertex painter could be made that has this feature...
Replies
Your current normal based solution looks great btw. Probably only works within a normalmap setup of within a single material right? so it's probably not possible this way to use a mesh decal normal map as a basis to create dirt on the base mesh material. A colleague of mine suggested it might be possible to exploit the deferred rendering pipeline to get the combined resulting normal from base mesh material + mesh decal material and add the dirt after... probably as a post effect. Looking into that once we got some spare time.
In the meanwhile, here is something else. An another preview from the video series that I'm making to explain how to use the noise material node. But in this preview, I was kinda making my own noise as an experiment...
https://www.youtube.com/watch?v=m-zjrzQxkMY
https://www.youtube.com/watch?v=CUINASnecCM
I also started to Blueprinting stuff for my game im working on, so its cool to see your progress here!
Until now here is the basics of it. A few things about it:
- this works the best on hard surface shapes
- the vertex normal one can do its job only if the input mesh has support loops or bevels with custom normals
- normal map one does its job the best if you use it with a normalmap that contains only details, and not shading information.
How does it work:
It will check the dot product between the input normals and a value, and return a gradient based on the angle changes. Then this is fed into an if with a threshold so we get a black and white mask.
- to break up the straight lines, you can manipulate the coordinates of the input, or mask it afterwards.
- you can also make it controlled by vertex colors, like i did in one of the videos earlier.
Thats it for now, as I said, video may still come later.
It has some issues but its a kind of a cellular noise with one level...
https://www.youtube.com/watch?v=iIDQIUiNnMY
https://www.youtube.com/watch?v=YO5t9d4h3rE
Based on:
http://nuclear.mutantstargoat.com/articles/sdr_fract/
https://www.youtube.com/watch?v=HdR_sd-8ldQ
Here are the codes if anyone wants to play...
Mandelbrot set:
Setting the itaration to anything higher than a few hundreds doesn't make much sense though because it will only suffer from horrible aliasing.
Its probably a better idea to increase the iteration count as you zoom.
http://iquilezles.org/www/index.htm
I also made some distance field primitive functions, and the smooth min, for blending them, based on these articles from his site:
http://iquilezles.org/www/articles/distfunctions/distfunctions.htm
http://iquilezles.org/www/articles/smin/smin.htm
The Unreal Engine material functions:
https://www.dropbox.com/sh/xaaeisi0iggk8yl/AAAObGU1bQykvACvNXmsSgzaa?dl=0
The pack contains:
Sphere - signed 2D
Sphere - signed 3D
Box - signed 2D
Box - signed 3D
Box - unsigned 2D
Box - unsigned 3D
Rounded box - signed 2D
Rounded box - signed 3D
Rounded box - unsigned 2D
Rounded box - unsigned 3D
Torus - signed 2D
Torus - signed 3D
And
Polynomial smooth min
No ray marcher included....
http://iquilezles.org/www/material/nvscene2008/rwwtt.pdf
https://www.youtube.com/watch?v=TS2lj4Vkxg8
An experiment with world position offset and parameter randomization without a need of the random per instance node.
I used noise, sine, and actor position to make them appearing randomly on all of the cylinders.
The actor position can be added to the noise/sine coordinated so the offset/position of it will appear random as you randomly place it with a mesh in the level.
https://www.youtube.com/watch?v=xIH6sSZ3DOQ
Bleeding is a bit crazy and the long arm guys are spawning the spiders gibs but getting there...
I had a bit of a trouble with getting the navmesh to properly work with the static and moving blueprint collisions, and runtime regeneration, but it worked at the end.
https://www.youtube.com/watch?v=5QZKcJ7d1FE
Current features:
- first person character and camera with controls and mouse
- inventory, weapon, and pickup system
- AIs that tries to approach the player, they take damage, die, spawn blood, ufter some negative life threshold, they spawn more blood and gibs that simulates physics.
- Most of the blood effects are done through projectiles, collision detection, and decals
- Enemy spawners that can be triggered and connected to various environmental assets
Place some noise texture, or anything that you want to use to break up the edge lines. multiply if by some value - this will be the intensity of the coordinate distortion. Then take the red and green channel of it, and add or subtract from the coordinates of the normal map.
https://www.youtube.com/watch?v=Rky3pzDBYXI
Back to the shooter game prototype, I made a lot of other things, mostly editor/gameplay features, and a main menu.
https://www.youtube.com/watch?v=_tTpXPUN-YM
The main menu is animated through a level sequence, and the ui is drawn on top of that.
I still need to make the player ui hiding here...
This is how that press machine setup looks like in the editor, when its trigger is selected. You can add the ones into an array, that you want to activate, when the player starts overlapping this trigger. It also draws lines to the ones that it connected to, so its easy to see what does what.
And this is the press thing itself. There are some parameters to set the speed, open time, and a delay, to randomize. Start and end position is also exposed, so it can be adjusted to different room heights.
The closing gate is similar...
Trigger:
Gate:
And the ai guys coming from the ground:
- Paint, erase, fill, clear
- Physically based material properties
- Works just like any layer based painter
- dynamic layers and layer properties
- custom brushes and brush settings
- Full bake
Some features:
https://www.youtube.com/watch?v=_OIZdkTUbgY
layers:
Layer opacity, affection of different channels:
ID map support:
Affect all channels:
Jitter....Theres more though:
More to come soonish...
I replaced this
with this
and it worked.
Test normal map is from google:
An another one, after a second pass of tweaking:
And a preview (lower quality - bake does super sampling) with the statue from the Sun Temple demo from Epic:
Great work, Obscura. Have you decided what the highest texture resolution that can be painted using this plugin in ue4?
https://www.youtube.com/watch?v=UXtSDqsTblo
Change this number to 2 to get a Sierpinski pyramid:
With 6 iterations:
https://www.youtube.com/watch?v=uVOKEyzglxw&feature=youtu.be
Orbit function:
Point:
Material:
Then its drawn to a render target:
https://www.youtube.com/watch?v=8ObummcW-EU&feature=youtu.be
Also for the pen pressure thing it should be fairly easy to write but you have to write C or C sharp or wutever UE is using these days. (im not a coder....yet)
I saw how you brought different brush alphas into UE and was thinking would you be able to change the mesh paint brush alpha? Is this hard to do?
Keep on with the top level work