Create .vtex from .tga/.png/.mks for the Particle Editor

I wrote a wiki page on how to use custom sprites in the particle editor.

However, this process requires you to open a text editor to create your own .vtex file. And you have to do this for all the sprites you want to use.

My suggestion is:
Add a button where we can select a .png, .tga or .mks file, and then the .vtex file is created for us, in the same folder as our original .png,.tga or .mks file.

People could easily write script which converts all .png, .tga or .mks files in a folder, but it would be nice to have as a part of the development tools.

I’d vote, but, you know…

I don’t see why this shouldn’t be done, Layla already did something similar for making materials without opening the material editor, which is still inside the modding tools.

Logically there should be a way to make sprites without leaving the modding tools as well, I mean… really? Opening a text editor? That’s kinda laaame source 2… what are you, source 1?

1 Like

IIRC, sbox will file watch for all kinds of source files like images, models, etc and automatically compile them into their necessary sbox counterparts instantly whenever you modify them

.png and .tga can be used raw for materials, but for particles you need to make a .vtex file which references them. It would be a waste to just convert all .png and .tga files to .vtex if they’re not going to be used for particles.

Ah, gotcha.
Hopefully theres an easy way for sbox to distinguish the purpose of an image based on directory or by parsing other files so it knows what kind of compiled version the dev expects

1 Like

Or you know, right-click and let the user decide.