The wonders of technical art (Unreal Engine)

2456

Replies

  • akaChris
    Offline / Send Message
    akaChris polycounter lvl 5
    Obscura said:
    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.
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    I don't think thats possible, but good luck :D 

    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...

  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    And.... The cutplane of some 3d hollow spheres on the surface of a mesh - manual distance fields.

  • Gazu
    Offline / Send Message
    Gazu polycounter lvl 7
    Hey!
    I also started to Blueprinting stuff for my game im working on, so its cool to see your progress here!
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    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.
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    Loops are good...





    It has some issues but its a kind of a cellular noise with one level...
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    This thing displays you a slice of a 2d input (heightmap for example) as a curve:

  • Obscura
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    And the Julia set based on the same article:




  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    Few more...





  • radiancef0rge
    Offline / Send Message
    radiancef0rge Polycount Sponsor
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    Yeah they are cool and simple.

    Here are the codes if anyone wants to play...

    Mandelbrot set:


    float2 z = 0;
    float2 c = 0;

    c = float2 ((coord.x -0.5) * scale - center.x,(coord.y-0.5) * scale - center.y);

    z = c;

    for (int i = 0; i < iter; i++)
    {
      
            float x = (z.x * z.x - z.y * z.y) + c.x;
            float y = (z.y * z.x + z.x * z.y) + c.y;

       if((x * x + y * y) >4) break;
            z.x = x;
            z.y = y;


    }


    return Texture2DSample(tex,texSampler,(i == iter ? 0 : float(i)) / bias);

  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    Julia set:



    float2 z = 0;


     z.x =  (coord.x - 0.5)*scale+pos.x;
        z.y =  (coord.y - 0.5)*scale+pos.y;

    for (int i = 0; i < iter; i++)
    {
     float x = (z.x * z.x - z.y * z.y) + C.x;
     float y = (z.y * z.x + z.x * z.y) + C.y;

            if((x * x + y * y) > 4.0) break;
            z.x = x;
            z.y = y;

        }


    return  Texture2DSample(tex,texSampler,(i == iter ? 0.0 : float(i)) / bias);




    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.
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    This site by Inigo Quilez is a really nice source for stuff that I like:
    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....





  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    More info about rendering with distance fields and ray marching:

    http://iquilezles.org/www/material/nvscene2008/rwwtt.pdf



  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    Just throwing this in, here too...



    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.
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    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.


  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    Now they can come from the underground  :D

    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.




    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
  • Bek
    Offline / Send Message
    Bek greentooth
    Obscura said:

    - 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.
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    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.


  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    Fog of war in game, and on the minimap, using render targets and blueprints.


  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    ...
    Back to the shooter game prototype, I made a lot of other things, mostly editor/gameplay features, and a main menu.



    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:





  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    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

    Some features:


  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    Sorry for the buggy format here on pc :( I also cannot make more than 2 to show in a single post.
  • Eric Chadwick
    Not Polycount's fault. ;)

    I replaced this
    http://i.imgur.com/kSEns8W.gifv
    with this
    http://i.imgur.com/kSEns8W.gifv
    and it worked.
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    Thank you very much for the help!
  • Macebo
    Online / Send Message
    Macebo quad damage
    Obscura, this layered material paint -- like in the case of vertex paint -- relies on the vert density as well, or is it a different method?
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    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.
  • Macebo
    Online / Send Message
    Macebo quad damage
    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?
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    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.
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    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...

  • Macebo
    Online / Send Message
    Macebo quad damage
    Nice man, thanks for the explanation. You definitely got something quite unique in your hands. Good luck on this project!
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    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.
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    Experimenting with creating curvature from normals, for the painter. Will be added as a modifier / quick mask:

    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:

  • melviso
    Offline / Send Message
    melviso polycounter lvl 8
    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?
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    @melviso  - Heavily depends on your hardware, 4k works but pretty heavy (I'm testing on a gtx 970). It also depends on how many layers you have.
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    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.
  • melviso
    Offline / Send Message
    melviso polycounter lvl 8
    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.
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    Added color picker and palette to the painter...


  • ArasTM
    Offline / Send Message
    ArasTM polycounter lvl 3
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    Menger sponge:



    Change this number to 2 to get a Sierpinski pyramid:


    With 6 iterations:

  • igi
    Offline / Send Message
    igi polycounter lvl 11
    I  really like how you demonstrate these cool tricks in UE4. Did you use any custom code for the last one?
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    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.
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    Orbiting spheres...


    Orbit function:


    Point:


    Material:


    Then its drawn to a render target:


  • radiancef0rge
    Offline / Send Message
    radiancef0rge Polycount Sponsor
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    Tried to make an ortho cube on 2d coordinates with pitch and yaw. It has issues, but it was fun...


  • Nuna
    Offline / Send Message
    Nuna 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?

    Keep on with the top level work :D
  • Obscura
    Offline / Send Message
    Obscura veteran polycounter
    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...
2456
Sign In or Register to comment.