Bitmap as the Sculpt Mesh Alpha Channel?

Started by Stormatree, May 03, 2015, 02:41:27 PM

Previous topic - Next topic

Stormatree

I've been making skybox sculpt meshes using Anvil and height-map displacements,
but I can't figure out a good way to paint the alpha on the sculpt mesh in a way that looks nice and won't take forever.

I'm using World Machine to generate the height-maps and textures,
and I've also generated a bitmap for the alpha channel based on face normals.

The only problem is I'm not sure how, or even if it's possible to apply a bitmap as the alpha channel on a sculpt mesh.

This is the sculpt mesh for a bit of context.



I temporarily changed the default grass texture to the generated bitmap alpha channel.
The final in-game texture should be a blend of grass and cliff faces.


tl;dr Is there a way to change a sculpt mesh's alpha channel with a black and white bitmap?

wallworm

#1
This is a topic that I've had on my todo list for a video for quite a while. But I sometimes fall behind on the videos and docs.

Here is how you can accomplish the task.

First, download and install MapToVColor. This is a free plugin.

Now to the process:

1) Make as many displacements as you need for your terrain. Once done, convert them to a Sculpt Mesh in Anvil.
2) Apply a Planar UVW Map to this sculpt mesh and set it to channel 2.
3) Add a Bitmap node to Slate and load your height map into it. I will later refer to this as HM.
4) Set HM to use Map Channel 2.
5) Apply MapToVColor modifier to displacement. Set it to Map Channel 2 and Target Channel 3.
6) Drag HM from Slate to the Map button (labeled None by default) on the MapToVColor modifier.
7) Click Tools > Channel Info and Copy Channel 3.
8) In the Channel Info, Paste the channel you copied into Channel -2:Alpha. (This adds a UVW Mapping Paste modifier to the stack).
9) Apply a Displace Modifier to the sculpt mesh. Drag HM from Slate to the Map: slot on the displace modifier. Set the Displace Modifier to use Map Channel 2.
10) Increase the Strength of the displace to see HM affect the terrain.
11) Once you have the sculpt mesh how you want, convert it to an Editable Poly and then click the Commit Changes in the modify tab.

I have used this method to create entirely procedural terrains that are driven by procedural textures (not static textures like a bitmap). When I get time, I'm going to build a MCG modifier for Max 2016 that will accomplish all of this with one modifier.

Stormatree

Worked perfectly!

My HM was a bit too big to get any detail on the low poly mesh, so I had to blur it up a lot.
But this exactly what I wanted to do. Thanks for the help.


wallworm

#3
Glad it works.

You can use multiple displacements together to get higher resolution. The easiest way to do that is create a Plane primitive with as many side segments and width segments as you want rows/columns of displacements and set the width/length to match the final landscape size. (Note that each Quad Polygon will turn into a Displacement ... so the size is important because of lightmap scale, etc... so make sure that the size of each quad is appropriate for the actual size of the level and your lightmap scale.)

Apply a planar  UVW Map to this plane and your material to get the displacement mapping scale to what you want. This is important because, at this time, the UVS on displacements cannot be edited from the Sculpt Mesh--so it is most convenient to set the UVs to what you want before you even make the displacements (Otherwise, you'll need to adjust UVS on each displacement separately if they need changed or via an instanced modifier.)

Now in Anvil, set the power you want for each displacement.

Now Select the Plane and click Polys to Displacements. Each quad from the plane will be converted to a displacement.

Now select all of the resulting displacements and click the Sculpt button in Anvil, which will turn them all into a sculpt mesh... which you can now continue with the method listed above.

This will give you more resolution than using a single displacement or just a few displacements.

Joris Ceoen

I may add to this that in general it's not recommended to use a power of 4 displacement level. Almost everyone I ever came across with told me this and it has to do for performance and crashing issues. If you do need more, you can simply utilise more faces (like Shawn said) and use power of 3 or 2.

SMF spam blocked by CleanTalk