another q3map hack: per-entity patchmeta and subdivisions


(SCDS_reyalP) #1

Download:
http://www.collectivecomputing.com/~reed/et/mapstuff/q3map-reyalp-2.zip

Info:
You can use the keys _patchmeta and _patchsubdivisions to control how patches in a given entity are compiled. More details in the readme. This is experimental, use at your own risk.

This also includes the content priority stuff, with some better example shaders.
:moo:
edit: new url since wwgn seems to have fallen off the face of the earth.
edit2: The content priority stuff is described in this post: http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&p=114127


(zl1corvette) #2

Your content priority thing is pretty cool, what do you think about implementing something similar as a key? For example k/v _contents/nonsolid or clip etc. Is such a thing even possible? The reason I ask is I was recently making some railings and I wanted to clip them myself and I ended up making a new nonsolid shader (which really isn’t much work, just a hassle), but something like this would make things much easier. As for this modification, very cool, I assume it forces patches with the key to do the patchmeta thing? This is actually very nice, if it does as I think, I can totally skip the converting to ase to get the subdivisions I want and still have normal patches if I need em.


(SCDS_reyalP) #3

Yes, you probably could do the contents thing as a key. The simplest way to do it would probably be _contentshader <shadername>. I had a similar idea, but thought per-entity might be too restrictive. For your example however, it would make sense. I’ll look into adding that.

This is actually very nice, if it does as I think, I can totally skip the converting to ase to get the subdivisions I want and still have normal patches if I need em.

That is exactly why I made it :smiley:

Note however that patchmeta patches uses a non-drawing patch to ‘clip’ them (patchmeta creates a triangle surface for the drawing part of the patch, but the engine still needs some way to make this solid. The compiler does this by leaving the patch in place, but changing it to be non-drawing). So you might get better peformance converting to ASE and manually clipping. You could also use a non-solid shader for your patches (hrm, another use for a nonsolid entity key), and manual clip of course. I’m not sure if this would leave you with a nondrawing nonsolid patch in the .bsp or not…, I suspect it would, but I’d have to look at the code again to be sure.


(pazur) #4

d00d ! Why don`t you take over the development of q2map2 officially? Since ydnar has limited resources in terms of the time he can spend on q2map2 this would be a great idea IMHO :moo:


(SCDS_reyalP) #5

Even if I wanted to, and was qualified (which I’m not) it wouldn’t be up to me.

People are free to use my version if they want, so its not like they would get anything more if I ‘took over’.

That said, if there is some particular bug or feature you want to suggest, go ahead. If it interests me and is within my capabilities, I might look into it :moo:


(pazur) #6

feature suggest… hmm… :bump: http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=7943&highlight=request