Jump to content
The Dark Mod Forums

Possible Feature Request


Recommended Posts

I'm not sure if this is doable, but, I have some stairs that I want to use patches on for the carpet.

I tried individual patches and bending them for each stair, but getting the textures to line up is impossible.

So making a single large patch and manually placing the verts works, but is slow and tedious.

Is there a way to increment the patch programatically?

For example, here's the patch:

 

// primitive 70
{
patchDef3
{
"textures/darkmod/carpet/runners/geometric02_red_HD"
( 57 3 6 4 0 0 0 )
(
( ( -347 -72 169 0 0 ) ( -347 0 169 0 0.5 ) ( -347 72 169 0 1 ) )
( ( -342 -72 169 0.1428571492433548 0 ) ( -342 0 169 0.1428571492433548 0.5 ) ( -342 72 169 0.1428571492433548 1 ) )
( ( -340 -72 169 0.2857142984867096 0 ) ( -340 0 169 0.2857142984867096 0.5 ) ( -340 72 169 0.2857142984867096 1 ) )
( ( -338 -72 169 0.4285714626312256 0 ) ( -338 0 169 0.4285714626312256 0.5 ) ( -338 72 169 0.4285714626312256 1 ) )
( ( -338 -72 167 0.5714285969734192 0 ) ( -338 0 167 0.5714285969734192 0.5 ) ( -338 72 167 0.5714285969734192 1 ) )
( ( -338 -72 165 0.7142857313156128 0 ) ( -338 0 165 0.7142857313156128 0.5 ) ( -338 72 165 0.7142857313156128 1 ) )
( ( -338 -72 163 0.8571428656578064 0 ) ( -338 0 163 0.8571428656578064 0.5 ) ( -338 72 163 0.8571428656578064 1 ) )
( ( -338 -72 161 1 0 ) ( -338 0 161 1 0.5 ) ( -338 72 161 1 1 ) )
( ( -336 -72 161 1.142857193946838 0 ) ( -336 0 161 1.142857193946838 0.5 ) ( -336 72 161 1.142857193946838 1 ) )
( ( -326 -72 161 1.285714387893677 0 ) ( -326 0 161 1.285714387893677 0.5 ) ( -326 72 161 1.285714387893677 1 ) )
( ( -324 -72 161 1.428571581840515 0 ) ( -324 0 161 1.428571581840515 0.5 ) ( -324 72 161 1.428571581840515 1 ) )
( ( -322 -72 161 1.571428775787354 0 ) ( -322 0 161 1.571428775787354 0.5 ) ( -322 72 161 1.571428775787354 1 ) )
( ( -322 -72 159 1.714285969734192 0 ) ( -322 0 159 1.714285969734192 0.5 ) ( -322 72 159 1.714285969734192 1 ) )
( ( -322 -72 157 1.85714316368103 0 ) ( -322 0 157 1.85714316368103 0.5 ) ( -322 72 157 1.85714316368103 1 ) )
( ( -322 -72 155 2.000000238418579 0 ) ( -322 0 155 2.000000238418579 0.5 ) ( -322 72 155 2.000000238418579 1 ) )
( ( -322 -72 153 2.142857313156128 0 ) ( -322 0 153 2.142857313156128 0.5 ) ( -322 72 153 2.142857313156128 1 ) )
( ( -320 -72 153 2.285714387893677 0 ) ( -320 0 153 2.285714387893677 0.5 ) ( -320 72 153 2.285714387893677 1 ) )
( ( -315 -72 153 2.428571462631226 0 ) ( -315 0 153 2.428571462631226 0.5 ) ( -315 72 153 2.428571462631226 1 ) )
( ( -308 -72 153 2.571428537368774 0 ) ( -308 0 153 2.571428537368774 0.5 ) ( -308 72 153 2.571428537368774 1 ) )
( ( -306 -72 153 2.714285612106323 0 ) ( -306 0 153 2.714285612106323 0.5 ) ( -306 72 153 2.714285612106323 1 ) )
( ( -306 -72 151 2.857142686843872 0 ) ( -306 0 151 2.857142686843872 0.5 ) ( -306 72 151 2.857142686843872 1 ) )
( ( -306 -72 149 2.999999761581421 0 ) ( -306 0 149 2.999999761581421 0.5 ) ( -306 72 149 2.999999761581421 1 ) )
( ( -306 -72 147 3.14285683631897 0 ) ( -306 0 147 3.14285683631897 0.5 ) ( -306 72 147 3.14285683631897 1 ) )
( ( -306 -72 145 3.285713911056519 0 ) ( -306 0 145 3.285713911056519 0.5 ) ( -306 72 145 3.285713911056519 1 ) )
( ( -304 -72 145 3.428570985794067 0 ) ( -304 0 145 3.428570985794067 0.5 ) ( -304 72 145 3.428570985794067 1 ) )
( ( -299 -72 145 3.571428060531616 0 ) ( -299 0 145 3.571428060531616 0.5 ) ( -299 72 145 3.571428060531616 1 ) )
( ( -292 -72 145 3.714285135269165 0 ) ( -292 0 145 3.714285135269165 0.5 ) ( -292 72 145 3.714285135269165 1 ) )
( ( -290 -72 145 3.857142210006714 0 ) ( -290 0 145 3.857142210006714 0.5 ) ( -290 72 145 3.857142210006714 1 ) )
( ( -290 -72 143 3.999999284744263 0 ) ( -290 0 143 3.999999284744263 0.5 ) ( -290 72 143 3.999999284744263 1 ) )
( ( -290 -72 141 4.142856597900391 0 ) ( -290 0 141 4.142856597900391 0.5 ) ( -290 72 141 4.142856597900391 1 ) )
( ( -290 -72 139 4.285713672637939 0 ) ( -290 0 139 4.285713672637939 0.5 ) ( -290 72 139 4.285713672637939 1 ) )
( ( -290 -72 137 4.428570747375488 0 ) ( -290 0 137 4.428570747375488 0.5 ) ( -290 72 137 4.428570747375488 1 ) )
( ( -288 -72 137 4.571427822113037 0 ) ( -288 0 137 4.571427822113037 0.5 ) ( -288 72 137 4.571427822113037 1 ) )
( ( -283 -72 137 4.714284896850586 0 ) ( -283 0 137 4.714284896850586 0.5 ) ( -283 72 137 4.714284896850586 1 ) )
( ( -276 -72 137 4.857141971588135 0 ) ( -276 0 137 4.857141971588135 0.5 ) ( -276 72 137 4.857141971588135 1 ) )
( ( -274 -72 137 4.999999046325684 0 ) ( -274 0 137 4.999999046325684 0.5 ) ( -274 72 137 4.999999046325684 1 ) )
( ( -274 -72 135 5.142856121063232 0 ) ( -274 0 135 5.142856121063232 0.5 ) ( -274 72 135 5.142856121063232 1 ) )
( ( -274 -72 133 5.285713195800781 0 ) ( -274 0 133 5.285713195800781 0.5 ) ( -274 72 133 5.285713195800781 1 ) )
( ( -274 -72 131 5.42857027053833 0 ) ( -274 0 131 5.42857027053833 0.5 ) ( -274 72 131 5.42857027053833 1 ) )
( ( -274 -72 129 5.571427345275879 0 ) ( -274 0 129 5.571427345275879 0.5 ) ( -274 72 129 5.571427345275879 1 ) )
( ( -272 -72 129 5.714284420013428 0 ) ( -272 0 129 5.714284420013428 0.5 ) ( -272 72 129 5.714284420013428 1 ) )
( ( -267 -72 129 5.857141494750977 0 ) ( -267 0 129 5.857141494750977 0.5 ) ( -267 72 129 5.857141494750977 1 ) )
( ( -260 -72 129 5.999998569488525 0 ) ( -260 0 129 5.999998569488525 0.5 ) ( -260 72 129 5.999998569488525 1 ) )
( ( -258 -72 129 6.142855644226074 0 ) ( -258 0 129 6.142855644226074 0.5 ) ( -258 72 129 6.142855644226074 1 ) )
( ( -258 -72 127 6.285712718963623 0 ) ( -258 0 127 6.285712718963623 0.5 ) ( -258 72 127 6.285712718963623 1 ) )
( ( -258 -72 125 6.428569793701172 0 ) ( -258 0 125 6.428569793701172 0.5 ) ( -258 72 125 6.428569793701172 1 ) )
( ( -258 -72 123 6.571426868438721 0 ) ( -258 0 123 6.571426868438721 0.5 ) ( -258 72 123 6.571426868438721 1 ) )
( ( -258 -72 121 6.71428394317627 0 ) ( -258 0 121 6.71428394317627 0.5 ) ( -258 72 121 6.71428394317627 1 ) )
( ( -256 -72 121 6.857141017913818 0 ) ( -256 0 121 6.857141017913818 0.5 ) ( -256 72 121 6.857141017913818 1 ) )
( ( -251 -72 121 6.999998092651367 0 ) ( -251 0 121 6.999998092651367 0.5 ) ( -251 72 121 6.999998092651367 1 ) )
( ( -244 -72 121 7.142855167388916 0 ) ( -244 0 121 7.142855167388916 0.5 ) ( -244 72 121 7.142855167388916 1 ) )
( ( -242 -72 121 7.285712242126465 0 ) ( -242 0 121 7.285712242126465 0.5 ) ( -242 72 121 7.285712242126465 1 ) )
( ( -242 -72 119 7.428569316864014 0 ) ( -242 0 119 7.428569316864014 0.5 ) ( -242 72 119 7.428569316864014 1 ) )
( ( -242 -72 117 7.571426391601562 0 ) ( -242 0 117 7.571426391601562 0.5 ) ( -242 72 117 7.571426391601562 1 ) )
( ( -242 -72 115 7.714283466339111 0 ) ( -242 0 115 7.714283466339111 0.5 ) ( -242 72 115 7.714283466339111 1 ) )
( ( -242 -72 113 7.85714054107666 0 ) ( -242 0 113 7.85714054107666 0.5 ) ( -242 72 113 7.85714054107666 1 ) )
( ( -240 -72 113 7.999997615814209 0 ) ( -240 0 113 7.999997615814209 0.5 ) ( -240 72 113 7.999997615814209 1 ) )
)
}
}
}

 

