lol username Posted December 4, 2016 Share Posted December 4, 2016 I've noticed that people using models ripped from LI1 haven't had the smoothing of them accurate to their appearance in the real game. Maybe this is something that can be done automatically by the extractor at some point (paging @Hamhock666), but for now, here's what to do. In short: The smoothing/vertex normals in LI1 are tied to the materials. I'm not sure whether they're intrinsically tied together in the model format, or if it's just a convention the artists used, but either way, that's how it seems to be done. Certain materials have all the vertices that use them welded together, others leave them flat shaded. This is why there's "duplicate" materials like LEGOWHITE vs LEGOWHITEFLAT; the only difference between them besides the names is the intended shading (smooth vs flat shading). If you want it more step by step... Spoiler This is a model as it appears freshly extracted from the game. Rotate it 180 degrees on the X or Z axis (not sure which is correct but either is fine), and flip the normals: That gets it looking something like this. Now to start fixing the normals/smoothing... Unweld all the vertices/make all the edges hard, to give the model completely flat shading, which will look like this: Now look at the model's materials: As said earlier, the smoothing is intended to be handled per material. In most cases it's pretty obvious which materials should get which type of shading - LEGOWHITEFLAT gets flat shading, LEGOWHITE should be smooth. Same for LEGOREDFLAT and LEGORED, LEGOLTGREY and LEGOLTGREYFLA, etc. So select the geometry assigned to those materials, and smooth them, as shown here for LEGOWHITE and LEGORED: As you can see, this matches the appearance of the model in-game: For some materials where it's less obvious what the smoothing should be, you might have to go in-game and check. Another example - this clearly shows the irregular way the artists handled the shading on parts of the racetrack walls, with ROADGREYPHONG set as the material in inconsistent places. (Also, if you're unfamiliar with this stuff: Phong shading.) emily, Hamhock666, Fluffy Cupcake and 6 others 9 Link to comment Share on other sites More sharing options...
Hamhock666 Posted December 9, 2016 Share Posted December 9, 2016 On 12/3/2016 at 11:37 PM, Terrev said: Maybe this is something that can be done automatically by the extractor at some point (paging @Hamhock666) I dont have a lot of skill in 3D modeling programs. All I have is blender, and I am having a tough time figuring out how to render smooth shading vs flat shading (the point light seems to shine on faces with normals opposite the face, maybe ill look up a video.) Because of this, I have not been able to experiment with the MTL file for smooth shading. If you have anything specific you want to change in the MTL or OBJ file, let me know. I think wavefront object files specify some sort of smooth shading group, but I haven't been able to see results: https://en.wikipedia.org/wiki/Wavefront_.obj_file#Referencing_materials In addition, all of the parameters generated in the MTL files (Ka, Kd, Ks) are just default parameters I took from somewhere, so if you know how those could be written in a more constructive way let me know. As for the normals I don't know the math behind calculating normals or how you would go about flipping them. I don't know why the normals are inverted in the Lego Island files, I guess they just had different standards back then. Link to comment Share on other sites More sharing options...
lol username Posted December 9, 2016 Author Share Posted December 9, 2016 I'm not very well versed on model formats, so I can't help you with most of this. But, regarding this: 1 hour ago, Hamhock666 said: In addition, all of the parameters generated in the MTL files (Ka, Kd, Ks) are just default parameters I took from somewhere, so if you know how those could be written in a more constructive way let me know. I'd suggest changing the Kd values to 1.0, and Ks values to 0.0. Right now they're both at 0.8, which is rather arbitrary and also looks a bit awkward in the software I use. Link to comment Share on other sites More sharing options...
Recommended Posts