Changing underwater screen colours
Moderator: InsideQC Admins
26 posts
• Page 1 of 2 • 1, 2
Changing underwater screen colours
How do I change the underwater screen colours?
(You know, the fullscreen palette shifting thing when you're inside liquids)
I think the default water blend is too murky...
Also, is it possible to add more blends beyond Quake's defaults? For example, I might want to add a new blood liquid type. How do I do this?
Thanks in advance!
(You know, the fullscreen palette shifting thing when you're inside liquids)
I think the default water blend is too murky...
Also, is it possible to add more blends beyond Quake's defaults? For example, I might want to add a new blood liquid type. How do I do this?
Thanks in advance!
-

Nash - Posts: 95
- Joined: Fri Oct 19, 2007 5:56 pm
- Location: Kuala Lumpur, Malaysia
I'd like to know this too... Would definitely be useful for some other colour liquids than clean water...
So far I've used coloured lighting to make the liquid insides appear in some colour, but then it looks like the liquid is glowing...
So far I've used coloured lighting to make the liquid insides appear in some colour, but then it looks like the liquid is glowing...
zbang!
-

jim - Posts: 599
- Joined: Fri Aug 05, 2005 2:35 pm
- Location: In The Sun
With the Darkplaces source, I found the screen blending code in view.c - in the function V_CalcViewBlend().
Should be pretty easy to figure out how to add additional CONTENT* types but I'm too tired to figure it out now.
EDIT: Well well, what do you know. I also found a console command in view.c, v_cshift. It takes four arguments... presumably R, G, B and alpha.
In that case, it's easy as pie to create custom content types in your QC and just stuffcmd(self, v_cshift) to create new liquid colours.
I need to figure out how to pass the parameters to v_cshift though... so far nothing I've tried works.
EDIT: Got it!
v_cshift 255 0 0 50
Will create a red tint with 50% opacity. Useful for that blood-like liquid I wanted to create.
I think I'll create a tutorial on how to make custom liquid types.
Should be pretty easy to figure out how to add additional CONTENT* types but I'm too tired to figure it out now.
EDIT: Well well, what do you know. I also found a console command in view.c, v_cshift. It takes four arguments... presumably R, G, B and alpha.
In that case, it's easy as pie to create custom content types in your QC and just stuffcmd(self, v_cshift) to create new liquid colours.
I need to figure out how to pass the parameters to v_cshift though... so far nothing I've tried works.
EDIT: Got it!
v_cshift 255 0 0 50
Will create a red tint with 50% opacity. Useful for that blood-like liquid I wanted to create.
I think I'll create a tutorial on how to make custom liquid types.
-

Nash - Posts: 95
- Joined: Fri Oct 19, 2007 5:56 pm
- Location: Kuala Lumpur, Malaysia
While you're messing around there, you might want to check out a very fun cvar: v_idlescale (drunk mode, try a value of 100 or so)
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
- Sajt
- Posts: 1215
- Joined: Sat Oct 16, 2004 3:39 am
Nash wrote:How disappointing. Modders have no control over the liquids because they are hard-coded into BSP compiling programs so we're essentially stuck with the Quake defaults (water, lava, slime).
But you CAN fake it!
Please reference Extras QuakeC mod R4 here:
http://developer.chaoticbox.com/quake.php?tab=poxgoodies
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
Nash: I'll have to re-ask what Sajt asked, what was your plan? If you just want to make them look different, just change the texture. If you want them to act different too, use a compiler which supports entity liquids, like LH's bsp compiler(s). Or use Q3BSP.
That's the beauty of opensourced engines/tools
That's the beauty of opensourced engines/tools
I was once a Quake modder
-

Urre - Posts: 1109
- Joined: Fri Nov 05, 2004 2:36 am
- Location: Moon
I thought it was pretty clear in my original post what I wanted to achieve, but here it is again anyway:
I specifically want to extend the available liquid types for my single player mod.
Quake comes with three built-in liquids: water, slime, and lava.
Firstly, I think the default water blend is too murky and not suitable for clean water. There is no other way to change the default water blend other than having to edit view.c in DP's source.
Secondly, I wanted to add two more liquid types: a thick mud-like liquid, and blood.
Providing textures for them is no problem: I can just create the new textures *blood, *mud, etc. However, internally, these will still be treated as the default water (in other words, it'll have that hard-coded murky blend).
The only way to add more blends beyond the default 3 (murky, green, yellow for water, slime and lava respectively) is to first modify LH's hmap2 compiler to recognize the extra liquid types. I would then have to modify the source to add more content types, thereby allowing me to define additional view blends.
In short; it's not a light modding task, it's serious, and involves modifying not only the engine, but the compile tool as well.
In conclusion: I know it's easy to add different liquid textures, but extending the view blend beyond the defaults is not.
I checked out Extras QuakeC mod R4, and while it is a nice trick, the solution is less than ideal because the underwater warping effect is disabled, and I also see lots of Z-fighting with the fake liquid polygons as I move around.
I specifically want to extend the available liquid types for my single player mod.
Quake comes with three built-in liquids: water, slime, and lava.
Firstly, I think the default water blend is too murky and not suitable for clean water. There is no other way to change the default water blend other than having to edit view.c in DP's source.
Secondly, I wanted to add two more liquid types: a thick mud-like liquid, and blood.
Providing textures for them is no problem: I can just create the new textures *blood, *mud, etc. However, internally, these will still be treated as the default water (in other words, it'll have that hard-coded murky blend).
The only way to add more blends beyond the default 3 (murky, green, yellow for water, slime and lava respectively) is to first modify LH's hmap2 compiler to recognize the extra liquid types. I would then have to modify the source to add more content types, thereby allowing me to define additional view blends.
In short; it's not a light modding task, it's serious, and involves modifying not only the engine, but the compile tool as well.
In conclusion: I know it's easy to add different liquid textures, but extending the view blend beyond the defaults is not.
I checked out Extras QuakeC mod R4, and while it is a nice trick, the solution is less than ideal because the underwater warping effect is disabled, and I also see lots of Z-fighting with the fake liquid polygons as I move around.
-

Nash - Posts: 95
- Joined: Fri Oct 19, 2007 5:56 pm
- Location: Kuala Lumpur, Malaysia
Adding the extra content types is a bit of a task of course (it could be an extra feature of the 'mcbsp' format I was working on, which also includes custom hull sizes)...
Changing the view blend colours has nothing to do with the bsp files. It could probably be made into cvars in the DP engine.
Changing the view blend colours has nothing to do with the bsp files. It could probably be made into cvars in the DP engine.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
- Sajt
- Posts: 1215
- Joined: Sat Oct 16, 2004 3:39 am
Sajt wrote:Changing the view blend colours has nothing to do with the bsp files. It could probably be made into cvars in the DP engine.
Right, I could just modify view.c to get the view blend colours from cvars, but that still means modifying the engine.
What I'm getting at is, there is no mod-friendly way to achieve what I want - engine sources need to be modified and re-compiled.
-

Nash - Posts: 95
- Joined: Fri Oct 19, 2007 5:56 pm
- Location: Kuala Lumpur, Malaysia
Nash wrote:Right, I could just modify view.c to get the view blend colours from cvars, but that still means modifying the engine.
What I'm getting at is, there is no mod-friendly way to achieve what I want - engine sources need to be modified and re-compiled.
Then quit whining about it and DO it. If you can't make something work the way you want, find a way to work around it. Doing a custom engine should be considered valid for making a mod.
Besides, if you do something cool, and have the source out there for it, you may just end up making something that may become a standard in all the other engines.
I myself am thinking about doing a little dabbling into the engine source, and I myself have whined and asked engine coders to do something (doesn't generally work) and been told to do it myself.
So, I'm gonna.
That's why the engine source is there after all, so use it already!
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
Well, I think you shouldn't be worrying about view tint colours until you have finished the important parts of your mod.
I spent the first bunch of years of my modding 'career' worrying about such details, and never got a mod done, or even close. Now, if I made a mod, I would focus on just working broadly first, then adding the details. Implement the important gameplay features, then worry about your view tint colours.
I spent the first bunch of years of my modding 'career' worrying about such details, and never got a mod done, or even close. Now, if I made a mod, I would focus on just working broadly first, then adding the details. Implement the important gameplay features, then worry about your view tint colours.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
- Sajt
- Posts: 1215
- Joined: Sat Oct 16, 2004 3:39 am
26 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest
