Closed Paril closed 8 years ago
The only models that are eligible for this effect (in practice) are the weapons (including the hand grenade -- which is an md3 apparently). So while ideally, all of them would get fixed up, we can prioritize to this list:
Remaining .obj models:
What should happen with those models? If I just weld all vertices the models are going to look horrible, because welding results in a phong-shading effect. This is great for player models and stuff but sometimes you want parts of a weapon to remain sharp edged, to get some definition going. Weld everything and the whole model will look like an organic shaped lump. Just convert to md3 then?
I don't think the phong shading thing is relevant - we aren't using vertex lighting for models, they're per-pixel lit. Weld them up and let's see how it looks in-game. If it does look like crap, we'll find an alternative.
@Paril Maybe call out one that looks particularly funky now, so that Pan can try either welding or converting to md3, and we can figure out where to go from there?
Only the weapon models are affected, in theory, since those have shell effects applied to them. Blaster is probably most noticable because it has tiny bits at the top.
I just tried it on the RL and I don't like the result. I already knew how this was going to look because that's why I only unwelded the edges that I wanted to keep. I haven't looked at the Blaster yet, but I didn't make that model so I don't know if things are welded or not. I was content with the current models and the old shell effects and I don't feel like making all weapons look less appealing for this. Now I could just try to weld the small top bits of the Blaster and see if that helps, or otherwise convert all models to md3 (but I don't know if that would make a difference without welding?)
Heh, I kind of like the rounded edges and phong shading ^^
I think @Paril was annoyed with how the previous shell effect was drawn, because the shell would sometimes clip through the model in odd ways. I don't disagree, but it's also not a high priority in my opinion.
Here are what the current models look like with the new shell effect. I guess we have to decide if the shell is a significant enough improvement on the player model, to warrant fixing the weapons that look particularly bad with it. If you ask me, only the blaster and MG look strange, and only the iron sights, really.
@Paril What do you think? Is it worth trying to tinker with the models to salvage the new effect? I do like the effect, but I also want to make the most of Pan's available time. Maybe @kaadmy could tweak the models, so that Pan can remain focused on the maps?
I can fix this entirely in code without affecting the look of the models or Pan's time, no problem. I will have the game consider obj models a little special and generate a second set of geometry purely for shell - best of both worlds
@Panjoo we'll pursue a code fix for this. We have a couple paths to try. Closing this out! :)
There are some weapons that could use a little more tweaking as to vertex welding. The barrel of the SSG for example.
But on the other hand weapons that have more straight lines like the RL, Hyper and BFG should not have all edges welded IMO. You may like the "phong" effect but isn't it strange that something that looks like phong shading happens with per-pixel lighting at all? Paril said the phong shading thing isn't relevant.
... or otherwise convert all models to md3 (but I don't know if that would make a difference without welding?)
Can someone please answer this for me? Just straight forward converting to md3 is no trouble at all, but the file sizes get bigger.
OK, I'm aware of the code fix, but I welded the bad parts of the blaster and mg, for testing purpose, I dunno:P tris-blasterweld.zip tris-mgweld.zip
I was wrong, I misinterpreted what you were saying. The edges will indeed interpolate the light across edges like you were talking about, resulting in light "bleed" in vertices that are connected because of the normal (for instance, in the case of a right angle, the corner angle will be pointing outwards/inwards at a 45 degree angle instead of either straight up or straight left).
MD3 will not make a difference without welding, no. You can still have unwelded bits in MD3 (unless your exporter automatically welds?).
So, the way I see it, we have a few fixes we can try:
This issue is specific to the OBJ models. They do not appear to be welded, at least on the main edges.
The new shell code in gl-types uses vertex + (normal * offset) to produce clean shell effects (see old: http://i.imgur.com/hE5Yhri.jpg new: http://i.imgur.com/xYmpFEY.jpg). This effect looks great on MD3, but for some reason the OBJ models appear to have discontinuous connections (see http://i.imgur.com/1NaInva.jpg). Generally this occurs if the models aren't welded, but it's also possible that it's got to do with how the code loads and sets up the model.
Just to see, I had the code manually calculate the normals for every vertex by averaging all of the faces a vertex is a part of - the normals were identical to the ones in the file, leading me to believe that this is an issue with the model and not the code.