This is what it looks in the editor:

584709019_Screenshot(7).thumb.png.af7a88ad7aa41b27bb9608a31b9d417c.png

 

So I use the Append 2 columns to the end, and then do that again. This give me 4 more columns to use to go down the next step.
So step 1 would be to append 2 columns to the end:

IkSASg3.png

Then do it again:

rnYBnhb.png

Then move the last 3 to form the curve:

Dw1avI7.png

Then rinse and repeat for the down slope then back again.

Is there a way to tell patch creation to follow brushes?

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

This would seem like a case for the recently implemented tool for merging patches - do 1 step manually, clone it down the staircase and merge them all.

Those are a lot of tris, though, especially for such small corners.

  • Thanks 1
Link to comment
Share on other sites

Looks great in game though.

WXQf8YP.jpg

 

I'll try the merge patches, forgot about that. Would be nice though to select some geometry like the stairs, then just press a Mark Carpet button :P

 

 

  • Like 2

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

Sort of related, but I wish we had a simple stair tool to work with. Building stairs is incredible tedious even without carpet!

Im not sure how it would work, potentially drawing a brush in DR and hitting "convert to stairs" and you punch in the height and  direction? Maybe a "build with patches" feature as well?

Ignore the brushes that descend all the way to the floor. (Unless its possible to have it do that as well)

