(07-11-2017, 11:13 PM)gdkchan Wrote: In which file is the Eevee model located?
------
I've been investigating issues with the models, and one of the broken Pokémon models on OR/AS/X/Y was Koffing. It looked like this:
The Pokémon looks OK actually but the smoke effect is all messed up. The same problem also affects other Pokémon like Cosmog on Sun/Moon. At some point I decided that adding "hacks" on the shader to make specific effects for different Pokémon work was not feasible, so I just decided to translate the original game shaders (they are compiled into PICA GPU machine code) to GLSL (OpenGL Shading Language). Writing the translator was not too complicated, but took a few days, and theres still a lot of work to be done, but with the original shader translated to GLSL, I got way better results:
As a bonus, projected shadows started to show up correctly with the shaders aswell. By analysing the shader code, we can solve the mistery:
- On the messed up geometry on the model, each triangle going trough the Pokémon needs to have all its 3 vertices treated as individual points. The geometry shader will use the position of each point to create a square sprite quad. So, basically they are point sprites.
- The vertex shader calculates the position of each point on the quad, and they are also "billboarded", which means that they will always face the camera.
- Each PC Pokémon model contains 2 meshes. One is the normal, high poly Pokémon. The other is a low poly version without textures, that are projected on the ground with some shader aswell to create the shadow effect.
Now the work continues to clean up the mess I just made on the code after the new shader implementation and fixing possible regressions, and after that supporting shaders on Sun/Moon aswell (finding them on all those nameless files will be reaaaally boring). For those using the models to create fan games or just playing around, I think the shaders may be of some help, so I'll try exposing a option to export them as GLSL shaders later. I also hope that this is of some help to someone ripping this Pokémon model.
That is sooo awesome! Thanks for your hard work! Hopefully I can use GLSL shaders in 3dsmax (I heard vray support rendering them)