Stairs generating application — any interest?

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,696
2,580
Either that or he could install a skin with the program that he has made up so that way for sure he knows no one else would have used it. :) Can't be that hard when the program is first ran it looks for that materials directory and places an archived texture in there for itself to use. But then again I am no programmer so to me that actually seems quite hard. Lol

That sounds like the perfect solution, actually. "dev/stairsplaceholder" or something like that.
 

Zhan

L5: Dapper Member
Dec 18, 2010
208
244
Thanks for the suggestions, I'll figure out what to do about templating soon.

How important do you think it would be to have a texture browser which gives previews of what the textures you're selecting look like? The alternative would be to just have a place to enter in a texture name (the name that would appear in your Hammer texture browser).

I just think it would be a tremendous amount of work because it would involve finding and extracting files from a gcf and then converting vtfs to a proper image format like jpg or png. Even if there is open source code that does this I'd probably have to write Python bindings, and then it would be another whole GUI window to write.

Thoughts?
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
I don't know if you should even bother with auto-applying textures to the stairs, because the user will need to go in and edit the alignment on every face anyway. The act of applying the texture is menial compared to getting it in the right position.
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
I don't know if you should even bother with auto-applying textures to the stairs, because the user will need to go in and edit the alignment on every face anyway. The act of applying the texture is menial compared to getting it in the right position.

No. you'll only need to adjust it on 3-4 faces max out of a staircase of a dozen steps.

This is assuming you're not using one of those fancy stair materials for the side, in which case that's only 1 face per step since the top step is usually metal and needs no alignment adjusting.
 

RavenStryker

Former Alias: †Blade†/Xi.Cynx
aa
Nov 25, 2008
782
845
Thanks for the suggestions, I'll figure out what to do about templating soon.

How important do you think it would be to have a texture browser which gives previews of what the textures you're selecting look like? The alternative would be to just have a place to enter in a texture name (the name that would appear in your Hammer texture browser).

I just think it would be a tremendous amount of work because it would involve finding and extracting files from a gcf and then converting vtfs to a proper image format like jpg or png. Even if there is open source code that does this I'd probably have to write Python bindings, and then it would be another whole GUI window to write.

Thoughts?

I don't think this would be necessary, I would just make it so it is textured with that one customer texture and then if needed to be changed the user can do so within Hammer.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
Wooden stairs need to have the side's texture rotated so the grain is parallel to the length. Often times I'll do the same on metal stairs when using a trim texture with some sort of length-wise detail, one that comes to mind is the one used on the 192 unit stair models. "Embedded" stairs, ones where you can't see the outside part I'll sometimes put the rail texture on the inside of the sides.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
Can't you just apply the texture to the z face, which the alignment is only required at 0 or 90 degrees to the x or y and then alt+click the sides from the z face. There's really no rotation required.

Either way, standard stairs only take moments to make and the greatest portion of working on stairs will be texture alignment for the steps. z alignment will only be required for 3 of the 4 steps when using step textures, but that's not including x/y displacement to prevent texture tile repetition. Also the wooden stairs don't usually use step textures (they utilise wood/woodwall020) so z alignment is required on every step.
 
Last edited:

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
but if you're making a program, it just has to do a tiny bit of maths and it can work out the correct alignment, all it needs to know is the direction the texture runs, vertical or horizontal.
 

Zhan

L5: Dapper Member
Dec 18, 2010
208
244
I think having the program do texture application intelligently would be one of the things that would make using the program more efficient than just building stairs by hand. I'll definitely make an effort to have GUI options to do things like set the orientation of textures (on the sides, so wood grains are aligned, for instance) and also do things like set fixed offsets for some textures and random offsets for others.

Started development which you can watch on GitHub. Currently the only bits I've written are the vmf encoding/decoding, but the program's currently able to convert vmf files (in text form) into native Python data structures for easy manipulation and back.
 

gamemaster1996

L13: Stunning Member
Sep 30, 2009
1,064
134
A great idea Zhan. It would save time and maybe even allow us to control stairs more simply.
 

Zhan

L5: Dapper Member
Dec 18, 2010
208
244
Some progress is made! The program can now read template brushes from a vmf and generate extremely smooth "stairs".

Given:

poc01templates.png


my program produces:

poc01ramps.png


and then resaves the vmf.

Yes, yes, I know, it'll make real stairs eventually. Progress, as always, can be seen at https://github.com/zhanrnl/VMFStairGenerator/