Xonotic Forums

Full Version: Help, how I create a new texture for mapping?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have created new textures seamless for mapping use, but I don't know how to make them working properly. Any help? I know that they should be scripted by .shader files and DP uses compatible quake shaders (Actually I'm not sure about this), but I don't know how create it and what write inside... Should I have knowledge about programming to make them (quakec, opengl, cg, etc)? Exists a guide made exactly for xonotic for newbie or dummies? Thanks
I don't know about this, but I put new textures in the same place as other textures, that is, in the data / data / textures / yourtextores folder.  Also if you want to create a category : abc_textures.  You don't need to write anything in the code.  I think I helped you.
Thanks Kotangens, the problem is that, if I want to distribute these textures or my maps use these textures, but others no, the textures are not usable or visible inside the map by other people, so I would to know how to insert in the map, and how to script their shader file
(09-10-2020, 04:46 AM)derrant Wrote: [ -> ]Thanks Kotangens, the problem is that, if I want to distribute these textures or my maps use these textures, but others no, the textures are not usable or visible inside the map by other people, so I would to know how to insert in the map, and how to script their shader file

Try to do it like the screenshots. Tip: You can create a separate file for the map.

Pack only the contents of the folder!
You can find a manual on how to write shaders here:
http://q3map2.robotrenegade.com/docs/shader_manual/

In my opinion, you should always try to seperate content into pk3dirs. If you want to create textures specifically for one map, put the shaders and textures into the same pk3dir as your map (setup as described in https://gitlab.com/xonotic/xonotic/-/wik...-map-setup). If you want to create a texture pack that others can use for their maps, create a pk3dir with a "scripts" and a "textures" subfolder. One problem is that Darkplaces has no way of handling dependencies for custom content. This means that every server admin who uses a map with those textures has to add the texture pack to their list of serverpackages as otherwise players might end with missing textures. (This problem should be solved once we finish moving engine from Darkplaces to Daemon)
(09-10-2020, 07:50 AM)Kotangens Wrote: [ -> ]
(09-10-2020, 04:46 AM)derrant Wrote: [ -> ]Thanks Kotangens, the problem is that, if I want to distribute these textures or my maps use these textures, but others no, the textures are not usable or visible inside the map by other people, so I would to know how to insert in the map, and how to script their shader file

Try to do it like the screenshots. Tip: You can create a separate file for the map.

Pack only the contents of the folder!

okay, I will do this, thanks for the tips
(09-10-2020, 09:34 AM)Freddy Wrote: [ -> ]You can find a manual on how to write shaders here:
http://q3map2.robotrenegade.com/docs/shader_manual/

In my opinion, you should always try to seperate content into pk3dirs. If you want to create textures specifically for one map, put the shaders and textures into the same pk3dir as your map (setup as described in https://gitlab.com/xonotic/xonotic/-/wik...-map-setup). If you want to create a texture pack that others can use for their maps, create a pk3dir with a "scripts" and a "textures" subfolder. One problem is that Darkplaces has no way of handling dependencies for custom content. This means that every server admin who uses a map with those textures has to add the texture pack to their list of serverpackages as otherwise players might end with missing textures. (This problem should be solved once we finish moving engine from Darkplaces to Daemon)
Oh very thanks, I'll read this, you made me all the more sure now.
How can i create a mine texture pack?
Please don't post the same question in multiple threads. Deleting the other posts of yours.
In order to distribute your content, such as maps, textures or shaders, you simply have to put it in a zip file which you then rename to .pk3 instead of .zip. This zip archive has to have the data/ directory as the root directory and it also needs to be in the data directory of any server to be available to that server (and then this server automatically distributes the pk3 files it has to the clients when required). If you put files into a pk3 file that are also contained in other pk3 files, then the file that is furthest down the alphabet takes precedence, and files in the Xonotic user directory take precedence over files in the engine path (install) directory. You can also just create a folder with the extension .pk3dir (instead of a zip file .pk3) which functions in exactly the same way (but I don't think it will be downloadable by clients). If you don't know where to put your assets inside the data/ directory, then have a look at the contents of the pk3 files that came with the game. It is easy to see that maps go in the folder maps/ or textures in the folder textures/. Of course in turn for these to be loaded inside the game, they have to have been used by mappers or modders (or the Xonotic creators) first.


There is nothing more to it. It is that simple. You can't create e.g. asset packs that are centrally distributed in repositories or anything like that. There basically is only this forum to post stuff to and then the Gitlab repository for Xonotic itself.


Hint: Shaderfiles will not be loaded by Netradiant unless they are mentioned in the shaderlist.txt file. I believe that is not true to the game itself.