Quake3World.com Forums
     Level Editing & Modeling
        Shader Editor


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Re: Shader Editor

Grunt
Grunt
Joined: 26 Jun 2019
Posts: 71
PostPosted: 02-08-2022 02:13 PM           Profile Send private message  E-mail  Edit post Reply with quote


In practice, I just found out that any change to the shader file requires a BSP recompilation. In general, half of my previous problems stemmed from this aspect :-/. Since the shader file is not injected into the .bsp file, but is located separately in the scripts directory, why can't you just edit the shader file without recompiling the BSP?
I thought that after entering the map in the game, the shader file is loaded from the scripts directory into the code in the game world every time.
In any case, I already know why I didn't have any changes after saving.

I once read in the documentation that one side / face of a brush (texture + shader) can physically affect the entire brush and I wonder if there can be collisions in the entire brush if 5 sides / face is "nodraw" and 6 side / face with different texture + shader?
For example, if we would like to make the player only go one way through the center of the brush without being able to return when he crosses the boundaries and runs through the entire brush. I once saw a trick like this on one map.




Top
                 

Insane Quaker
Insane Quaker
Joined: 15 Feb 2010
Posts: 298
PostPosted: 02-08-2022 04:35 PM           Profile Send private message  E-mail  Edit post Reply with quote


Of course you can edit the shader without compiling the map again and again.
But some changes needs recompiling. Changes that affect the geometry/clipping, the light, or the VIS.

Watch out for stuff like:
lighting (surfacelight, light-color, light-subdivision, transparency)
collision (clipping, brush properties)

For example: (red = needs recompile - green = no recompile)

textures/13hell/tele_beam
{
qer_editorimage textures/13hell/ql_lavabeam.tga
q3map_lightimage textures/sfx/demonltblackfinal_glow2.tga
q3map_surfacelight 100
surfaceparm nolightmap
surfaceparm nomarks
surfaceparm nonsolid
surfaceparm trans
cull disable
nopicmip
qer_trans 0.6
{
map textures/13hell/ql_lavabeam.tga
blendfunc add
rgbGen wave sin 0.8 0.2 0 4
tcMod scroll 0.3 0

}
{
map textures/sfx/zap_scroll2.tga
blendfunc add
rgbGen wave inversesawtooth -0.2 0.7 0.25 1
tcMod scale 0.0625 1
tcMod scroll 2 1

}
{
map textures/sfx/zap_scroll2.tga
blendfunc add
rgbGen wave inversesawtooth -0.2 0.7 0.75 1
tcMod scale 0.0625 -1
tcMod scroll 2 -1

}
}



If you apply multiple shaders with different brush-properties on a single brush, then the "first face" of the the brush will set the properties for the entire brush, ignoring all the other ones. You can take a look in the *.map file to find out which is the first face. But this is a bad idea because this can change when you edit the brush later. Or maybe even by saving the map.
So always use shaders with the same properties on a single brush.

If you want to create a one sided clipping, just use a simple-patch-mesh with playclip shader. You can pass thru from behind, but get blocked in the front.



_________________
Q3A Maps - by sst13
Quake Live Workshop


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 02-09-2022 11:06 AM           Profile Send private message  E-mail  Edit post Reply with quote


The game reads the shader files at load time, but Q3Map2 also reads the shader file during compiles. Both programs read different parts of the shader so that they know what to do with the surface.

For example, when Q3Map2 is calculating lightmaps, it needs to know information about surfacelight values, but it does not need to know if the texture is flickering. The game engine doesn't need to read surfacelight values since those have already been pre-calculated, but it does need to know what to do with the texture.

Changes to Q3Map_ and shaderparm directives will generally all require a recompile since you're changing some of the physical characteristics of the shader surface. If you're just changing something like stage directives, you're only changing the appearance and it does not require a recompile.

Mixing volumetric properties of brushes is a bad idea. It's completely unpredictable. A brush can't be solid and non-solid at the same time, Q3Map2 will pick the first face of the brush, (which may be random, and may change at any time) and apply that to the entire brush.

Quote:
For example, if we would like to make the player only go one way through the center of the brush without being able to return when he crosses the boundaries and runs through the entire brush. I once saw a trick like this on one map.


That is likely a trick with using a patchmesh, and using it as a one-way surface.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1922
PostPosted: 02-25-2022 10:09 AM           Profile   Send private message  E-mail  Edit post Reply with quote


Eraser wrote:
Hey CZghost, how's that shader editor coming along?

