PrismaticFlower / shaderpatch

Improved shaders (and fun stuff for modders) for Star Wars Battlefront II (2005) - Incompatible with Classic Collection
MIT License
39 stars 2 forks source link

Parallax Occlusion has gone haywire once more #91

Open DoctorAnsem opened 4 years ago

DoctorAnsem commented 4 years ago

This should explain it all. There are a lot of instances where near edges, the parallax occlusion turns the surface into liquid. Terrains as well are very vulnerable to this.

PrismaticFlower commented 4 years ago

Yeah I noticed it on terrains as well. I'm going to try taking one more look at it before I release the next version to see if I can spot anything I've done wrong. To be honest I don't know if I'll be able to solve it or not but I'll certainly try.

In the meantime I think Gogie found a way to work around this issue (or a similar one) for regular models by editing the normals of a model, here's a screenshot of his message. (Apologies to anyone reading this on a high DPI display.) image

Of course I'm not a modeler so I only understand about half of what he's talking about but it looks like it solves it.

DoctorAnsem commented 4 years ago

Is that actually possible for BF2? I thought ZETool automatically recalculates normals during mesh export, based on UV islands and/or polygon angles.

PrismaticFlower commented 4 years ago

I believe it must be, the top and bottom screenshots are from before and after he applied his fix. I could seek clarification that he was using XSIZETools to export it if you'd like?

DoctorAnsem commented 4 years ago

I guess I'll try it. Still, that's a lot of work if every problematic model needs to be redone like that. It might not even be worth the effort, but we'll see.

Edit: Well, it doesn't appear to do any good for more complex geometry, at least.

PrismaticFlower commented 4 years ago

I'm afraid I've been unable to figure out what's wrong for now. It looks like Parallax Occlusion Mapping will have to be consigned to being only for relatively flat surfaces for the time being.