Home Technical Talk

Slope based texture painting

Slavq
polycounter lvl 7
Offline / Send Message
Slavq polycounter lvl 7
Is there a tool in Zbrush/Mudbox/etc. that allows to paint textures based on mesh slope angle? For example, a brush setting that will paint texture only on a surface that has from 0 to 30 degrees slope. I'm making some terrain/mountain assets and it will be very helpful and time saving.
Terrain Toolkit for Unity has something like that, but it's only for Unity's terrain: https://www.3dbuzz.com/training/view/unity-fundamentals/terrain-toolkit/13-texture-slope

Replies

  • AlexCatMasterSupreme
    Options
    Offline / Send Message
    AlexCatMasterSupreme interpolator
    i know that a lot of editors let you paint detail textures on terrain by that, cryengine does for a fact.
  • Slavq
    Options
    Offline / Send Message
    Slavq polycounter lvl 7
    Yeah, but i want to paint texture on separated UVed mesh, and these Cryengine/Unity terrain tools are only working with engine's terrains.
  • Macrow
    Options
    Offline / Send Message
    Macrow polycounter lvl 8
    I'm a bit late here, but I know of at least three tools that can achieve what you're seeking (because I need them for the same purpose as yourself):

    • Mari has a slope angle-based texturing capability--I've seen it used on a Digital Tutors tutorial once.
    • L3DT lets you do angle-based texturing procedurally (though, you can still freely texture manually, though, not sure if slope-based).
    • World Machine 2 lets you do slope-based texturing, which you create texture maps and splat maps (or "alpha maps").

    There is a way to do such slope-dependent texturing in Blender using nodes (there's a couple videos and forums on it), but it takes some setup. (Examples: here, here, and here)

    Maybe if you request it on ZBrushCentral, someone can perhaps generously create a small "mask by angle" script for surface angles like slopes--something I've thought about for requesting for a while now (but never got around to doing it).
  • Macrow
    Options
    Offline / Send Message
    Macrow polycounter lvl 8
    I should note that I do use a workaround:
    1. Take a heightmap of a sculpted sloping terrain, by your usual means. Save it as (UV-unwrapped) mesh terrain file (.obj or .fbx).
    2. Extract a heightmap of the mesh terrain, by some means (I personally created a makeshift "heightmap template" to do this quicker in Blender).
    3. Take the heightmap into World Machine 2 (WM2) (if you own it) and produce slope maps (maps you can use as masks), by one of numerous ways, such as:
      • using an Erosion device and using the Flow, Wear, and/or Depo(sition) outputs as various detail/slope masks
      • using Select Slope device(s) to select your slope angle, and output as grayscale heightmaps to use as slope masks
      • using a Snow device in a similar manner as Erosion device, for producing slope masks for realistic snow-covered peaks
      • any combination of these and other devices (experiment!)
    4. Take your mesh terrain into Blender (you'll need the latest, Blender 2.72), import your slope mask as images for paint mode. (Look it up, if you're not familiar with such--there are plenty of videos out there on this.)
    5. Using the Texture Paint Mode, use the various masks as stencil masks for texturing, using Blender's UV Map texturing feature, which allows you to map the slope masks perfectly over the terrain to use as stencil masks (with the option to invert values).
    6. Now, you can texture freely using slope masks as stencils, to paint only where you want textures. If you're using several different slopes, just switch between your various slope masks.
    (Alternatively, you can use L3DT instead of WM2, which has a generous free version. I own both WM2 Pro and L3DT Pro, and while WM2 better-suited for producing slope maps, you can get some decent slope maps using L3DT--might take some reading documentation first.)

    I'm aware this is a lot to visualize in merely reading, and you may not be familiar with my list of software, so when I make some time this week, I'll probably do a video showing my process. And if I find other means for slope-based texturing, I'll try to post about it here.

    But yeah, you'd think that, by now, there would be plenty of such options like slope-based texturing tools.
Sign In or Register to comment.