Home Technical Talk

Decal technique from Star Citizen

12467

Replies

  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
  • Count Vader
    Offline / Send Message
    Count Vader polycounter lvl 12
    Ah, awesome! Thanks @Obscura Been waiting for this for a while :P

    Certainly seems way simpler. So in this case you are still using floaters, not cutting into the base mesh right? I remember some issues with lightmaps happening before, I assume that would persist with this method also?
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    They are still floaters, yes. Well, in my case there are no lightmap issues, because I use them on ships, and therefore those are moving objects, so they need dynamic lighting. The guy from Epic who showed me this technique used lightmaps in his breakdown, and he didn't got lightmap issues, so I guess there are ways for solving that. You'll need to try it out :)
  • Count Vader
    Offline / Send Message
    Count Vader polycounter lvl 12
    Oooh,, duhh i forgot this whole thing was about/inspired by vehicles to begin with!
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    In my theory they are useful on anything hard surface, that is big enough to make the unique texturing impossible, because of the resolution limitations. Or when you want more freedom - because they can be also used as a kit-bash kind of thing.
  • akaChris
    Offline / Send Message
    akaChris polycounter lvl 6
    Obscura said:
     The guy from Epic who showed me this technique used lightmaps in his breakdown, and he didn't got lightmap issues, so I guess there are ways for solving that. You'll need to try it out :)
    regarding lightmap issues, there was an answer posted about how to fix those here: https://answers.unrealengine.com/questions/273215/deferred-decal-material-not-usable-without-actor.html although as my reply to that suggestion states, I think that is not very feasible in production
  • Prime8
    Offline / Send Message
    Prime8 interpolator
    Lots of interesting information in here, awesome.
    I'm especially curious about that UE4 setup.
    I found out how to do the UV projection in Blender (data transfer modifier) described in step 4 but I'm not sure I understand the whole process 100% already.
    Basically you just need to project the decals to the 2nd UV map that are supposed to share the same maps with the base object (albedo in that case). For the rivets in the example it doesn't really matter if they are on the 2nd UV since you masked them in the end, or is that something I misunderstood?
    How would achieve things like edge wear or dirt, using decals as well? I'm assuming the texture on the base are tiling.  
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    They need to be there because you still need to change their "background" (everything outside of the white part of the mask) to the underlaying textures.
  • Prime8
    Offline / Send Message
    Prime8 interpolator
    makes sense, thanks for clarifying.
  • LaurentiuN
    Offline / Send Message
    LaurentiuN polycounter
    A tutorial step by step would be very nice if someone can do it, this is blowing my mind at this hour, great stuff guys.
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    For which software? There is a step by step breakdown for Max on the previous page. In Maya, its the transfer attributes thing.
  • LaurentiuN
    Offline / Send Message
    LaurentiuN polycounter
    For 3ds max would be very nice a video...short one
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    If there will be more requests then I will make one, but as I mentioned, there is a step by step text based tutorial on the previous page so basically you simply need to read it...
  • wirrexx
    Offline / Send Message
    wirrexx quad damage
    Obscura said:
    If there will be more requests then I will make one, but as I mentioned, there is a step by step text based tutorial on the previous page so basically you simply need to read it...
    REQUESTED:D HGaha
  • LaurentiuN
    Offline / Send Message
    LaurentiuN polycounter
    Obscura said:
    If there will be more requests then I will make one, but as I mentioned, there is a step by step text based tutorial on the previous page so basically you simply need to read it...
    I`ve watch this thread from the beginning but still dont understand the whole process.
  • blankslatejoe
    Offline / Send Message
    blankslatejoe polycounter lvl 19
    So I've spent a fair bit of time trying to replicate this using Modo and UE4.  I figured I should post my notes here, for anyone who is using that combo of tools:

    Building decals:
    -Using the edge and polycenter/face snap will make building the decals pretty easy. Snap all the decals perfectly to the underlying model, and then use Model>Deform>Push to push all the decals out by a super tiny amount, to help with zfighting. In a perfect world, this would be done by a special shader in UE4 that allows override of onlyspecific buffers, but that only exists in UE4 on special decal type materials, and not within the mesh usage space...so you have to build it into a single material, as Obscura described. It took me awhile to figure out WHY that UV projection trick was even necessary, as I assumed you could get around it in the material with clever masking, but in the end it finally sunk in. So, to do the second UV transfer in Modo you need to:
    To Transfer UVS:
    -Unwrap your decals, unwrap your base model, both to their respective textures.
    -Select the DECAL mesh polygons and also create a blank, empty UVset (Do this in the list menu. Call it something like DecalNewUVs) for it. Copy the existing DecalOLDUVs (or UVset1, most likely) into it (right click on the UVset in the list menus for copy/paste--you have to have the verts selected).
    -Have the base object in the background visible
    -Choose VertexMap>Transfer  Select UVMAP as the type and choose the BASE objects UVSet as the Source (it helps to name every UVset in your file to help you sort this, if youve got a complex file). Sample: distance.
    You SHOULD see the decals all transfer on one of your UVsets to positions that match the UVs of the base object, just like you need. This process is arcane as hell in Modo though--sometimes You have to select polys, sometimes the entire mesh..sometimes the newDecalUVset, sometimes the OldDecalUVset..I haven't quite figured out the rain dance logic here...but enough fiddling and you can get it to work.
    -Combine objects into one
    -Heres the kicker: take the UVs from the BASE object, but not the decals, and copy them into the DecalNewUVs set too, jam them in the corner somewhere. It's weird that you have to do this, but you can't have a UVset without data for all verts or sadness happens in UE
    -ANother kicker: Uvset order is black magic in modo: order seems to be determined by last EDITED uvset (similar with material order)...and whether or not something has multiple UV sets in the FBX export at all is a bit of black magic (i.e....not really intuitive)

    In UE4, if using special vert normals: be sure to choose: import normals and tangents on your object on import. Sometimes that can get stuck and it won't REimport changes to the vertex normals as your iterate your models though..which is fun..so you have to sometimes set it to generate normals, reimport, then back to import normals/tangents and reimport again. It's super weird.

    In the end, the process is a bit too arcane for practical use with Modo, imho..which is a shame. Modo's handling of UVsets, vert normals, and multiple material IDs in its FBX exporter make this a very, very, very, brittle process.

    Note: this is all modo 902. I'm very curious if Modo 10 clears up some of the issues here, as theyre pushing UE4 integration hard.

    Anyway,figured I'd post all that ...for science! (and posterity)

  • igi
    Offline / Send Message
    igi polycounter lvl 12
    Why would you need normal map strips along the champered edges? Shading of lowpoly model should look almost same with normal mapped one when using angle weighted normals. Does it really worth the hassle? 

    edit: here is champered mesh with averaged normals(quality normals)
    http://i.imgur.com/Nhouqhq.jpg
    http://i.imgur.com/BwI182W.jpg

  • EcoRV
    Prime8 said:
    Lots of interesting information in here, awesome.
    I'm especially curious about that UE4 setup.
    I found out how to do the UV projection in Blender (data transfer modifier) described in step 4 but I'm not sure I understand the whole process 100% already.
    Basically you just need to project the decals to the 2nd UV map that are supposed to share the same maps with the base object (albedo in that case). For the rivets in the example it doesn't really matter if they are on the 2nd UV since you masked them in the end, or is that something I misunderstood?
    How would achieve things like edge wear or dirt, using decals as well? I'm assuming the texture on the base are tiling.  

    Could you maybe post a step by step guide for Blender? 

    I create a base object, then add a plane as a second object. Unwrap both. Then Use the data modifier (Source: BaseObject, FaceCornerData UVs checked) but this does not project the UVs in the right way. Eventually I have to join the seperate base and decal (plane) objects, right?

    I would greatly appreciate some help here :)


  • Prime8
    Offline / Send Message
    Prime8 interpolator
    The steps you listed are already the same I did.
    Make sure you set the "Face Corner Data" to "Nearest Face Interpolated" and both object use the same material of course.
  • Falkrum
    Offline / Send Message
    Falkrum polycounter lvl 2
    igi said:
    Why would you need normal map strips along the champered edges? Shading of lowpoly model should look almost same with normal mapped one when using angle weighted normals. Does it really worth the hassle? 

    edit: here is champered mesh with averaged normals(quality normals)
    http://i.imgur.com/Nhouqhq.jpg
    http://i.imgur.com/BwI182W.jpg

    Do you know how it could be done in Maya?
  • igi
    Offline / Send Message
    igi polycounter lvl 12
    Falkrum said:
    igi said:
    Why would you need normal map strips along the champered edges? Shading of lowpoly model should look almost same with normal mapped one when using angle weighted normals. Does it really worth the hassle? 

    edit: here is champered mesh with averaged normals(quality normals)
    http://i.imgur.com/Nhouqhq.jpg
    http://i.imgur.com/BwI182W.jpg

    Do you know how it could be done in Maya?
     Maya must have 'face weighted normals' option somewhere. Max has various scripts for that last time I checked. I think this decal technique is really useful for adding panelings etc. but I can't see the benefit of it around the champered edges when using angle/face weighted normals on the mesh. 

     edit: I found this link maybe helpful to you in maya http://help.autodesk.com/view/MAYALT/2015/ENU/?guid=GUID-232E99F8-96B4-4870-8BA0-4887C1C8F0F2
  • Prime8
    Offline / Send Message
    Prime8 interpolator
    igi said:
    ... I think this decal technique is really useful for adding panelings etc. but I can't see the benefit of it around the champered edges when using angle/face weighted normals on the mesh. 
     Might be useful when you want to add normal detail which is different from the underlying chamfered edge, like wear or damage. 
  • invertedJoy
    Hey everyone! This thread has been awesome and some great work has been done here! 
    I posted a question to Epic's AnswerHub. Seems like they are working on an official solution for MeshDecals!
    Unfortunately it is not a priority currently, so if you are using UE4 and want this feature shoot over there and upvote the post so Epic knows there is demand for the feature. 
    https://answers.unrealengine.com/questions/415091/using-deferred-decal-blend-mode-on-a-mesh.html 
  • turbinea
    Offline / Send Message
    turbinea polycounter lvl 7
    in preview 1 of unreal engine 4.13 it is FINALLY possible to have decals almost same way as in SC.
    It may be my lack of knowledge but i couldn't find a way to achieve effect where my bolt would be shiny in the center and just bent the surface of the underlying material on the edges. If anyone knows how to achieve this effect please advice.
    There are still some other limitations but this is a very good start.

  • teho
    Offline / Send Message
    teho polycounter lvl 7
    Obscura, I'm trying your latest method and got a problem If I want to mask decals with alpha, how can I do it in your material?
    Tried different methods but no luck.
    Thanks!
    on the last screen you can see the panel I want to mask. But idealy it must work for all decals because in certain angles you can see mesh edges.
  • teho
    Offline / Send Message
    teho polycounter lvl 7
    So the main idea is what bac9-flcl was showing on his screens, that decal is overlaying on top of different mats. Now I have it opaque and with base material attributes, but I'm planning to use on that panel 4 different materials and I need to project only normal details and AO without base material attributes. Maybe I lost something in the process.
  • Millenia
    Offline / Send Message
    Millenia polycount sponsor
    Here is my technique - ask if you have any q's but it should be pretty self-explainatory. The roughness map is just a combination of ambient occlusion & curvature map. You can blend the effect down by using a parametric node to darken the alpha map in instances should you want to do so.





  • Millenia
    Offline / Send Message
    Millenia polycount sponsor
    Another practical example,



  • agitori
    Offline / Send Message
    agitori polycounter lvl 7
    Looks pretty good, I'm interested on a more in depth breakdown. Unless you have used the same way explained, by Obscura on the previous page.
  • Millenia
    Offline / Send Message
    Millenia polycount sponsor
    I might record a quick video on it soon if there's interest!
  • teho
    Offline / Send Message
    teho polycounter lvl 7
    Millenia, thanks a lot, will try it tomorrow at work, should work I think!
  • teho
    Offline / Send Message
    teho polycounter lvl 7
    got a problem, that my decals are simply black. I wasn't using Obscura method now, what I did simple metal tile material, decal material, single mesh with 2 materials (for base metal and decals), 1 UV map channel for the base mesh without 2nd UV channel for the decals projection.
  • Millenia
    Offline / Send Message
    Millenia polycount sponsor
    Are you using the 4.13 preview? It looks like the blend mode is greyed out for some reason. The technique will only work in that specific version of Unreal at the moment.
  • teho
    Offline / Send Message
    teho polycounter lvl 7
    understood! i'm on 4.11 now, updating!
  • Tzur_H
    Offline / Send Message
    Tzur_H polycounter lvl 9
    Millenia said:
    I might record a quick video on it soon if there's interest!
    Please!
  • furiouslul
    Offline / Send Message
    furiouslul polycounter lvl 4
    Millenia said:
    I might record a quick video on it soon if there's interest!
    Also interested in this! :)
  • agitori
    Offline / Send Message
    agitori polycounter lvl 7
    Millenia said:
    I might record a quick video on it soon if there's interest!
    Also interested in this! :)
    :+1:  I'm interested too
  • teho
    Offline / Send Message
    teho polycounter lvl 7
    Millenia, working just fine in 4.13. big thanks.

  • sayoend
    Offline / Send Message
    sayoend polycounter lvl 4
    is this possible in 3ds max? At least blending floating geo with normal map
  • agitori
    Offline / Send Message
    agitori polycounter lvl 7
    For those who have tried and, have succefuly reproduce this technique. Can someone please explain how did you do it by following obscura explications. Because when I have taken a shot I'didn't get it about the part with the projection and uvs. What I have done didn't get the result I wanted...
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    @sayoend - With matched uvs, yes. I did that.There is an explanation about how to do, on the previous page,
    @agitori - If you are planning to use this technique with Unreal, then I'd suggest to simply grab 4.13 and use the technique that Millenia showed. Way simpler...I don't really understand why they didn't made this earlier, but at least now its there... Anyways, if you can tell and show what you did and what you got, I might have a better idea about whats the problem.With this amoubt of information, I can only shoot in the dark.
  • agitori
    Offline / Send Message
    agitori polycounter lvl 7
    thank you @Obscura this is what I've got  so I did like you have explained making main mesh, and decals meshes. Then for main mesh minimize the uv for uv chan2 and then again recreate new uv for albedo map and such on uv chan1 for the main mesh.
    and as for the preview I don't know if it's important but I have used dx shader.
  • bac9-flcl
    Offline / Send Message
    bac9-flcl polycounter lvl 10
    @agitori As far as I understand, unless 3ds Max viewport is using deferred rendering (which it isn't), it's not possible to make this technique work with 3ds Max surface shaders.
  • agitori
    Offline / Send Message
    agitori polycounter lvl 7
    I think in this case it's not revelant to rendering the texture project on the mesh, but it's about his Uvs. Otherwise how did Obscura have his decal with normal map showing on his video.
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    Depending on your material setup, you might not see an effect in the vp....Are you displaying the normal map using uv channel 2? how does that uvmap looks after the projection.

    If you are not getting any success, I can record the whole process after I went home from my vacation. Around the beginning of the next week.
  • agitori
    Offline / Send Message
    agitori polycounter lvl 7
    Can you please do that?(recording the whole process(after your vacation ofc)) , I have tried again this morning but it's the same mess. And here are my uvs
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    Alright, I'll do that. 
  • agitori
    Offline / Send Message
    agitori polycounter lvl 7
    thanks man enjoy your vacation! : d
  • cptSwing
    Offline / Send Message
    cptSwing polycounter lvl 11
    Looking forward to the vid' as well, Obscura. Has anybody gotten this technique to work with Unity, specifically using Shaderforge?
  • bac9-flcl
    Offline / Send Message
    bac9-flcl polycounter lvl 10
    @cptSwing I got it to work with Unity, but using a different approach to Obscura. It's not possible to do that with Shader Forge since SF has no support for finalgbuffer functions required to make it work. See previous pages, posted examples there.
12467
Sign In or Register to comment.