using the new alphaMods to make water


(WolfWings) #41

Ah… I’ll explain what ydnar said more generally. But first, check the ‘sticky’ topic at the very top of this board for the newest version of q3map2, NOT shaderlab.com, hon. Specifically, get 2.5.15 as of the writing of this post.

When ydnar said you don’t need func_groups to make the AlphaMod brushes work, he meant that AlphaMod brushes that aren’t part of a func_group will affect ALL vertexes they surround, no matter what entity (or worldspawn) they belong to. I.E. If you’re just doing a single alpha-blend effect somewhere using AlphaMod brushes, you don’t need to seperate out all those brushes into a func_group to make it work. You still can, but it’s not needed in that case.

However, if you want to have two or more brushes touching, and assign them seperate AlphaMod brushes, THEN you need to use func_groups to ‘group’ the AlphaMod brushes with the appropriate brushwork, otherwise AlphaMod brushes that cover one or more vertices where they overlap will apply cummulatively. I.E. AlphaMod 25 overlapping AlphaMod 50 will result in (0.25*0.50)=0.125 for the surrounded vertices. Sometimes, this might be what you want. Others, it definately isn’t what you want.

Basically, think of AlphaMod brushes as multiplication. That’s all they do. All vertices, everywhere, start with an ‘Alpha’ value of 1. AlphaMod brushes multiple the current value for all the vertices they are ‘touching’ by their value. 25 = 0.25, 50=0.50, 75=0.75, 00=0.00, check the AlphaMod line in the shader to get the exact number if you’re unsure.

Now… what vertices are they considered to be touching?
If the AlphaMod brush is part of worldspawn, and not part of a func_group, then ALL vertices they surround are considered to be touched.
If the AlphaMod brush is part of a func_group, they ONLY vertices they surround [u]in that func_group[/i] are considered to be touched.

That make more sense? :smiley:


(WolfWings) #42

Also, a quick warning… DO NOT INSTALL Q3MAP2 2.5.15 INTO YOUR EXISTING GTKRADIANT DIRECTORY!

Install it into it’s own directory. I can’t re-itterate that enough, DO NOT INSTALL IT WHERE YOUR EXISTING Q3MAP2 IS INSTALLED WITH GTKRADIANT!


(chavo_one) #43

Why the screaming? You should never do this.


(WolfWings) #44

Because it’s that big a deal, hon. When something can screw up your GtkRadiant installation, or break q3map2 in subtle and bad ways, that’s reason enough to make sure the warning is in all-caps.

So kindly explain how you should ‘never’ all-caps a warning, regardless of the consequences? Sorry, I don’t buy that.


(chavo_one) #45

well perhaps an explanation would be more valuable than a bit of stomping and shouting.

“You should never do this” was in reference to overwriting the radiant version of q3map2 without backing up the old version. Even ydnar has never promoted such behavior:
http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=655#3625


(WolfWings) #46

Yes, but with previous versions it wouldn’t do anywhere NEAR as much harm as 2.5.15 in particular can, since it’s using newer revisions of numerous .dll files GtkRadiant relies on. Overwriting the files in the GtkRadiant directory with the newer ones in 2.5.15’s package can cause GtkRadiant ITSELF to break down, not just q3map2 to not function properly. And only replacing the q3map2 executable in the GtkRadiant directory leaves q3map2 not working in subtle but annoyingly-hard-to-track-down ways.

The gorey technical reasons for why can be given if asked, but making sure the warning is given first seems a lot more important to me. As an analogy, who cares why doing XYZ makes your car belch green and orange smoke? If they do, they can ask, or look it up. The rest can simply know not to do XYZ. :slight_smile:


(chavo_one) #47

Now that is valuable information. thanks!


(Shaderman) #48

When ydnar said you don’t need func_groups to make the AlphaMod brushes work, he meant that AlphaMod brushes that aren’t part of a func_group will affect ALL vertexes they surround, no matter what entity (or worldspawn) they belong to. I.E. If you’re just doing a single alpha-blend effect somewhere using AlphaMod brushes, you don’t need to seperate out all those brushes into a func_group to make it work. You still can, but it’s not needed in that case.

