Grass under dirt using midtextures

snoccy_

udmf is the best thing to ever be invented
I was wondering if you could put grass midtextures UNDER dirt instead of above. Maybe it could be made using sprite offsets, but I dont know. If it's the sprite offsets then i'd like to know what the offsets are.
Picture of what im trying to achieve :
hmm yes.png
 
What you need is a composite texture. The wiki article doesn't seem to have any images for this, so I'll provide some.

A composite texture is a bunch of graphics (patches) that you assemble (patch) together to make a new graphic. You can see this in action everywhere in the game, such as Greenflower Zone. Using SLADE, you can open TEXTURES.gfz from srb2.pk3 to look at it yourself. (You've got SLADE, right?)

1648670775289.png


On the right side you have a list of patches in the composite texture. The two patches GFZTILA1 and GFZTILA2 are both used twice to complete the checker pattern.

Let's make a new PK3 to demonstrate making a new composite texture. I've copied in a couple graphics from SRB2 for the sake of simplicity, but you can probably use vanilla graphics without copying. Graphics meant for use in composite textures only should go in the Patches folder, but you can use graphics out of other folders too, such as Textures, I believe.

You'll want to make sure your patches are named in all caps; I forgot to do this at first.

1648671420948.png


Let's open the texture editor using the button I'm pointing at. This will pop up. Answer Yes.

1648671473383.png


You will be asked for parameters to create a texture definition lump. SRB2 v2.2.x uses ZDoom's TEXTURES format, so select that. In almost all cases, you should select Create New (Empty) under Source. Click OK.

You should now have a TEXTURES.txt. It's currently empty. Rename it to something more convenient, like TEXTURES.mylevel, then double-click it to open the texture editor.

1648671638158.png


Now that we're in the texture editor, let's patch together a texture. Hit the green New Texture button on the left or use Ctrl+N.

It's probably easiest to start from a patch unless you know the exact dimensions you want.

1648672088121.png


Here's that patch. Let's add another.

1648672202711.png


You'll be given the same menu to select your next texture. I've put this one in twice and flipped it.

1648672312838.png


Now we'll make the texture taller, so you can use it on large cliffs. Let's set the texture's height to something pretty large, like 2048.

1648672394745.png


Let's duplicate the main texture a few times, positioning it using the arrow keys, clicking and dragging, or typing in the X/Y offsets.

1648673149059.png


Click the Type drop down menu and change it from Texture to WallTexture. Our texture is now complete. Let's put it in a map and see what happens.

1648673894213.png


And there you have it. For fun, I've used the new texture along with grass midtextures to make the grass look a little extra fluffy here.

Hope this helps.
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top