Capture3.thumb.JPG.36b0ef86da5d2d54a12879606fe77149.JPG

With a stair "thickness" setting could get designs like this:

height = 12
thickness = 4

Capture2.thumb.JPG.35f38a8210379a05f0288ae76a9f157f.JPG

Bonus feature if you could pick a nodraw surface that auto built around itCapture4.thumb.JPG.6a3af77cac46d92255a133e09f9a6a02.JPG
 

Anyhow, something to consider if anyone is up for it. Would save some time on the mapping end of things for sure. 

Link to comment
Share on other sites

23 minutes ago, kingsal said:

Sort of related, but I wish we had a simple stair tool to work with. Building stairs is incredible tedious even without carpet!

Hm, yes. Drawing out a brush and then cutting it up into N steps with a defined height might be something that is feasable for a machine. Maybe it could even be done with a Python script, I think DR has all the functions available in the scripting API. It can only be a basic scenario that's covered by the code, I assume that any machine-generated result will never be something one can be happy with immediately.

Link to comment
Share on other sites

21 hours ago, greebo said:

Hm, yes. Drawing out a brush and then cutting it up into N steps with a defined height might be something that is feasable for a machine. Maybe it could even be done with a Python script, I think DR has all the functions available in the scripting API. It can only be a basic scenario that's covered by the code, I assume that any machine-generated result will never be something one can be happy with immediately.

This sounds like something I could knock out in an evening or two using a Python script.  I've got no decent blocks of free time at the moment, but if nobody beats me to it I'll give it a go sometime.

I've also been thinking of a script that would work something like the blender "array" modifier for easy duplication+offset of your selection, optionally combining the result.  That might make the carpet placement a little faster once you drew one step's worth.

  • Like 4
Link to comment
Share on other sites

1 hour ago, jonri said:

This sounds like something I could knock out in an evening or two using a Python script.  I've got no decent blocks of free time at the moment, but if nobody beats me to it I'll give it a go sometime.

That'd be awesome!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...