Shader Editor

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
xiripiti
Posts: 100
Joined: Tue Jul 09, 2013 3:16 pm

Shader Editor

Post by xiripiti »

I used Q3ASE for a long time to create my shaders. What a usefull tool it was. At that time my OS was Windows Vista.
Recently I changed to Windows 10 and he stopped work... and I know that the author makes no more updates.
So anyone knows how to make it work on W10 or if exists some other shader editor?
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Shader Editor

Post by obsidian »

I’m not aware of any problems, but maybe try running it with compatibility mode?
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
xiripiti
Posts: 100
Joined: Tue Jul 09, 2013 3:16 pm

Re: Shader Editor

Post by xiripiti »

I did...every one possible :cry:
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Shader Editor

Post by obsidian »

Not sure.. must be localized to your computer. I just ran it here on Windows 10, works fine for me. I didn't even have to run it with compatibility mode, it just worked natively. OS and drivers up to date?
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: Shader Editor

Post by CZghost »

That's maybe the point. Drivers up to date may not be supported by an outdated version of a program (simply dependent by calling a function that no longer exists - or is moved). I think that to make up to date Shader Editor, a new one may be created (or ask author for source code)...
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
Fruity
Posts: 71
Joined: Wed Jun 26, 2019 11:11 pm

Re: Shader Editor

Post by Fruity »

Hello
Does anyone know how to fix Q3ASE error?
Windows 7 64bit (on the WinXP 32bit virtual machine the same error occurs), in the folder I have 4 files maybe something is missing? : - /.

"Microsoft Visual C ++ 2005 Redistributable" and the rest I have installed.
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: Shader Editor

Post by CZghost »

I dunno. Personally, I didn't use it much, I always typed the shaders by hand and tested them out in game rather than in that editor. But I guess that I'll make my own editor (required to be installed, obviously), with OpenGL renderer similar to that one from Quake 3. I'll release it for free to everyone under GPL v3.0 licence, obviously...
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
Fruity
Posts: 71
Joined: Wed Jun 26, 2019 11:11 pm

Re: Shader Editor

Post by Fruity »

OK I understand.

But how to create some "shader" not see how it looks in the game? : - /

I know, you can learn what parameters they do, I don't quite understand it (how it mixes with each other, so that the intended effect comes out).