However, if you want to have two or more brushes touching, and assign them seperate AlphaMod brushes, THEN you need to use func_groups to ‘group’ the AlphaMod brushes with the appropriate brushwork, otherwise AlphaMod brushes that cover one or more vertices where they overlap will apply cummulatively. I.E. AlphaMod 25 overlapping AlphaMod 50 will result in (0.25*0.50)=0.125 for the surrounded vertices. Sometimes, this might be what you want. Others, it definately isn’t what you want.

Basically, think of AlphaMod brushes as multiplication. That’s all they do. All vertices, everywhere, start with an ‘Alpha’ value of 1. AlphaMod brushes multiple the current value for all the vertices they are ‘touching’ by their value. 25 = 0.25, 50=0.50, 75=0.75, 00=0.00, check the AlphaMod line in the shader to get the exact number if you’re unsure.

Now… what vertices are they considered to be touching?
If the AlphaMod brush is part of worldspawn, and not part of a func_group, then ALL vertices they surround are considered to be touched.
If the AlphaMod brush is part of a func_group, they ONLY vertices they surround [u]in that func_group[/i] are considered to be touched.

Great explanation (and a very important part for beginners trying to learn how to use the AlphaMod technique at the same time). Thanks a lot! This should be part of a AlphaMod tutorial as it clarifies a lot imho.


(Shaderman) #49

Forgot this one :banghead:

@WolfWings: Thanks for your installation warning but I managed it myself some days ago. I found no information about how and where to install q3map2 correctly, so I first tried the wrong way in the radiant directory (after saving the old dll’s and q3map2.exe). You’re right, Radiant didn’t start but gave me some errors (can’t find function xyz in one of those dll’s). I copied the dll’s back to their original place and installed q3map2 in a separate directory. Not safing those dll’s would have screwed up my radiant installation. I appreciate this warning and would like to see it in the q3map2 readme (all caps or not :smiley: ).


(NOP) #50

Fixed
The problem seems to be with the q3map_alphaMod scale command in the latest build.
If you replace it with q3map_alphaMod set the problem is gone. Not sure if the problem is always apparent, but just in case I’m giving everybody a heads up so you might wanna re-check/compile your tutorials/maps etc.
@Shaderman I updated the sample map with the changes implemented so hopefully it should work fine now… if not post again.

P.S. Make sure you also update any alpha_X shaders you have in common.shader with q3map_alphaMod set instead of scale also.


(Shaderman) #51

Nice! Thanks a lot for your help NOP. It works perfectly now. I got a lot of knowledge out of this thread and will try to rarefy this.


(ratty redemption) #52

good posts guys and I`ll try to answer any questions, comments directed specifically at me when I have more time this week.

I`m also trying to take on board all the suggestions for improving the new tutorials, which I might suggest people then stop using this old one to avoid confusion, but you guys are welcome to post in the new one with me.

what I have planned is a step by step tutorial for building a rock pool, like your see in Roughts "the well of youth" map when its released, although I`m planning a slightly different design to the ones I made for him.

it will start off with some examples of making a trisouped rock protrude from flat ground and show how to blend from say sand to rock.

then I`ll be adding ‘soft edged’ volume blended water around the rock and edge of the pool, as well as showing the method I used for creating the light rays on the pool bed and underwater rock surfaces.

another part of the tutorial will be making waterfalls and the mist that goes at the bottom of them, which is something I recently improved on, as I made some for rought, this time using patch meshes which to my pleasant surprise worked very well with volume brushes.

each of the main stages of those tutorials will have separate example maps, as when all the components are layered together it can look very confusing in radiant, but separately the process should be a lot easier to understand, and you guys can comment, ask questions about specific stages so we know we`re referring to the same thing.

one aspect I found difficult with writing the tutorials in the past, but thankfully is getting easier, is racking my brains how to describe what I see and do in radiant, since with any new technology, needs new terminology, and pics on their own aren`t enough.

I know WolfWings, myself and even ydnar do occasionally change the terminology we use, but hopefully its making things more descriptive and less abstract... I personally like how WolfWings described his 'snow-receiving-dithered rock' etc as its easier for me to remember and keep track of what he`s talking about.