JPL: Fitzquake Really?
#11318 posted by efdat on 2006/12/08 02:42:13
JPL: how can i do it in fitz? i'd like to do a semi-transparent monster (like the neh_wraith). set .alpha via .qc? or can fitz only apply alpha on brushes?
Spirit: thanx for your offer. i'm a fitzfan. so i'd favour a solution in fitz if that is possible in any way. but if you have a solution using another engine, i'd cosider using that one.
Efdat
#11319 posted by JPL on 2006/12/08 05:36:24
r_wateralpha <0:1> will give you transparent water (typically I use 0.5). For transparent monsters, I'm not sure, but with .qc I guess it is possible...
Maybe metlslime would comment on this point..
Efdat
#11320 posted by aguirRe on 2006/12/08 07:44:33
Neither Fitz nor my std Win/GL engines do alpha yet AFAIK. Any engine with full Nehahra support (e.g. NehQ, DP, Joe) should do, along with others like Tomaz or descendants.
You can use some of the Neh maps (e.g. neh1m1) to check alpha support or e.g. taedemo1, an old Tomaz mod. For another interesting alpha mod, check out Conquest (DP only, or ask for patch).
Question
#11321 posted by Spirit on 2006/12/08 09:33:56
"alpha" as in func_wall with alpha?
Efdat
#11322 posted by JPL on 2006/12/08 10:22:35
Oh ! You mean alpha for walls!! ... I thought you were talking about transaprent water/slime/lava/sky ... sorry for the misunderstanding...
Spirit
#11323 posted by aguirRe on 2006/12/08 10:34:54
Alpha in any entity, like func_wall or monster such as the Neh wraith. If you check out the above mentioned Conquest mod, you'll see plenty of alpha ... ;)
Oops
#11324 posted by Spirit on 2006/12/08 11:02:32
Well, I tried the func_wall with alpha and it seemed like only Darkplaces worked with that. Not TomazQuake worked. Weird, because this came from TQ's mapping.txt.
Yeah, I remember Conquest. Gotta replay that. :)
In Tomazquake
#11325 posted by Preach on 2006/12/08 12:45:17
I think you need a custom mod to make it work with TQ, although not a complex one, you need only define the additional entity field .alpha and it'll load.
It wouldn't be that hard to add .alpha to fitzquake as it's not something the renderer is incapable of - transparent water is in all glquake engines. There's a tutorial for it on quakesrc.org, and I would quickly add it to fitzhack. The thing is that it really should have the whole checkextension mechanism backing it up. That way you can check in the qc if the engine supports alpha, and hide the model completely if it doesn't. It would be useful for windows for instance, you'd want players to be able to see through them, and hiding the model is a better compromise than making them totally opaque when alpha isn't available. Adding checkextension is a bit harder, I'll see what I can come up with...
Alpha
#11326 posted by metlslime on 2006/12/08 12:53:46
It wouldn't be that hard to add .alpha to fitzquake as it's not something the renderer is incapable of - transparent water is in all glquake engines.
Except that alpha-blended polygons need to be drawn in back-to-front order in order to blend correctly. BSP polygons can be sorted back-to-front easily by traversing the BSP tree in a certain way, but polygons on models are a triangle soup and would need explicit sorting.
(Also, there's a current bug in fitzquake where even transparent water is not sorted correctly sometimes.)
Also...
#11327 posted by metlslime on 2006/12/08 13:00:16
a lot of things in fitzquake are drawn with multiple passes, such as textures with fullbrights. Also, if you don't support gl_tex_env_combine then overbrightening requires an extra pass on epolys, and lightmapping requires an extra pass on wpolys.
Multipass rendering doesn't work with alpha, so you'd probably have to simply disable features like overbright and fullbright on entities that have alpha.
Er...
#11328 posted by metlslime on 2006/12/08 13:02:15
lightmapping doesn't use gl_tex_env_combine, it uses gl_arb_multitexture or gl_sgis_multitexture. If you don't have those, it uses multiple passes to render.
Spirit
#11329 posted by aguirRe on 2006/12/08 13:15:23
Like Preach said, you also need QC to enable alpha for most engines. There are also other fields except alpha. In the mods I mentioned, alpha ents work if the engine supports it.
However, having these ents invisible for other engines isn't a good idea. Opaque looks more natural as it'll otherwise be like r_drawentities 0. Check out Neh maps with my GLQuake and you'll see why opaque is a better choice.
Hmmm, Yeah
#11330 posted by Preach on 2006/12/08 14:09:20
I hadn't thought about the changes in rendering code fitz has, it's probably out of my league to add the change then. I still think that some entities would be more sensible fully transparent if the engine doesn't support alpha, like HL style windows. Though you wouldn't want to make a monster invisible on some engines and not on others...
Preach:
#11331 posted by metlslime on 2006/12/08 14:14:32
Assuming you don't mind the visual side effects i listed, it is easy to add. It's just that making it look good is difficult.
It's not just fitzquake; most of those problems would be true in glquake also. (the exceptions being fullbrights and overbright, since glquake doesn't have those.)
You Could
#11332 posted by HeadThump on 2006/12/08 16:01:15
leave the 'model' field blank if you want it to be completely transparent.
Reminds me, I may employ a strategy I recall from
the movie Go for my base map.
'It's a great map, you just have to smoke a lot of pot to see it correctly.'
Alpha
#11333 posted by efdat on 2006/12/09 01:22:22
seems i posted quite a fertile question there :)
metlslime: i'd completely fall in love with you, if you could find a way to incorporate alpha in fitz. the functionality i dream of is this: i'd give a (monster) model an alpha (0:1) value via .qc. The engines that don't support alpha shouldn't even notice that field and draw the model opague. The others should draw the model in the given transparency. I for my purposes don't need transparent brushes appart from the usual water, although that feature (glass) would be great, too.
HeadThumb: If nothing works out, I'll do as you say ;)
@all: thanx for thinking. i really hope something will come out of it.
Oh And...
#11334 posted by efdat on 2006/12/09 01:47:21
regarding triangle soup: i'm planning on a monster from scratch, so i have full control over the .mdl and could make it suitable for alpha functionality. would that make it easier in any way?
Efdat:
#11335 posted by metlslime on 2006/12/09 01:51:05
not really; the main advantage of world geometry is the bsp structure itself. the mdl format just isn't that helpful.
But:
#11336 posted by metlslime on 2006/12/09 01:51:39
the only really impossible to sort situation is when two polygons pass through each other, meaning neither one is truly "in front of" the other.
You Can Sort In That Case
#11337 posted by BlackDog on 2006/12/09 23:30:48
By splitting both polygons along the intersection and proceeding from there.
I think most games use pre-chosen sort buckets instead of doing any actual sorting.
Blackdog:
#11338 posted by metlslime on 2006/12/10 00:45:23
yeah, or i could generate a bsp every frame that includes all polygons in the scene. But I consider that overkill :)
Metlsime I Think You Shoudl Fix The Sql; Erroes
#11339 posted by scamppie on 2006/12/13 23:36:22
everythime I try to post a FUCK YOU SHABMLER THREAD i get as sql error. please fix thyigs
Metlsime I Think You Shoudl Fix The Sql; Erroes
#11340 posted by scamppie on 2006/12/13 23:39:43
everythime I try to post a FUCK YOU SHABMLER THREAD i get as sql error. please fix thyigs
Unfortunately...
#11341 posted by metlslime on 2006/12/13 23:48:50
i fixed the SQL error.
Everyone
#11342 posted by madfox on 2006/12/14 14:15:09
knows Shambler can't be fucked.
|