200
editsMore actions
Modding:Creating and Exporting Meshes in Blender (edit)
Revision as of 13:53, 30 December 2023
, 30 December 2023no edit summary
No edit summary |
No edit summary |
||
Line 39: | Line 39: | ||
Tab into '''Vertex Paint''' mode to look at the naked body. | Tab into '''Vertex Paint''' mode to look at the naked body. | ||
The game’s armour system works by vertex paint. It uses this, in combination with the .lsx code, to tell it what to hide and what to show. For example, an armour mesh may unload the torso as it will not be shown. The bottom half of a pant leg may not show when boots are equipped. You can use existing meshes as a reference for this. | The game’s armour system works by vertex paint. It uses this, in combination with the .lsx code, to tell it what to hide and what to show. For example, an armour mesh may unload the torso as it will not be shown. The bottom half of a pant leg may not show when boots are equipped. Genitals have their own vertex paint and only load in when nothing with the 'hide genitals' tag is equipped. You can use existing meshes as a reference for this. | ||
[[Modding:VertexColorMaskSlots|Check here for a | [[Modding:VertexColorMaskSlots|Check here for a reference and Hex codes for the vertex paint.]] | ||
Keeping the HUM_F_NKD_Body_A in the scene is useful as reference here. For example, if you set an upper arm to be hidden for some gloves, you may wish to fit it around these seams to ensure there is no gap in the body showing. | Keeping the HUM_F_NKD_Body_A in the scene is useful as reference here. For example, if you set an upper arm to be hidden for some gloves, you may wish to fit it around these seams to ensure there is no gap in the body showing. | ||
Line 56: | Line 56: | ||
== How to Vertex Paint Sleeves and Pant Legs == | == How to Vertex Paint Sleeves and Pant Legs == | ||
If you handpaint vertex paint on your own meshes, the mesh will often glitch. You may need to use this method to make it work. | If you handpaint vertex paint on your own meshes, the mesh will often glitch. You may need to use this method to make it work. | ||
Line 62: | Line 63: | ||
Select the vertices you want painted. | Select the vertices you want painted. | ||
Shift + D to copy the vertices (right click so they stay in place) | |||
Go into Vertex color and click the little icon on top that makes sure you only paint on selected vertices. | Go into Vertex color and click the little icon on top that makes sure you only paint on selected vertices. | ||
Fill vertex color. | Fill vertex color. | ||
Remember also you need to have a VertCut material set up in your LSX for Vertcut to take effect. | Remember also you need to have a VertCut material set up in your LSX for Vertcut to take effect. | ||
Line 74: | Line 74: | ||
[[File:BlenderTutAlfiraBustedNormals.webp|thumb|203x203px|Fixing Meshes that import in wrong: Sometimes the normals of skirts import this way- unusable in game.]] | [[File:BlenderTutAlfiraBustedNormals.webp|thumb|203x203px|Fixing Meshes that import in wrong: Sometimes the normals of skirts import this way- unusable in game.]] | ||
Sometimes meshes will import in with broken shading and stuck together, usually on skirt meshes. This is because the verts were too close together and the importer made a hiccup. This is often an issue with the normals as well. | Sometimes meshes will import in with broken shading and stuck together, usually on skirt meshes. This is because the verts were too close together and the importer made a hiccup. This is often an issue with the normals as well. | ||
[https://www.youtube.com/watch?v=NCDGhz3RSr8 See this video] for how to fix meshes that import in with messed up normals like a blue/red checkerboard, and export looking like see through checkerboards. You can also fix with '''[Edit Mode] Mesh> Clean Up> Merge By Distance''', and then put a solidify modifier at 00.1 thickness. | |||
[https://www.youtube.com/watch?v=NCDGhz3RSr8 See this video] for how to fix meshes that import in with messed up normals like a blue/red checkerboard, and export looking like see through checkerboards. | |||
You can also fix with '''[Edit Mode] Mesh> Clean Up> Merge By Distance''', and then put a solidify modifier at 00.1 thickness. | |||
[[File:How2ViewFaceorientationoverlay.webp|thumb|291x291px|How to view face orientation overlay on Blender. Blue is outside, red is inside. Red will be invisible in-game, unless you set up a 2 sided shader in your LSX code later.]] | [[File:How2ViewFaceorientationoverlay.webp|thumb|291x291px|How to view face orientation overlay on Blender. Blue is outside, red is inside. Red will be invisible in-game, unless you set up a 2 sided shader in your LSX code later.]] | ||
==Physics== | ==Physics== | ||
Physics are set with red vertex paint. Hot pink vertex paint counterbalances the physics. | Unfortunately physics are not quite at game export quality yet at this stage. | ||
Physics are set with red vertex paint. Hot pink vertex paint counterbalances the physics. | |||
A cloth mesh (Generally named something like HUM_F_CLT_Daisy_Dress_A_Cloth_Mesh and will import in) is the collider mesh, which stops it clipping through things. Sadly you may need to delete it as it can cause your mesh to be exported with errors. | |||
[https://www.nexusmods.com/baldursgate3/articles/311 Here is a tutorial about how to add physics to your mesh by ReallyLazyIcarus.] | [https://www.nexusmods.com/baldursgate3/articles/311 Here is a tutorial about how to add physics to your mesh by ReallyLazyIcarus.] | ||
Some people have had success pasting the code from in game meshes into their code, specifically clothbuffer values, which caused the physics to be less flappy. Which is worth a try if you have a lot of patience and experience with coding. | Some people have had success pasting the code from in game meshes into their code, specifically clothbuffer values, which caused the physics to be less flappy and enabled the collider mesh to be exported without issues. Which is worth a try if you have a lot of patience and experience with coding. | ||
[[File:ScreenyExampleOfPhysicsMesh.webp|thumb|134x134px|Example of red vertex paint for Physics. (Daisy Dress Mesh)]] | |||
If you learn anything new, add it here! | If you learn anything new, add it here! | ||