How can I put materials on textures?

So pretty much I’m trying to make a grass detail out of textures like so

I want to be able to set any material to this texture. One reason I cannot just slap the material onto the texture image itself is that I want to be able to resize the texture for taller and shorter details.

How can I achieve this?

3 Likes

Personally, I’ve used materialvariants for things such as this

3 Likes

idk how a material variant is going to help with this.

2 Likes

For example, I have this image I want to apply as a texture:

I can do this by going to the material manager in the model tab and hitting the little plus icon
image
This will create a new variant of whatever material you selected and will then allow you to edit it by clicking on it.
Here you can select different images to apply to your texture, since I only want to apply the decal of the material, I’ll simply change the color setting to my image like so
image
In the properties tab, then select your variant under material variant
image
Your texture should wrap around your part like so
image
Keep in mind, you can also change how the texture wraps around the part by changing the studs per tile and can also create separate textures for each side of the part.

3 Likes

the issue is the texture I have specifically is meant to have transparent sections which would not work with material variants. And like I said I also wanna adjust the height and stuff.

1 Like

Regarding the transparent sections, if you want the texture to be fully visible on the invisible part, you have to use decals or textures

2 Likes

You can also adjust the texture on the part by changing the studs per tile property

2 Likes

no its intentional.


you can see here, the white is the texture. There are transparent parts of this texture for when it sticks out. Its an invisible part with a texture on it. I’m just trying to figure out how I can apply materials to textures.

1 Like

Hey yoolurs!
Based on your post, it seems like you’re aiming to apply materials to a part with a texture. It’s a straightforward process—import the texture with a transparent background, apply it to the part by adding a texture child to the part and selecting the texture, and then easily switch the material from the property tab of the part you have selected. Here’s an example of what I did with a transparent texture background on a part while using materials:


I used a texture with a transparent background and applied a material using the property tab.

If you’re utilizing a 3D program to import the FBX with a texture on the mesh, then you need to use “Surface Appearance.” Apply the texture in it and set Alphamode to Transparency. Make sure to input the texture URL in the Colormap of the mesh part.

I hope this proves helpful… however, if you have any further questions, feel free to let me know—I’m here to help! :grin:

3 Likes

Thx for this solution! Sadly this wont work under my use case as the part the texture is on must be transparent since the texture is meant to have transparent gaps in it.

1 Like

In that scenario, you can consult the default material list table in the Roblox Studio documentation here and utilize these materials as textureIDs. Add another texture and adjust the ZIndex value of the older texture to be greater than the newly added one. This approach allows you to create transparency in the part and use Roblox Studio materials as textures. I suggest creating a dictionary or table with all the IDs of default materials for easier reference while programming. I’ve included a couple of images to illustrate the process:

Additionally, You can also change the “material” Texture color by changing the Color3 value in the properties of the texture.

This should solve your query! Have a nice day :grin:

2 Likes

The issue is the transparent sections is meant to be on the top layer where the texture is itself. The reason I dont just add the material file onto the texture itself is that its meant to be resized and scaled. I also cant just put another texture under it with said material since theres these transparent sections on the same surface as the texture.

For reference


the white texture is on an invisible part thats slightly wider than the grey part. For this example I didnt color it green like the grasspart above so it was easier to see whats the texture.

For better context I have a plugin that makes these details:

they are made with parts, to reduce the part count I wanted to make a performance mode that used textures instead. Since this can be generated on all types of parts and the grass itself will vary in color and material (sometimes I use leafygrass for example) thats why I want so much flexibility with it.

I’m unsure if textures are the right route. On top of this issue the sun doesnt glare off them like it does with parts making it look obvious that its a texture.

1 Like

You can try MeshParts with SurfaceAppearance and Utilize the Roughness, ColorMap, Metalness, etc, The documentation I provided in the above reply also contains IDs for the properties in SurfaceAppearance

1 Like

Would a surface appearance allow me to change it to any material while having the part itself be transparent? Also I don’t think surface appearances work when the part is transparent.

Alternatively im thinking I instead use meshparts and stop using textures altogether for this.
To reduce the part count I could have varying meshparts one thats 100 studs long, one thats 50, one thats 25, one thats 10, etc the meshparts would look the same as if it were parts its just 1 part instead of possibly hundreds. I would use as little parts as possible by utilizing these mesh sections instead of just using individual parts for every single dip. This also solves the issue with sunglare and overall looking off from the part above it.

1 Like

You are right, SurfaceAppearance does not work when the part is transparent. Plus what you added is a valid approach for this scenario! I wish you best of luck with your project :smiley:

1 Like