Skip to content

cli: expose distancealpha#57

Open
partyvan wants to merge 2 commits into
craftablescience:manefrom
partyvan:distancealpha-2026
Open

cli: expose distancealpha#57
partyvan wants to merge 2 commits into
craftablescience:manefrom
partyvan:distancealpha-2026

Conversation

@partyvan
Copy link
Copy Markdown

@partyvan partyvan commented May 18, 2026

this won't build in ci until the version of sourcepp updates (also submodule->fetchcontent when), but putting it out here for scrutiny

@partyvan partyvan force-pushed the distancealpha-2026 branch from 5474689 to 541ef20 Compare May 18, 2026 14:03
@partyvan
Copy link
Copy Markdown
Author

partyvan commented May 19, 2026

some notes:

  • starting to expose edge in create cli just because distance stuff needs it, but it may be useful in future to extend it to pass explicit edge policy into all resize operations done by the program
  • VTF::create(filepath,...) appears to support automagically grabbing frames from gif/apng/etc which is wicked cool, but reimplementing a library feature in the tool feels gross, so currently, createPossiblyDistanceMappedVTF does not have full parity at its call site if distance mapping is enabled (vanilla case still passes through to the original function so thats fine); i compromised by just adding, for now, a possibly-distance-mapping replacement for setImage in the flat-animation-from-numbered-filenames case. even if it's limited for now, being the first source texture tool capable of generating animated distance maps is gonna be neat!!
    • the easiest option i see to make this cleaner would be variants of VTF::create that accept a callback operating on image data. that way we could get animated distance maps from apngs as well :D not to mention any other post-processing that library users may wish to account for
      • this may in turn call for the library to start using a lightweight image data representation that carries dimensions alongside data to remedy the pervasive outparam game of telephone

@partyvan partyvan force-pushed the distancealpha-2026 branch 2 times, most recently from 2e3beb6 to 1022c24 Compare May 19, 2026 08:32
@partyvan partyvan marked this pull request as ready for review May 19, 2026 08:33
@partyvan
Copy link
Copy Markdown
Author

seems stable after a bunch of local usage; rebased onto a module bump so it builds here

@partyvan
Copy link
Copy Markdown
Author

occurs to me that it probably actually needs craftablescience/sourcepp@aa9558d in order for pipelines to run (this was actually the motivating example behind that patch moreso than building the library itself)

also crosslink bookkeeping
supersedes: #25
addresses: #19

@craftablescience craftablescience linked an issue May 27, 2026 that may be closed by this pull request
@craftablescience craftablescience added the enhancement New feature or request label May 27, 2026
@partyvan partyvan force-pushed the distancealpha-2026 branch from 5451a30 to 4202015 Compare May 28, 2026 19:44
@partyvan
Copy link
Copy Markdown
Author

rebased onto mane & resolved conflicts

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

Successfully merging this pull request may close these issues.

create: generate distance fields for $distancealpha

2 participants