Home Technical Talk

Decal technique from Star Citizen

12346

Replies

  • Millenia
    Offline / Send Message
    Millenia polycount sponsor
    Obscura said:
    A technique that is accessible and usable in a proper way, for almost noone still lol. In Unreal , they made it possible to slap the decal material on meshes, but it still can't "overlay" and you need to hack with the opacity and normal intensity. color blending with an another mask also not possible so if I would do something like this, I'd probably still stay with one of the older approaches, probably the uv projection one. Because I would have so much better control over how things gets blended.

    Lets hope that developers will notice the need and we will get better support in the future.
    Yeah the dbuffer decals have promise but they need more work before they're ready to be actually used in production. I'm currently using a solution that involves having half of my texture sheet as a tiling section and the other half containing details for that material, and using vertex colour to mask and tint areas of that material for cheap variation. Still allows me to place normal map cards on top of the surface but it isn't quite as flexible a solution.
  • cupsster
    Offline / Send Message
    cupsster polycounter lvl 11
    Great information! I would have question how to approach welds in perpendicular areas using decals. I'm struggling with proper normals for them. I'm using UE4 DBuffer decal material with alpha masked normal only but my main issue with his technique is how to handle decal creation when areas I try to cover are welds on steel beams, pipe to pipe welds etc. Noticed that 3Ds Max Explicit Normals post in this thread but I need to experiment more with it. 
    In general how should I proceed with creation of this Dbuffer Decals meshes? Should I just use extra edge loops to define decal geometry, detach that and after obtaining L shape strip  average that edge normal where surfaces met? Texture and shader for it is all right, what I'm strugling with is good workflow to create this decal areas. 
    I'm not even sure if I should use chamferred planes (flat decal strip) or L shaped strips to produce convincing shading for welds.
    I'll try to post some images soon as I have pretty large numbers of assets that need this. For main shader I use world aligned tiling material. That one I might rework to object aligned, decide later, so far main material is working good but decal mesh normals drive me crazy, tested various normal thieves but none of them produced good result so far. 
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    Hi. You could use the beveled/angled one in combination with face weighted normals. In my opinion, that should work just fine. In the mask texture, you would have the center area as fully blended (white alpha)  and it would quickly loose opacity after the outline of the welding.
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    Yep, here is a quick one.

    The L shaped "sopport loop" kind should work too.


    Opacity map:

  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
  • Crimzan
    Offline / Send Message
    Crimzan polycounter lvl 9
    Thanks everybody for the info!
    The technique for the weldings really seems to be useful, I'd love to try that out soon too.

    So, what I understand from your answers, blending only normals of the decals that are slightly levitating above the mesh is not possible in the CryEngine with basic materials (I'm no coder)?

    Also, in the new CryEngine 5, how are alpha channels used for decals? My diffuse does have an alpha channel, but it isn't transparent at all - if I use alpha test, it works, but introduces hard edges. If it's not possible to actually blend normals only, I'd be happy if it was possible to actually go ahead and at least use a smooth alpha for it. But this might be something I can figure out on my own. Basically I'd just go ahead and use decals in general and have to live with the fact that the decals floating above my mesh simple don't blend with the underlying background.

    Excuse me if I ask some questions multiple times, but this decal-stuff is new to me. Have to Google things like deferred or something like this to even partially understand what's going on.
  • cupsster
    Offline / Send Message
    cupsster polycounter lvl 11

    Obscura said:
    Thank you for examples @Obscura ! What I'm having trouble is figuring out how to effectively produce this decal geometry as in my case welds are non repeating type for many assets I need to process. Above is just quick test with googled textures (need to make proper ones for best result). As you can see there are various "around" welds. I'm using 2 material ID's on that mesh, 0 being main and 1 is DBuffer translucent decal. 

    In above images you can see I have color blend via direction normal parameter (slightly colored top parts of mesh). Trouble with this setup is that as ou notice this kind of material does not want to work with decal technique. Looks like decal is rendered after main material and thus that weird coloring where meshes met. I could partially solve that by doing beveled edges where meshes met but my main aim with this technique is to have high fidelity up close, no need for unwrapping all that beam madness and for subsequent LODs just delete that decal part of mesh to avoid MANY subpixel triangles.
    As an solution to that blending issue I might need to make blending not only normal in decal but same color as in main material (might make material function for it) and control it through global shader parameter... That might end up working well as it would set same color and direction across all assets/instances using this data.
    I'll post here once I'll make it work (if it will work) :)
    FIY I'm still using UE4 4.14 need to recompile engine in next days... 
  • duke
    Offline / Send Message
    duke polycounter lvl 13
    The only pitfall of this technique that I can think of is automatic LOD generation not accounting for intersecting decals.
  • Crimzan
    Offline / Send Message
    Crimzan polycounter lvl 9
    You can always detach the decals first after auto-selecting them by material-ID and then create automatic LODs from the main mesh.

    I suppose that the conform brush with a specific offset in 3Ds Max will simplify the process of actually aligning the decals to the mesh. 
  • cupsster
    Offline / Send Message
    cupsster polycounter lvl 11
    Crimzan said:
    You can always detach the decals first after auto-selecting them by material-ID and then create automatic LODs from the main mesh.

    I suppose that the conform brush with a specific offset in 3Ds Max will simplify the process of actually aligning the decals to the mesh. 
    I would need to look into that, is that part of PolyTools ribon?
  • Crimzan
    Offline / Send Message
    Crimzan polycounter lvl 9
    cupsster said:
    I would need to look into that, is that part of PolyTools ribon?
    It's in the Freeform section of the graphite modeling tools. Here's a little tutorial where he uses these tools to conform a ring onto a sphere (skip to about 04:45):

    https://youtu.be/s1bTyPHbI3k?t=4m45s
  • cupsster
    Offline / Send Message
    cupsster polycounter lvl 11
    Damn I barely visit that ribbon, need to learn it all now! That edge drag with snapping might be exactly what I need, to unwrap it is not problem as max have nice unroll by edge ring feature which is quick and effective, I was only scared of how could I quickly make that geometry in places where meshes intersect/touch without going crazy duplicating them, adding loops and deleting what I do not need. This puts things to new perspective, TY for providing such a nice example! I'm happy little camper now. :)
  • Crimzan
    Offline / Send Message
    Crimzan polycounter lvl 9
    The Graphite Modeling Tools have many interesting and useful features. It's definitely a great idea to check out all features that they provide!
    I'm glad it helped! :3
  • Toku
    Offline / Send Message
    Toku polycounter lvl 6
    Hey guys, I have read through the thread and it's good to see that you have made progress with a decal technique which can be used in UE4. From what I've gathered you can now use the DBuffer material on a static mesh which will write only normal/roughness information into the render pass and gives realistic results.

    The problem I have encountered is when trying to make a decal which is comprised of different materials. For example a plane which has a panel mapped to it where one side of the panel takes the material properties of the underlying surface (Modify Normal,AO) and the other side is made of another material (Modify Normal,AO,Albedo,Roughness,Metalic,Emissive etc).

    Using the DBuffer Translucent Color,Normal,Roughness material means that you can control those channels on the decal but if you want to mask out some of the channels in a certain area (so it passes through on one side of the panel and overwrites on the other) you would need an opacity control before it goes into the shader inputs! There it only one Opacity input which masks all the channels so that is not possible.

    I tried using Obscuras' method of using a reprojection of the surface material, which would effectively allow you to have "transparent" texture which you can then lerp new information ontop of with a mask, However the decal material domain does not support some of the shader nodes used. 

    N+R Overlay

    A+N+R Overlay (need to mask base color out)


    So I am pretty sure that's where the limitation is in UE4 for now, I am guessing Star Citizen has it's own shader which lets them mask out areas of each texture before putting it into the render buffer,, My main concern is using an AO channel on a decal as it either needs its own AO shader input or effect the surface below as being semi-transparent. 

    I think one solution is to make a decal which is blending just the normal channel for areas which need the form and not the material definition adjusting and then make a second decal which has an opacity mask around the edges of the first one which has all the material channels needed



    Here it's basically 2 planes cloned slightly offset on Z so the one with the metal panel is slightly above. The metal plane is a standard material with an opacity mask around the area where the material changes, Then the one below is a DBuffer material which is effecting only the normal channel to make the indent in the underlying surface. It is feasible to use a third plane which would have a semi-transparent material to overlay AO between the panels or some form of detailing which you want consistent across the surfaces (like dirt). But it is really expensive, multiple shaders, texture calles, samples and geo to achieve the end result when you could probably write a custom shader which could give the same end result, either way that is the best approach I've found so far..
  • DeathstrokeFTW
    Offline / Send Message
    DeathstrokeFTW polycounter lvl 4
    Can anyone confirm that the decal method works well in UE4 4.15?
  • frmdbl
    Offline / Send Message
    frmdbl polycounter
    Can anyone confirm that the decal method works well in UE4 4.15?
    Seems to be the case.

    @Obscura

    I might be missing something that's been already discussed, but 
    Is there there any reason why the decals couldn not be stacked so that you have a normal for a whole panel or a screw and
    a masked diffuse layer on top of it for just the edgewear?

    I tried this workflow, I have 2 decal material on top of each other, the shader complexity doesn't seem to be high.



  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    frmdbl said:

    @Obscura

    I might be missing something that's been already discussed, but 
    Is there there any reason why the decals couldn not be stacked so that you have a normal for a whole panel or a screw and
    a masked diffuse layer on top of it for just the edgewear?

    I tried this workflow, I have 2 decal material on top of each other, the shader complexity doesn't seem to be high.




    I guess you could do this. I ended up doing something similar once.
  • dpadam450
    Offline / Send Message
    dpadam450 polycounter lvl 9
    One of the things star citizen did was just put any geometric detail on top of things and you could choose if it replaced the GBuffers color/spec or just the normal.
  • AXEL
    Offline / Send Message
    AXEL polycounter lvl 6
    Hey, just went thru this whole thing and I have a few questions 
    1. What's the difference between decals and simple masked material in this case (not in general) is it only a performance thing?
    2. There is no way of using decals with POM?
    3. @Obscura did you use POM or even decals?  and how does your final setup looks in UE?

    The thing is when its just normal you can see that it's not geo from sides and it looks weird 

    Thanks!!
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    AXEL said:
    Hey, just went thru this whole thing and I have a few questions 
    1. What's the difference between decals and simple masked material in this case (not in general) is it only a performance thing?
    2. There is no way of using decals with POM?
    3. @Obscura did you use POM or even decals?  and how does your final setup looks in UE?

    The thing is when its just normal you can see that it's not geo from sides and it looks weird 

    Thanks!!
    Parallax does not work when material domain is set to decal. However, using the uv projection method (not the world aligned bullshit), it should work fine.
    By "masked" do you mean alpha test?

    The difference is that , by using a decal, the base color, roughness, or other attribute can be "inherited". So it allows you to modify only the attribute, that you want. Like normal. Or normal and color, but leave the original roughness for example. You cannot do this, by using a "masked" material, as you said, because that would fully overwrite all the textures and shading, while decal would modify only the ones, that you tell it to.

  • AXEL
    Offline / Send Message
    AXEL polycounter lvl 6
    @Obscura As far as I understood uv projection only works in 3ds max not ue4 if I'm wrong could you point me to ue4 setup?
    And what is the point of normal,base,rough blend decal? Its the same as using masked material
    And thanks.
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    It isn't the same, because the material under the decal has more attributes than normal, color, and roughness. Imagine you overlap a masked decal, over an emissive lamp. It would hide the emissive. This applies for opacity, opacity mask, specular, and metallic to. A masked (alpha test) material would replace these with its own values, while a material with decal domain wouldnt.  

    That masked material doesn't make much sense to me as it doesn't have the functionality of a decal. It should be able to modify some, and leave some other attributes.

    The uv projection works everywhere, because its uvs.This is why you can preview it even in Max. But I wouldn't suggest to use that method, unless you really want the parallax. Otherwise, just use decal material domain with mesh decals or decal volumets.
  • Ubuska
    Offline / Send Message
    Ubuska polycounter lvl 8
    Hey guys, check this awesome new Blender addon for decals creation

    https://www.youtube.com/watch?v=45_mvLG-0x8
  • Menchen
    Offline / Send Message
    Menchen polycounter lvl 3
    Ubuska said:
    Hey guys, check this awesome new Blender addon for decals creation
    Doesn't work with game engines, only when rendering with cycles...
  • bac9-flcl
    Offline / Send Message
    bac9-flcl polycounter lvl 10
    Menchen said:
    Ubuska said:
    Hey guys, check this awesome new Blender addon for decals creation
    Doesn't work with game engines, only when rendering with cycles...
    If it's producing clean decal geometry, then it should work fine after export to UE4 or Unity (with some limitations in UE4 blending mentioned above in this thread and with some limitation for smoothness blending in Unity deferred). Been curious to try it!
  • Mant1k0re
    Offline / Send Message
    Mant1k0re polycounter lvl 8
    I think improved functionality with UE4 is on the development roadmap at least.
  • Ubuska
    Offline / Send Message
    Ubuska polycounter lvl 8
    bac9-flcl said:
    Menchen said:
    Ubuska said:
    Hey guys, check this awesome new Blender addon for decals creation
    Doesn't work with game engines, only when rendering with cycles...
    If it's producing clean decal geometry, then it should work fine after export to UE4 or Unity (with some limitations in UE4 blending mentioned above in this thread and with some limitation for smoothness blending in Unity deferred). Been curious to try it!
    Yep, as long as this addon produce decal geometry, it works.
    I will try out this setup for Blender: HardOps + Vertex Normal Calculator + Decal Machine. Should give decent results.
  • CybranM
    Offline / Send Message
    CybranM interpolator
    Sorry if this has been asked before but I'm wondering if its worth using face weighted vertex normals even when using a non-tiling texture?

    I'm making a relatively high-detailed vehicle model and I want to be able to add scratches to corners and edges to the interior so I'm not sure if FWN is the right approach. I know about having the scratches in the detail atlas and do them the same way as the rest of the details but it seems very limiting since scratches are a lot more varied than industrial details like bolts and screws.

    Is that basically the worst of both worlds or is it an acceptable way to do it?
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    CybranM  For vehicles, if you can afford the amount of geometry, yes, I would say its still worth. In some racing or simulator games, they do this.

    That could be approached in some different ways still, some parts normals might be baked, some wouldnt, but even if you go with a fully baked normal, it helps to have corrected vertex normals because it eliminates the gradients on the big flat surfaces.

    Technically the most important thing that face weighted normals would do for you, is to have smooth edges, without a need to bake it from a highpoly, into a normal map. It also improves the silhouette. So if you would have a mesh that has some simpler shapes like plates, angular stuff without much small details, and a few more complex that should be baked, because otherwise it would end up being too many polygons, you could bake just the dense one, and go with face weighted normals on the simpler ones. 

    When you make a hard surface asset, in a lot of cases you would have a normal map just to have the smooth edges.  If the you can have the more geo, in these cases I would definitely go with fwvn. On a more complex thing, like a vehicle, I would use a mixed approach.

    When you have face weighted normals, there is no difference in what you need to do. You can still texture the mesh in any way you want. Just the edge information got moved from the normal map, to the mesh. But this still allows you to use a unique texture.
  • CybranM
    Offline / Send Message
    CybranM interpolator
    @Obscura
    Thanks for the detailed reply.

    I'll start with adding FWN to some of the more important details and keep the rest as "normal" lowpolys to not overdo it.
    When I get to the texturing I'll and make a tiling texture to see how it looks without the baked normal map and if that turns out alright I might just not use the baked normal. I'm unsure how it will look without the scratches I cant know without testing it.
     
    This is the first project I'm doing with FWN so I'm looking forward to learning more about the workflow and seeing the end result of course.
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    So I gave parallax a try (thx to a polycounter fellow)  in 4.15 , and it works fine with decals!

    But only when its a decal volume :neutral:

    On a mesh, it still doesn't work..
  • Menchen
    Offline / Send Message
    Menchen polycounter lvl 3
    Obscura said:
    So I gave parallax a try (thx to a polycounter fellow)  in 4.15 , and it works fine with decals!

    But only when its a decal volume :neutral:

    On a mesh, it still doesn't work..
    You know that Epic is fucking up unreal engine when unity has more features than unreal. That decal shader unity has works perfectly, while decals in ue4 are a pain in the ass full of bugs and errors...

    I don't know anything about shader coding, but I would pay anyting for a proper mesh decal shader that supported whole set of features such as parallax or setting up a metallic map...
  • bac9-flcl
    Offline / Send Message
    bac9-flcl polycounter lvl 10
    @Menchen
    To be fair, there is no race between them in that regard. Decal shader in Unity has almost nothing to do with Unity developers, the engine is just open enough to allow you to write a shader doing that. And if it wasn't, it's open enough to allow you to rewrite the deferred renderer shaders to enable that kind of functionality in custom shaders. You don't have to make something like a decal shader a specifically supported feature when writing to deferred buffers is just another mundane thing any custom shader can do.
  • MACHIN3
    Offline / Send Message
    MACHIN3 sublime tool
    Menchen said:

    You know that Epic is fucking up unreal engine when unity has more features than unreal. That decal shader unity has works perfectly, while decals in ue4 are a pain in the ass full of bugs and errors...

    I don't know anything about shader coding, but I would pay anyting for a proper mesh decal shader that supported whole set of features such as parallax or setting up a metallic map...
    I'm looking to get an answer to this: Is it technically impossible to write a custom shader for unreal that extends the dbuffer decals with support for metalness and ao? Is that why it hasn't been done yet by the community?


    Mant1k0re said:
    I think improved functionality with UE4 is on the development roadmap at least.
    Can you point me to a source for that statement? Thanks!
  • Mant1k0re
    Offline / Send Message
    Mant1k0re polycounter lvl 8
    I was talking about your tool :) It's been a while now but I seem to remember you mentioning you were working om making it work with UE4. Apologies if it wasn't the case.
  • MACHIN3
    Offline / Send Message
    MACHIN3 sublime tool
    Mant1k0re said:
    I was talking about your tool :) It's been a while now but I seem to remember you mentioning you were working om making it work with UE4. Apologies if it wasn't the case.
    I see, well, I was talking about the export towards UE4 from Blender using DM, which is done and works, but beyond that - unless there is a way to extent the dbuffer decals in UE4 similar to what bac9 has done with his unity shader - what you can do with the decals in ue4 is very limited(which I didn't realize at the time, I expected more from Unreal).

    I've brought decals into ue4 and it's very easy to get it working, but you are limited to non metals. Also, If you want to blend down the AO, you have to go through the color map, which overwrites the underlying color, which kind of defeats the purpose of deferred decals in the first place.  
  • DeathstrokeFTW
    Offline / Send Message
    DeathstrokeFTW polycounter lvl 4
    I made my decals and placed them on my mesh but I cant seem to get the decals to show on the mesh when I export it to UE4

    Inside UE4

  • Menchen
    Offline / Send Message
    Menchen polycounter lvl 3
    I've got myself a copy of DecalMachine plugin and reworked my starfarer scene: http://polycount.com/discussion/186760/some-practice-on-the-star-citizen-workflow#latest

    It looks awesome, BUT, it gets totally broken when working with baked lightning (which is the best looking kind of lightning).
    Here is one of the comparison pics between how it looks with dynamic lightning (and how they should look everytime) and how they look when lightning is baked:


    As you can see, it looks good, but when it's baked it has shadows from nowhere that shouldn't be there. I don't have much time left today, but tomorrow I will test if by taking the decal mesh separately and telling unreal to not produce/receive shadows on that mesh it works properly.

    As I said on my post, I'm probably going to ditch this workflow because of its many flaws.

    Here is a simple list of what it would be needed for it to be a really usable, working workflow (in ue4 at least):
    -AO support
    -POM support
    -Metallic parameter support
    -Error-less baked lightning support (see pics)

    If someone made a shader with this, and put it in the unreal asset store, I would gladly pay whatever amount for that :smile:

  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    Hi. Based on what I see on your screenshot, it looks like you have some incorrect lightmapping setup going on. You should be able to get good bakes, unless you have some weird lightmap uvs. If you don't mind showing your lightmap uv channel from inside unreal, we can surely sort this out. But unfortunately there are not much good solutions for your other issues. If you check out the previous pages, you can see that there are several another ways to make decals working even with pom but its very far from being ideal and comfortable to work with. 
  • Menchen
    Offline / Send Message
    Menchen polycounter lvl 3
    MACHIN3 said:
    Menchen said:

    You know that Epic is fucking up unreal engine when unity has more features than unreal. That decal shader unity has works perfectly, while decals in ue4 are a pain in the ass full of bugs and errors...

    I don't know anything about shader coding, but I would pay anyting for a proper mesh decal shader that supported whole set of features such as parallax or setting up a metallic map...
    I'm looking to get an answer to this: Is it technically impossible to write a custom shader for unreal that extends the dbuffer decals with support for metalness and ao? Is that why it hasn't been done yet by the community?
    No, its not impossible I guess. There is something about shader developement in the docummentation under "graphics programming" https://docs.unrealengine.com/latest/INT/Programming/Rendering/ShaderDevelopment/. Someone could probably build a custom shader that adds support to all these things decals need; as said, if someone ever does that, I would gladly pay for it.
    Obscura said:
    Hi. Based on what I see on your screenshot, it looks like you have some incorrect lightmapping setup going on. You should be able to get good bakes, unless you have some weird lightmap uvs. If you don't mind showing your lightmap uv channel from inside unreal, we can surely sort this out. But unfortunately there are not much good solutions for your other issues. If you check out the previous pages, you can see that there are several another ways to make decals working even with pom but its very far from being ideal and comfortable to work with. 
    I don't know much of unreal, so I don't know what can be causing that. Lightmaps are done with blender's tool. This is the one from the outer corridor object: 
    I probably should try getting decal meshes and base meshes by separate; maybe that would fix it.
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    Your lightmap uv looks good. It shouldn't be necessary but you can try disabling cast shadow on the decal meshes. Is it sure that it uses this uv set as lightmap uvs? You can check this out by typing "lightmap coordinate index" into the search in the static mesh editor.
  • Menchen
    Offline / Send Message
    Menchen polycounter lvl 3
    Obscura said:
    Your lightmap uv looks good. It shouldn't be necessary but you can try disabling cast shadow on the decal meshes. Is it sure that it uses this uv set as lightmap uvs? You can check this out by typing "lightmap coordinate index" into the search in the static mesh editor.
    Welp, I reworked lightmaps (following these tips provided by epic games themselves https://docs.unrealengine.com/latest/INT/Engine/Content/Types/StaticMeshes/LightmapUnwrapping/) and now it looks pretty good, decals work properly as well as baked lightning. If only we had support for ao+parallax  :'(



  • Shamatha
    Offline / Send Message
    Shamatha null
    Hi Guys , the deferred decal shader  DBuffer Blendmodes in ue4 only has 3 Dbuffers implemented in the c++ source color , rough and normal with a multi opacity spit out from the pixel shader with a float3.rgb  each channel masking individual channels into the Dbuffer  , this is using the EncodeDbuffer function in HLSL. you could try a RGB mask (channelpackedmask) plugged into opacity to test individual masking (r color g normal b roughness) I think someone mentioned something about individual channel masking above.  I'm not sure why Epic has not implemented metal into the D buffer for static lighting I was tempted to implement it myself but decided to look more into implementing a GBuffer decal blend mode as our game will be real time, It may still be possible to update static lighting through this way too.On the Gbuffer it updates all of them because they have 8 MRTs available to write too in the C++ source code compared to the 3 MRTs on the Dbuffer. In terms of POM on the mesh decals this is not too hard to get working and have achieved this at work working on a new ue4 decal mode it works fine just like on a normal surface shader just need to make sure u leave a bit more poly space so the parallax does not get cut off from certain viewing angles.Actually, on the Pom node you can go inside the node and cut the instruction count on it if you remove alot of the shit inside it that is for shadowing if you just want nice offset mapping and improved performance. it has alot of extra nodes not being used for shadowing on default.The ambient occulsion/cavity I believe works on shaders by multiplying the ao input automatically over the specular intensity by a certain percentage under the hood can't remember exactly but might be 50 percent opacity of the original Ao input map. so it's not really occluded that much very subtle. So you are not missing too much not having this input.



  • Hayden_Price
    Offline / Send Message
    Hayden_Price polycounter lvl 5
    Sorry for the bump guys, I've been following this thread for a little while and it's become my go-to source for anything POM Decal related in UE4, so I figured this was the best place to post.

    Not sure if anybody saw Josh Van Zuylen's Foundary 42 Art Test, he posted it up a few weeks ago and it's absolutely stunning.

    https://www.artstation.com/artwork/o1eqm

    He mentioned in the comments he used a fairly hacky setup to get the POM decals working, but they look great. This is what he said:

    "Hey, Its not using UE4's mesh decals but rather floating geo with UV's of the geo is the same the surface below. I had to do it this way because the mesh decal system was not working when I made this.

    My material was a complete hack, I had never made art using these specific features and thus was rushed and a little messy. perhaps in a future project, i will go into detail and not teach people bad habits."

    I'm still fairly new to all the technical bits, but from my understanding he's using the floating geometry method most people are also using in this thread and in Star Citizen. The bit I'm not too sure of is when he says "with UV's of the geo is the same the surface below.". Is this referring to the same method currently used where the UVs are adjusted to the decal map and placed on the geometry? Or is it referring to something a bit more complicated between his decal geometry and the UVs of the geometry they are placed on?

    I'd be interested in incorporating some POM decals into my workflow at some point, as it appears 4.17 still doesn't support Deferred POM Decals. He posted a screenshot of his shaders and material functions as well, unfortunately I'm still pretty new to all the shader/material editor in Unreal so I can't really make too much sense of it, nor make out what he did in his shaders. If anyone had any insight into what he might've done in his shader I would love to give it a go and learn more about it!

    Josh's Image:

    https://cdna.artstation.com/p/assets/images/images/006/232/580/large/josh-van-zuylen-shaderandmaterialfunctions.jpg?1496975572

    (From what I understand I think all the technical POM work is in the right hand side shader/material editor window, however I'm not too sure if it is linked or relies on any of the other shaders he has in the image)

  • Prime8
    Offline / Send Message
    Prime8 interpolator
    Sounds like he is using the UV projection method Obscura describes here.
    I cannot fully understand his UE4 setup seen on the screenshot, but he describes it as messy and "not teach people bad habits", therefore I would probably not use it myself.

    Looks like the Starfigher Inc. team has some success with the decal system, but I`m not sure how exactly they implement it. I don't see any major change in UE4 in that regard. http://polycount.com/discussion/comment/2566330#Comment_2566330


  • Menchen
    Offline / Send Message
    Menchen polycounter lvl 3
    I wrote a somewhat angry post in epic forums requesting more love for decals. If you want to join the rant, here it is: https://forums.unrealengine.com/unreal-engine/feedback-for-epic/1346001-decal-functionality
  • MACHIN3
    Offline / Send Message
    MACHIN3 sublime tool
    I feel you, I really wanted to like UE4, but as it stands I can't. I have a number of other issues with it like endless re-compiling of shaders, clunky wasteful UI, annoying tooltip popus, 30gb on the HD, no linux binaries, no linux launcher etc but I could deal with these IF I was motivated to work with it. Without decent decal support I'm not however.

    I haven't tried this yet, but in theory one should be able to use layered decals. The bottom one contributes just normals and the top one could mask out inner parts accordingly, add ao and color and roughness values for the those inner parts.
    Still no metalness of course.

    FWIW, Forest Telford seems to be doing well with decals in UE4: https://www.artstation.com/artwork/lXYAo
    Would love to see some more details on this.

  • Menchen
    Offline / Send Message
    Menchen polycounter lvl 3
    MACHIN3 said:
    I haven't tried this yet, but in theory one should be able to use layered decals. The bottom one contributes just normals and the top one could mask out inner parts accordingly, add ao and color and roughness values for the those inner parts.
    Still no metalness of course.

    FWIW, Forest Telford seems to be doing well with decals in UE4: https://www.artstation.com/artwork/lXYAo

    That would imply setting up two decal planes one on top of the other. A dirty trick, low perfomance and would cause certain issues.

    Also would like to know How that guy did it, but it might probably be the triplanar setup obscura mentioned at the beggining of the thread.
  • MACHIN3
    Offline / Send Message
    MACHIN3 sublime tool
    Menchen said:That would imply setting up two decal planes one on top of the other. A dirty trick, low perfomance and would cause certain issues.
    It's far from ideal, but  I'd rather take double the decal geo than any of the other suggested work-arounds. It's also trivial to automate. I think I'll give it a spin  on the weekend.
  • LiuYang
    Offline / Send Message
    LiuYang null
    Talked to a guy from Unreal and he mentioned something about customizing DeferDecal.usf file to enable metalness and maybe other cool stuff. I'm completely no idea about coding, if anyone could figure this out and share it would be awesome.
12346
Sign In or Register to comment.