Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paint alpha from texture #54

Open
9yz opened this issue Oct 23, 2020 · 4 comments
Open

Paint alpha from texture #54

9yz opened this issue Oct 23, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@9yz
Copy link

9yz commented Oct 23, 2020

Hey, here's a suggestion. The very old DispGen has a feature where you can give it an alpha mask and it paints blend alpha onto each vert. Since DispGen crashes when you use this, a sops version would be great.

For example, say you make some terrain in WorldMachine and export a heightmap and a mask, where black is grass and white is rock. You feed these in, and the result is a mountain with a rock texture on the sides and grass on the top and bottom.

An even cooler version would support splatmaps and 4way blends, where you have an RGBA texture (the splatmap), where the value of each channel represents one texture in a 4way blend. You feed this in and get a mountain with dirt, rock, grass, and snow all blending together.

Give me a shout on discord at 9yz#5386 if you have any questions.

@bonjorno7
Copy link
Owner

I thought you wanted vertex painting but by the looks of it you want automatic image -> vertex color conversion.
Not a bad idea, and could be used to overcome the fact that multires doesn't support vertex painting. I could probably just grab the values from the image at a given vert's UV coords (maybe average a block of pixels, will have to see if it's necessary).

@9yz
Copy link
Author

9yz commented Oct 23, 2020

Yeah, that's what I'm thinking. From my very inexperienced view, it doesn't seem too complicated, as both the image and the vertex alpha are both 0-255, so you can just plonk it in.

@bonjorno7
Copy link
Owner

bpy.ops.just_plonk(it)

@McGravel
Copy link
Collaborator

Had a quick bit of web searching, and it looks like there might be a Blender modifier or something like that to potentially do this.
Not sure, but I might look into it on a branch sometime.

@McGravel McGravel self-assigned this Jul 21, 2021
@McGravel McGravel added the enhancement New feature or request label Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants