Home Technical Talk

[Blender] DECALmachine: surface detailing using mesh decals

2

Replies

  • FourtyNights
    Options
    Offline / Send Message
    FourtyNights polycounter
    @MACHIN3 I'm curious about the parallax shader/material you're using in your tools. Would it work for the parallax effect of the iris and pupil for the eye on its own, with the Principled BSDF?

    Also, instead of asking only that, I might buy this addon of yours for paneling and detailing a character into an android, haha. ;)
  • Artaani
    Options
    Offline / Send Message
    Artaani polycounter lvl 7
    Hello, you are developing extremely amazing tool! Just a revolution in hard surface modeling! I am using DECALmachine in Blender 2.79 and it is incredible! Thanks you very much for such a powerful tool!

    However I am confused with the new release for Blender 2.8
    Currently new version of DECALmachine is completely unable to export result into Unity?

    If yes, it is really weird. It looks amazing, but seems completely useless because export to game engine is the main purpose of DECALmachine, in my opinion.

    I don't understand why it was released without this main and crucial feature, especially considering that it worked in previous version for Blender 2.79. Only for static renders and movies in Blender? Seems like this is not a main purpose of DECALmachine, so this is really weird.

    Do you have ETA when export option will be available? I think this task should have highest priority.






  • plutko
    Options
    Offline / Send Message
    plutko polycounter lvl 14
    Hey @MACHIN3
    thanks for great work, it's really amazing.

    I have a similar question as @frmdbl asked. Atlasing is schedulled to 2.0 realese. I know it's hard to predict when it's gonna be, but can you at least roughly estimate that date?
    We plan our pipeline based on DecalMachine but lacking atlasing is a bit of an issue. And not sure if we sould write some tools internally now or try to wait for the release?


  • MACHIN3
    Options
    Offline / Send Message
    MACHIN3 sublime tool
    1.9 with baking releases tomorrow. I will then start working on 2.0 which is mainly about atlasing. I'll also look trimsheet workflows and try to  figure out a way to support them. 
  • Artaani
    Options
    Offline / Send Message
    Artaani polycounter lvl 7
    Nice, thanks you!
  • MACHIN3
    Options
    Offline / Send Message
    MACHIN3 sublime tool

    v1.9 is outGumroad Blender Market

    9_web

    What’s new?

    Changelog

    • Add Bake tool
    • Add PanelCutting + RemoveMeshCuts tools
    • Add RemoveAllInstantDecals tool
    • Add new Example blend files
    • Select tool
      • support selecting all decals of the selected type
    • RemoveMeshCuts tool
      • add ALT selection(instead of removal) mode
    • Epanel tool
      • add SHIFT mode: mark edges as MESHCUT edges
      • add CTRL mode: delete edges immediately
      • add ALT mode: convert selection to edge-only object
        • can be combined with SHIFT or CTRL keys
      • support local view
      • automatically parent edge-only object
      • support single object selection, and option optional forced target
      • remove custom normals, if present
      • create backup object when run from object mode
    • ReApply tool
      • don’t change blend_method when auto-matching material
    • Adjust tool
      • don’t change blend_method when changing panel decal material
      • change blend method per decal-material, not per decal-type-material
    • InitGeneratedUVs
      • use non-evaluated mesh by default
    • DECALmachine panel
      • add EPanel to Tools section
    • fix issue with ReApply when used on projected decals with mirror mods
    • fix issue in Create when prefs.edit.use_enter_edit_mode is enabled
    • prevent issues in relation to decal type collections and multiple scenes
    • fix issue with DM’s default material no being selectable in DM panel when Auto-Match is set to Material
    • fix redo issue due to poll being too strict in ClearDecalProps tool
    • fix faceidx out of range errors when panel decals have mirror mods
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    The new Epanel creation method combined with baking really makes for an incredibly powerful workflow. And interestingly enough, even if the baking results will always be lower res than the infinite detail provided by the regular bump decals I find that the AO pass really adds a lot of depth and ties it all nicely together. And if anything, text decals can be atlased and kept as floaty decals too. Really groundbeaking stuff.

    Eventually I think it would be great to also have a full combined bake as an output - capturing the shader colors given to the decals, metalness, roughness of the various regions. Hence getting something that can be plugged right into an engine without the need for ID masks and tinting ...
    Basically a second kind of preview relying on full bakes and a single Principled node rather than a Mix of many.

    Arguably it doesn't take that long to do manually - duplicating the low once more and baking that (Bake Type : Diffuse, Influence : Direct) but it would be nice to have for sure.

    BTW, are there any DecalMachine packs available anywhere ? By that I mean, packs of bumpy decals rather than just graphic stencils - either "official" or thirdparty.
    (But then again I suppose it is also possible to convert Zbrush alphas and Substance Painter stamps to it).
    [Edit] - just found the ones by MRRadioactive. Are they endorsed, so to speak ?
  • Nosslak
    Options
    Offline / Send Message
    Nosslak polycounter lvl 12
    You were saying that the big focus for the next release would be decal atlasing and I were wondering if that will include the ability to use an already existing decal sheet? To be be clear, what I want to do is:
    1. Create a plane with all my pre-baked decals on it (already established with set UV coordinates and albedo/normal/gloss/height/alpha information)
    2. Cut out the 20-30 individual decals as rectangular pieces from my sheet (the sheet usually contains a few panel decals as well)
    3. Separate these pieces into their own individual meshes/objects
    4. Add these meshes to the library without rebaking them or changing them in any way (keeping the same textures and UV coordinates)

    Will this be possible to do in the next release? I'm just looking to see if we could use DecalMachine for the game I'm currently working on and without this I don't think it will be viable.
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    @Nosslak : I can't speak for Machin3, but ... I can confirm that one can definitely do that with the current version - and it doesn't even require adding these extra custom decals to the library, they can just live in your scene as a regular object (atlased plane) or as little precut labels.

    Merging any piece of flat geometry with a genuine DM decal in the process of being applied makes it all behave as expected. So basically you can prepare a regular atlased decal sheet somewhere in your scene, and apply it bit by bit.

    https://youtu.be/ZrExBvZjDi4
    All that said you could very well just add your master sheet as one big asset in a DM decal library. Or, split that into as many little decal assets as needed, just all using a duplicate of the same texture. Basically what I am getting at is : is your source content is already an atlas reused across assets, then there is no need for you to wait for DM atlasing/decal packing tools since your work is done already.

    @MACHIN3 : If I am not mistaken there is a bit of blind spot/issue after baking, with a scenario as follows : 

    > Testbaked decals down to a base low successfully, but needed to make adjustments to the decals and rebake.
    > Removed the bake preview material from the low manually (without using the Restore button in the DM panel), re-applied the original material also manually.
    > The Bake button in the DM panel is now greyed out (probably because DM assumes that the model is not ready for a rebake). In other words, DM insists that I use Restore rather than Bake. But if I do click Restore ... then my intended/original material is wiped from the scene altogether (as a bake preview material should be).

    The one workaround I found consists of creating an extra bogus material, applying it to the model, and then clicking Restore. This properly restores the original material and makes the bake button active again ... but then the bake turns out empty ... sometimes. I end up duplicating the whole thing for baking now (lowpoly and decals) but that's a bit of a shame I think.

    So I suppose my question is : under the hood, what makes a material appear as a "bake preview" do DM ? Some property saved somewhere ?

    Thanks !
  • Nosslak
    Options
    Offline / Send Message
    Nosslak polycounter lvl 12
    That's not an approach I had considered, I did try a few other workarounds without any success. At our studio we do currently have a solution in place for decal placement but it's pretty barebones so I were hoping to potentially use DecalMachine instead as it seems much faster and more intuitive. Using your proxy workaround would however be slower than our current implementation so it would mostly defeat the purpose. 

    It doesn't seem like it would be a very difficult problem to fix, DM would just need to add an additional model to the library per decal without changing the UVs (potentially just recreating the same material DM uses, just inputting the already existing texture that you'd specify). 

    I found a different workaround that kind of works:
    1. Combine all the highpoly geometry to a single big object, making sure to have some geometry in two opposing corners
    2. Bake that to a giant decal
    3. Cut out the pieces from that
    4. Add those pieces to the library
    Doing it like this works pretty well. There were a bunch of weird POM distortions but those could mostly be removed by adjusting the POM strength of the material.

    Thanks for the suggestions, Pior!
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    Anytime !
    I keep finding some alternative uses for DM, it truly is a workhorse.

    Speaking of which : @MACHIN3 , what are the conditions that make an object be not considered a valid surface for DM decals to project onto ? I tend to do some outside the box combining of objects when working with decals, meaning that at some point some meshes end up being ignored by DM when trying to apply decals to them because they somehow end up carrying a flag identifying them as decals themselves - which then prevents DM decals from picking them up as valid surfaces to project to (decals just go through them, and material color doesn't get picked up).

    I've tried to put such objects back into the main scene collection, and removing any trace of these ever being a decal "in the past" so to speak ... but there has to be some data leftover somewhere. I end up having to combine such objects with a plain box primitive to flush everything out, but that obviously gets rid of any modifier and also affects transforms hence I'd love to avoid that.

    The red model on the left is an example of such a problematic case : 

    https://www.youtube.com/watch?v=Tr9NEA_OzYE&feature=youtu.be

    Thanks !
  • MACHIN3
    Options
    Offline / Send Message
    MACHIN3 sublime tool

    v2.0.0 is out! | Gumroad| Blender Market



    Changelog

    • add Create/Import Atlas tools
    • add Use Atlas tool
    • add Join Atlased Decals and Split Atlased Decals tools
    • add Export tool
    • add Init/Import/Duplicate Trim Sheet tools
    • add InitTrimSheetMaterial tool
    • add Setup Subsets tool
    • add UnwrapTrim tool
    • add UnwrapToEmptyTrim tool
    • add AdjustTrim tool
    • add TrimCut tool
    • add AlignDecalToEdge tool
    • add QuadUnwrap tool
    • add BoxUnwrap tool
    • add MirrorTrim tool
    • add Stitch tool
    • add Update18DecalLibrary tool
    • add Update18BlendFile tool
    • Decal Creation
      • support baking emission for simple, subset, panel and info decals
      • fix rare texture size rounding issue
    • Decal Baking
      • support emission bakes
    • add Join and Split tools
    • Adjust
      • add Emission mode (E key) to adjust emission strength use X and C for 10 and 0 presets
      • change Parallax mode to D key and reset with X the to the amount stored in the decals blend file
      • in AO mode (A key) use C key for 0 preset
      • fix UV stretch exception when going across 0
    • MatchMaterial
      • support transmissive materials
      • support emissive materials
    • Insert
      • support batch inserting entire libraries with ALT
      • prevent raycast errors when objects scaled to 0 are present
    • Validate
      • support trim decals
      • support decal versioning
    • FixTexturePaths
      • support instant decals
      • support trim sheets
      • support instant trim sheets
      • support UUID based path reconstruction
    • improve Remove Decal Orphans tool
    • expose ReRenderThumbnails developer tool
    • Texture (Un)Packing
      • support unpacking in local relative folder as a fallback or forced with ALT
      • support Trim Sheets and Trim Decals
    • support ALT navigation for all modal tools
    • update Examples blends + Decals
    • update Decals
      • support emission and emission maps
      • support normal blending
      • add alpha input to info decal groups, useful for weathering or simply making decals transparent
      • use Principled PBR’s alpha socket instead of mixing with transparent shader
      • split nrm_alpha and color_alpha into normal, color and masks maps
      • support parallax for panel decals
    • add Example Trim Sheet
    • add Example and Aircraft Decal Atlas
    • preferences
      • point assetspath to assets, not assets/Decals
      • add ability to restore keymaps, if the user ends up deleting some
    • prevent issues for users not using an English Blender
    • Pie Menu
      • enable for edit mode and UV editor
      • show trim sheet libraries
      • optionally show Trim and Split tools
      • add emission indicator in decal thumbnails
    • Sidebar
      • main panel
        • add toggles to collapse/expand defaults/tools/utils
        • add toggle to hide/show decal node trees
      • add Atlas and Trim Sheet creation to creation panel
      • add Atlas to export panel
      • help panel
        • add warning if file is unsaved, before loading Example files
    • add Trim Sheet panel to Material Properties
    • remove DECALmachine context menu




  • MACHIN3
    Options
    Offline / Send Message
    MACHIN3 sublime tool
    pior said:

    The red model on the left is an example of such a problematic case : 

    https://www.youtube.com/watch?v=Tr9NEA_OzYE&feature=youtu.be

    Hey man, sorry for the late reply. Can you send me the blend file so I can take a look?
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    Ha, that's an old one ! Will do my best to track it down and repro once I update to 2.0.
    Congratulations on the release !
  • frmdbl
    Options
    Offline / Send Message
    frmdbl polycounter

    Hey, I've been playing with the barest basics of DM 2.0 and I think I stumbled upon a potential problem.

    So my question is this. When you are making an atlas from decals in a scene (applied to an object) does it take into account their scale?

    E.g here look at the scale of that decal on the object and in the atlas.
    I know I can scale the decals in the atlas myself, but if there's a bigger atlas it might be really hard.

    Of course if the atlases are stored as images, there might be another issue where say the decal is 256x256 and you scale it beyond that, but still an option to maintain the correct scale (if not texel) ratio would be cool.

    Most likely though, I'm missing something.
  • MACHIN3
    Options
    Offline / Send Message
    MACHIN3 sublime tool
    You are not missing anything. Decals are packed based on their original texture size, the same size they are also brought into the scene as.
    I could probably add an option to take max scene scale into account, but no ETA, I'm focusing on other things rights now.
    However, would it actually matter? The decal will look like it is in your viewport anyway. If you are happy how it looks scaled up right now, it will look identical in your engine in terms of resolution, as long as you don't scale down the decals in the atlas, or scale down the entire atlas.
  • frmdbl
    Options
    Offline / Send Message
    frmdbl polycounter
    MACHIN3 said:
    However, would it actually matter? The decal will look like it is in your viewport anyway. If you are happy how it looks scaled up right now, it will look identical in your engine in terms of resolution, as long as you don't scale down the decals in the atlas, or scale down the entire atlas.

    Yeah, when the decals are 'spawned' they are scaled accordingly to their resolution so I guess you get an indication of the right scale they should have, if you stick to this original scaling you're ok.


    I guess you're right, as long as the resulting texel density of a created atlas is big enough you cannot magically make up the resolution of a given decal when it's scaled up.
    Still in the opposite situation, say if I create a custom decal for something big let's say at 1024 and I want to use some already made that are 512 or 256 for some minute details,
    when I make the atlas of of them, those smaller decals could have too much texture space in relation to the big one.


    I guess it's not a huge issue, but maybe some improvement is worth thinking about, e.g just adding an option to scale the decals in the atlas to a proper texel density and if the desired texel density is bigger than the maximum possible with the source decals you'd get a warning.

    Just something to think about, you've already done a great job :)

  • wjhamilton
    Options
    Offline / Send Message
    wjhamilton polycounter lvl 7
    Hello, I had a question about decal creation I hope you can help me with.

    Is it possible to create simple decals that use normal, ao, height maps without having to bake them, and instead supply the maps from substance designer?. Info decals (as far as I'm aware) only support color/alpha but not ao/normal/height. TrimSheet decals do allow you to create decals from supplied images, but I like the simple decals approach because you create one decal at a time (with each decal being at whatever resolution you want) and add it to an existing decal library (also easy to delete if you don't like it). If for example I wanted a decal library of say 80 images, each at 512 resolution, doing this with a trimsheet would require a giant image and would be a bit slow to add or remove decals from it (since I think using the "Trim it" button trims every decal in the map, not just say an additional decal you wish to add to it). 

    So to create simple decals from images what I'm currently doing is taking a height map, using that to displace geometry and baking out the simple decals from that.
    What I would like to be able to do is supply the maps from substance designer (normal, height, ao, etc.), and create simple decals from that.

    I hope that makes sense. I'm very new to decal machine so I'm likely not understanding something, but I have a folder containing 80 16bit height map alphas of fabric folds that I would like to use as decals with decal machine and am trying to figure out the best way of making them decal machine compatible. Thanks a bunch! I'm really enjoying the addon thus far.


  • frmdbl
    Options
    Offline / Send Message
    frmdbl polycounter
    @MACHIN3
    I wanted to import a decal atlas texture to into Decal Machine, I used the Trim Sheet Initialize menu, it works ok, but if I want to change anything after clicking 'Trim It' the already placed decals disappear.

    I want to be able to import a sheet, but also adjust it afterwards, not commit to it at the first shot.


    TBH the only functionality I'd need in DM is to project decals I made and cut myself and it just doesn't work.
  • siyengar
    Options
    Offline / Send Message
    @MACHIN3 hey, couldn't reach you via email so asking you here - I'm getting an error with 2.0 and 2.01. it tells me I have an error on line 162 of create.py - "cannot unpack non-iterable nonetype object"
  • Avis Para.doc's
    Options
    Offline / Send Message
    Avis Para.doc's polycounter lvl 9

    Hi everyone.

    I'm having a problem with the decal machine pipeline.

    I've got a small project, and my plan is to create an industrial kit for my environment using a single trim sheet for the entire asset or even the entire project.

    At the stage of a proof of concept, I started to face some problems:

    1. Can I create and use non-square trim sheets in DM?

    2. Of course, I can't plan the entire atlas at the beginning. So, I need to update the already created one. It's not a problem if I use a decal atlas pipeline; however, it seems that there is no way to update an already used trim sheet on a model. I couldn't find any obvious attributes that are responsible for UV.

    3. Is there a way to replace decals placed on a model with trim sheets created from them?

    Of course, all of this can be done manually, but it completely blocks this amazing tool, and, of course, I could create a lot of trim sheet textures, but then I would end up with two or three materials on most assets.At the end, I need to use a trim sheet because I want to cover a large area with patterns applied to it. For example, a cable with fabric folding on it using a trim sheet.


2
Sign In or Register to comment.