Something like opening a ".map" file in a notebook and creating a map. :-) (it's almost like programming -: D)

I'm trying to figure it out somehow, considering that recently on some map I noticed that the usual "JPG" texture is a nicely levitating light effect, I thought with transparency only works in "TGA" with the "alpha" channel. : - /
Fruity
Posts: 71
Joined: Wed Jun 26, 2019 11:11 pm

Re: Shader Editor

Post by Fruity »

...| My english is low, they can be typos
User avatar
Eraser
Posts: 19164
Joined: Fri Dec 01, 2000 8:00 am

Re: Shader Editor

Post by Eraser »

Here's the Quake 3 shader manual:
http://q3map2.robotrenegade.com/docs/sh ... tents.html

It explains everything you need to know about shaders.
sst13
Posts: 298
Joined: Mon Feb 15, 2010 11:05 pm

Re: Shader Editor

Post by sst13 »

I have the same problem with Q3ASE. It worked fine until i had to change my broken graphics card.
Same system, same OS but now Q3ASE gets terminated by windows during the program start.

I can only run older versions like v1.2.1 or 1.3 in windows safe mode. But thats not really an option.

old graphics card: nvidia GTX-560-Ti
New one: GTX-1050 (Q3ASE won't start anymore)

R.I.P. Q3ASE :(
[url=https://sst13.de]Q3A Maps - by sst13[/url]
[url=https://steamcommunity.com/id/_sst13_/myworkshopfiles]Quake Live Workshop[/url]
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: Shader Editor

Post by CZghost »

@SzczurMr:
First of all, no need to be ashamed of being bad at language knowledge. As I am aware of, I'm not a native English speaker, my mother tongue is Czech, so I understand your difficulties, I have gone through that, too.

Second of all, there's no reason to feel sorry to admit reasonable lack of knowledge in certain fields. Like shader scripting is really very technical field and especially the blend modes are easier to understand for programmers.

Like obsidian said, for full info on how Quake 3 shaders work, go to the websites he linked. I'll only add some technical informations. If you were programmer, I'd tell you to look at the shader as a procedural program code. Because it basically is. Shader is program code that tells how to render certain texture parts. Stages are stacked on top of the previous ones, while the program is read from top to bottom, so you can imagine the stages as layers like you know from Photoshop, but the topmost stage is actually the very bottom layer (the order of layers is flipped). This is actually info you can read in the documentations. What you can't read out from the documentation, is how the blend modes actually work. Quake 3 Arena uses OpenGL render engine, so naturally shaders use OpenGL blending mode instructions.

Like you can read in linked websites, blend mode consists of two parts: Blending mode of the source picture and right after that blending mode of the destination picture. This is the equation that the engine uses to compute the image data (lifted from Robot Renegades, courtesy of obsidian, websites author):

Code: Select all

[source * (srcBlend)] + [destination * (dstBlend)]
Source blends are as follows:
  • GL_ONE: Hardcoded value 1 (full pixel intesity; all color data are normalised). When multiplied with color data, they stay the same
  • GL_ZERO: Hardcoded value 0 (no pixel intensity). When multiplied with color data, they are nulled
  • GL_DST_COLOR: Current value of picture buffer (previous stages also affect that value).
  • GL_ONE_MINUS_DST_COLOR: Basically inverted value of picture buffer (this is actually value 1 - GL_DST_COLOR => remember, all values are normalised; subtracting the data value from 1 makes a negative filter of the image data - like when you shoot with and old camera to film strip)
  • GL_SRC_ALPHA: Alpha channel of the source value
  • GL_ONE_MINUS_SRC_ALPHA: Same as GL_SRC_ALPHA, but inverted. Again, simple math of subtracting from 1 inverts the image color data
Destination blends are as follows:
  • GL_ONE: Same as in source blend
  • GL_ZERO: Same as in source blend
  • GL_SRC_COLOR: Source color value. Do I really need to tell more? This is the texture color data
  • GL_ONE_MINUS_SRC_COLOR: Inversion of the source color value. Again, simple math. Subtract a normalised value from 1 and you get the inverted value.
  • GL_SRC_ALPHA: Same as in source blend
  • GL_ONE_MINUS_SRC_ALPHA: Same as in source blend. Here I have to make a note for obsidian: This portion is kind of attached to the previous node, which I believe is a bug. Can you correct it, please?
There are simplified named blend modes to be used in shaders. They are really just shortcuts to certain full blend modes, commonly used, their list is as follows:
  • add: GL_ONE GL_ONE => This blend mode will make the texture translucent. It works as a black matte remover, preserves only white, which makes the texture brighter on brighter surfaces. On a completely white surface, this texture will be invisible. An equvalent to Photoshop's Linear Dodge blend mode.
  • filter: GL_ZERO GL_SRC_COLOR => This blend mode will also make the texture translucent. It works on the other hand as white matte remover, preserves only black, which makes the texture on the other hand darker on darker surfaces. On a completely black surface, this texture will become inisible. An equivalent to Photoshop's Linear Burn blend mode.
  • blend: GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA => This blend mode will use the texture's alpha channel to blend it with the background. It's an equivalent to using a mask on an opaque layer in Photoshop or using layer with alpha channel baked in the color data
It's very good to look at the equation and try to figure out how the result will look. It won't be very bad to get experimenting. Prepare some textures to use in a simple box map, and some textures to use in a test shader. That box map won't be public, it's just for your test purposes. When compiling, don't perform a full compile, perform only BSP compile to compile the geometry. Vis data are not really needed, because it's a box map and it will be full vis anyway. Also, there's no need for lighting, because you need to focus on the shader. For that reason, the testing shader won't need a lightmap stage.

I'd suggest you to create one texture (shaderless) for the box to enclose playable area (yes, even that is playable area), so the map doesn't get leaked and the box is clearly visible. A simple checkerboard is very good to use. I don't suggest you to use pure monochromatic black&white checkerboard, because that will be harsh for eyes. Use a slightly darker gray on a slightly lighter gray (but still visible). And a testing texture to be used for the shader experimenting.

I might create one that map for you (including a source map file with a compiled bsp file and required assets to be used). Just tell me and I'll send one for you.

For example, GL_DST_COLOR GL_SRC_COLOR has an effect of something between add and filter, I'd say it's an equivalent to Photoshop's Hard Light blend mode (slightly stronger than Overlay, but still weak enough to be easy for eyes, unlike Vivid Light). And yes, I tested that myself, it really works.

GL_ONE_MINUS_SRC_ALPHA GL_SRC_ALPHA will have an exact oposite effect of blend. It basically inverts the alpha channel (it's like performing an invert action on the alpha channel).

As you may have figured out, there are many more possible blend modes that might work for you. Each card is different and each card can produce different results. However, the effects are still the same. Feel free to experiment ;)

As for a shader editor that would work on Windows 10 with current GPUs on trade, I do not promise anything, but I was kind of thinking of creating my own shader editor, however never really got into it. Since original Q3ASE is having issues with modern systems, I guess it's really time to start thinking of making the thought true as a working shader editor may be actually demanded by many map makers :)

Whoever wants to join the project and contribute, just write me and I'll create a project team on GitHub and send invite for you. The only requirement is to have a GitHub account.
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: Shader Editor

Post by CZghost »

Okay, so I created a new repository under team name "CZghost Development" (icon is identical to one used on Discord server and YouTube channel).
https://github.com/CZghost-Development/Shader-Editor

Whoever wants to join the team, just write me and I'll send you an invite. The only requirement is to have GitHub account. Write me your username on GitHub.
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
Fruity
Posts: 71
Joined: Wed Jun 26, 2019 11:11 pm

Re: Shader Editor

Post by Fruity »

I wasn't a programmer :-( but I tried to write applications for the android platform, but without any major effects. I once looked at this list of variables "q3map2" but I didn't really understand it, it meant it was well explained, everything seemed simple, adding parameters correctly. Thank you "@CZghost" for the detailed explanation, I'm starting to understand it a bit. It can't do without practical tests :-). As for sending the map, I will gladly see what it looks like and how it looks :-) Thanks for describing these details.
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: Shader Editor

Post by CZghost »

Update: the shader editor repository was renamed to GtkShaderEd:
https://github.com/CZghost-Development/GtkShaderEd

Yes, I took inspiration from GtkRadiant, and yes, it will use GTK+ library and will be cross-platform. Developed in Visual Studio for both Windows and Unix-like OS (Mac and Linux).
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
User avatar
Eraser
Posts: 19164
Joined: Fri Dec 01, 2000 8:00 am

Re: Shader Editor

Post by Eraser »

Calling it now: the first commit will never come
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: Shader Editor

Post by CZghost »

Eraser wrote:Calling it now: the first commit will never come
Well, I do not have much time to do first actual commit to the shader editor repository yet. Ya know, school stuff. I have Discord bots to be done, make them hosted on Raspberry Pi (which I do not have yet), and of course finish the Schöna map. It takes waaaaay too long and I really need to finish it. But school is important and I cannot ditch school stuff because of that. Personally, I do not need a special shader editor, Sublime Text is perfectly fine for me. But I asked myself: "If you do not need it, who could?" And I answered myself immediately: "Anyone". I have a choice: ditch it and just wait till someone makes it, or do not wait and make it myself. In free time, of course. As I said, I need to finish the map Schöna, finish the Discord bots I am making, school stuff, in addition to that shader editor, so way too much stuff to work on. It won't be easy.
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
User avatar
Eraser
Posts: 19164
Joined: Fri Dec 01, 2000 8:00 am

Re: Shader Editor

Post by Eraser »

Instead of "sort of" committing yourself to new projects all the time, finish one and only move on to the next when the old project is done.
Right now you're only giving people (well, one person) hope a new shader editor is coming. It's not coming, ever, I know you well enough to know that.

Actually finishing things is a skill. It requires perseverance and discipline. It's better to do one thing well than to do three things in a half assed manner. It's a life lesson, it truly is.

I know you actually mean well, but it's important to be able to reflect upon yourself and see that some ideas aren't the best ones. And really, it may sound harsh, but there really isn't a demand for a idTech3 shader editor. Anyone that is stubbornly sticking to idTech3 right now is most likely experienced enough to write shaders by hand.
fKd
Posts: 2478
Joined: Sat Jun 03, 2006 2:54 am
Location: Wellington
Contact:

Re: Shader Editor

Post by fKd »

war, war never changes... :olo:
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: Shader Editor

Post by CZghost »

Eraser wrote:Instead of "sort of" committing yourself to new projects all the time, finish one and only move on to the next when the old project is done.
Right now you're only giving people (well, one person) hope a new shader editor is coming. It's not coming, ever, I know you well enough to know that.

Actually finishing things is a skill. It requires perseverance and discipline. It's better to do one thing well than to do three things in a half assed manner. It's a life lesson, it truly is.

I know you actually mean well, but it's important to be able to reflect upon yourself and see that some ideas aren't the best ones. And really, it may sound harsh, but there really isn't a demand for a idTech3 shader editor. Anyone that is stubbornly sticking to idTech3 right now is most likely experienced enough to write shaders by hand.
Yeah, I never said anything bad or something that may sound like I doubt you mean well with your advices. Basically, you just said the exactly same thing as I did. I know that what I started is taking too long. And of course I need to finish things as soon as possible. Being it made for someone and had a deadline, I have failed miserably looong time ago. However, I can only work with that in free time. Currently, that free time is really small. School stuff is really important and now that I am in second year of study, I'll have much more work than before.

As with being able to write shaders on my own - I am. But there are some newcomers and some that are really inexperienced or do not truly understand shaders well enough to be able to write them on their own, partially because they never learned programming. I did and such as I was able to learn more about procedural scripting, which shaders basically are - a procedural script programs that modify texture render on fly. So I was able to ditch the original shader editor that worked so well since I already knew how it works and I was able to imagine the outcome of the shader.

I'm not doing it for myself. I'm doing it for the others. If there is no demand, I am creating it. Once there is something to offer,, something good, people will want it, right? I promise nothing and you can clearly see that I am actually seeking help so bad that I even created team on GitHub. Whoever wants to join, he's free to do so. I'll create first commit with new Visual Studio solution and new projects. I also installed GNU Linux Ubuntu to WSL (Windows Subsystem for Linux), so I could make cross-platform apps on Windows. I just don't know how I could make it for Mac, since it uses different code base than Linux, though the Unix core is the same.
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
Fruity
Posts: 71
Joined: Wed Jun 26, 2019 11:11 pm

Re: Shader Editor

Post by Fruity »

The test map is already done and the paths are probably correct, it's time to start testing my "shader" file.

In the future I will need the effect of rain, fog, light rays (any) and something that covers the walls.

Edit:
I would forget.
Still the effect of visible current (voltage) or something similar.
Last edited by Fruity on Tue Sep 17, 2019 7:11 pm, edited 1 time in total.
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: Shader Editor

Post by CZghost »

Yeah, those effects are really nice addition to maps :)
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
Fruity
Posts: 71
Joined: Wed Jun 26, 2019 11:11 pm

Re: Shader Editor

Post by Fruity »

Does this picture about shaders really say anything or is it not true?
sst13
Posts: 298
Joined: Mon Feb 15, 2010 11:05 pm

Re: Shader Editor

Post by sst13 »

It's a nice demo of all possible blendfunc combinations between 2 shader stages.
[url=https://sst13.de]Q3A Maps - by sst13[/url]
[url=https://steamcommunity.com/id/_sst13_/myworkshopfiles]Quake Live Workshop[/url]
Fruity
Posts: 71
Joined: Wed Jun 26, 2019 11:11 pm

Re: Shader Editor

Post by Fruity »

After recent problems with the virtual machine (VirtualBox), I switched to (VMware), and it was a good decision, everything works beautifully, more sophisticated machine software. I started the "Q3ASE" program and eureka, it works, version Q3ASE 1.5.3 and 1.5.2 work (that is, I don't know if it works correctly, but the windows have started). All in all, I don't need it anymore, I try to write "shaders" manually and check it more. Each machine uses a different graphics driver, maybe there was a problem here (which is also a bit strange: - /). The system on the machine is "Windows XP 32Bit" after a few updates and installing "Net Framework" and "Visual C ++ ..."
Post Reply