Clyde Posted April 20, 2022 Posted April 20, 2022 I have been working on intersections for the "Early Access" Extrusion Pro plugin for GeNa Pro. As I progress, I will put snapshots here for public comment. Working on UV's at the moment... 3
Clyde Posted May 2, 2022 Author Posted May 2, 2022 I have changed the UV generation so that the lighting works properly with normal maps.
Clyde Posted May 9, 2022 Author Posted May 9, 2022 I've added separate materials/submeshes for the top, ceiling, floor, and the bottom of the intersection mesh. Before ^^ After ^^ If any material is not specified (none or null), then the Extrusion Material is used and no submesh for that part is created. NOTE: in the above case, what appears as a floor is seen by the code as the top, since the cross-section profile is a single shell. If an inner shell and outer shell had been created, then the floor would be part of the inner shell. I'll have a think about this since I can tell whether I am working with an inner shell vs an outer shell at any time during the mesh creation.
Clyde Posted May 17, 2022 Author Posted May 17, 2022 I had to modify the Mesh Splitting code to handle multiple submeshes/materials, so that the "Split Meshes At Terrains" option would work with the advanced material settings.
Broudy Posted May 18, 2022 Posted May 18, 2022 Coming along very nicely, thanks for the updates, great to see how your work is going. 1
Clyde Posted May 27, 2022 Author Posted May 27, 2022 One BREAKING CHANGE from the previous versions of the Early Access to this project is the orientation of the Texture(s) within materials. Previously, the textures were oriented such that the textures were rotated counterclockwise when looking at them from the point of view of a wall texture. This has changed so that now it is not rotated, and the V coordinate is what separates parts of the texture as a horizontal atlas. Below shows the current orientation: I should be able to swap the U and V coordinate when detecting an older version of the data, but the textures would still need to be rotated on an older project that used the previous versions. The reasoning for changing the orientation has to do with the normal maps and their orientation. Just rotating them counterclockwise does not 'just work', unfortunately.
Clyde Posted June 2, 2022 Author Posted June 2, 2022 I have added some features to the Cross Section Editor. Shift+Click Calc Normals button - Recalculate Normals for ALL UV Sets. Context Menu Item "Separate UV Set" - will create a separate UV Set from each pair of points in selected UV Set. Added a Diamond Shape to the first UV Coordinate in a UV Set in the UV Editor. Documentation is complete, waiting a review.
Clyde Posted June 8, 2022 Author Posted June 8, 2022 For those using the previous versions (prior to Extrusion Pro being a GeNa Pro Plugin), you will need to make change(s) to the orientation of textures in a material used as the Extrusion Material. Also, you can select the Cross Section Asset in Unity, and set the DataVersion to 0, then load the Cross Section into the Cross Section Editor. It will then swap the UV's as (uv.x, uv.y) = (uv.y, 1.0 - uv.x), which essentially rotates the UV clockwise 90 degrees. Then, rotate the textures clockwise 90 degrees. This decision was made for better lighting, since most wall textures are made to where the wall is sitting in the texture as you would see it on a wall. At first, the textures were treated like the road textures, where the V coordinate was generated on the fly per the length of the road. But, since normal maps don't work well when rotated, Extrusion Pro was changed to generate the U coordinate along the length of the extrusion. 1
Clyde Posted June 19, 2022 Author Posted June 19, 2022 I have added a second method for UV creation for horizontal surfaces (top, bottom, ceiling, and floor) to give a better blend and scale match to the incoming extrusions: In the above image, a different material is used for the "top" material, which appears to be the floor.
Clyde Posted June 25, 2022 Author Posted June 25, 2022 Due to the changes in the Material Texture orientation, I have added a data version. If you have already created extrusions with the early access version prior to the v1.0.0 version of Extrusion Pro plugin, you can select the Cross Section asset and set it's data version to 0, then open it in the Cross Section Editor. That will swap the UV coordinates, so the you can rotate the textures 90 degress clock-wise (normals may have to be regenerated, but you can test the lighting visually).
Recommended Posts