I am too busy with work and school, so sorry to disappoit you (yet again). I am a man of my word, I haven't forgotten, I just lack any particular time to do it. I never said when it is going to be. Could be in couple of years, maybe longer. I really have hardly any time to do it.



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 02-27-2022 09:00 PM           Profile Send private message  E-mail  Edit post Reply with quote


If you think that's bad, just wait until you have kids.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 44131
PostPosted: 02-28-2022 12:41 AM           Profile   Send private message  E-mail  Edit post Reply with quote


lol yes.
Having said that though, I built all of EntityPlus, 11 or so maps, q3spenhanced, an entire videogame, a complete MotoGP prediction game website and much more while having a full time job and 3 kids :shrug:




Top
                 

Grunt
Grunt
Joined: 26 Jun 2019
Posts: 71
PostPosted: 02-28-2022 05:00 AM           Profile Send private message  E-mail  Edit post Reply with quote


It all depends on everything :-|




Top
                 

This is not Æon!
This is not Æon!
Joined: 20 Jan 2002
Posts: 2222
PostPosted: 03-09-2022 03:52 AM           Profile Send private message  E-mail  Edit post Reply with quote


CZghost wrote:
Eraser wrote:
Hey CZghost, how's that shader editor coming along?

I am too busy with work and school, so sorry to disappoit you (yet again). I am a man of my word, I haven't forgotten, I just lack any particular time to do it. I never said when it is going to be. Could be in couple of years, maybe longer. I really have hardly any time to do it.


How long you been in school now czGhost?



_________________
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1922
PostPosted: 05-04-2022 01:20 AM           Profile   Send private message  E-mail  Edit post Reply with quote


Hipshot wrote:
How long you been in school now czGhost?

Well, quite a while. I'm doing school remotely now, while also having a job. And paying for it, too. Plus I've got 3 Minecraft servers in management, so you can imagine the chaos in my head :D And to add a wood in the fire, I also plan to redesign my websites, I even purchased a domain for it. Very good timing, right at the end of semester when exams period is about to start.

EDIT: Also, I thought about it and I guess the easiest approach towards the Shader Editor would be to write a VS Code Extension for it (someone might fork it for Sublime Text as well). The extension will be actually pack of multiple extensions (downloadable as standalone extensions), one extension will add the syntax highlighting, another extension will include a mini-engine to render a selected shader (and of course shader parser). The latter bit I would actually need a help with, guess it won't be just purely lift the code out of the game engine, it would need to be altered I guess.



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

Recruit
Recruit
Joined: 03 Jun 2022
Posts: 3
PostPosted: 06-04-2022 12:12 AM           Profile Send private message  E-mail  Edit post Reply with quote


obsidian wrote:
BTW, can anyone who can't get Q3ASE working confirm whether or not they have Msvcp60.dll sitting in the root directory?


I just downloaded version 1.5.3, on Windows 10 Pro x64. I can confirm Msvcp60.dll is in the directory, with an md5 hash of 6050BCC1B23F3DF7A1876CBDCBAC8232. It opens, asks me about 32 bit pixl depth, and then, whether I say yes or no, it closes immediately.
Image
Image




Top
                 

Gibblet
Gibblet
Joined: 16 Dec 2020
Posts: 18
PostPosted: 06-24-2022 11:26 AM           Profile Send private message  E-mail  Edit post Reply with quote


CZghost wrote:
one extension will add the syntax highlighting


Sublime Text already has a shader syntax highlighter:
https://trello.com/c/5hnQU5dj/350-shade ... blime-text
Could use some updates though.



_________________

id Tech 3 Mapping Trello


Top
                 

Grunt
Grunt
Joined: 26 Jun 2019
Posts: 71
PostPosted: 06-25-2022 03:11 AM           Profile Send private message  E-mail  Edit post Reply with quote


Mapsking wrote:
obsidian wrote:
BTW, can anyone who can't get Q3ASE working confirm whether or not they have Msvcp60.dll sitting in the root directory?


I just downloaded version 1.5.3, on Windows 10 Pro x64. I can confirm Msvcp60.dll is in the directory, with an md5 hash of 6050BCC1B23F3DF7A1876CBDCBAC8232. It opens, asks me about 32 bit pixl depth, and then, whether I say yes or no, it closes immediately.
Image
Image


There is clearly a collision of programs / services installed / running in the background. On a clean system (after format) and installing core components in windows 7 and 10, Q3ASE works. Currently, Q3ASE is not starting anymore.




Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.