seedhartha

Members
  • Content Count

    92
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by seedhartha

  1. Who would've thought you would be scripting Blender one day 😅 That looks like one way to do it, yes. Although that script does not cover creating UV maps. Is that not what you wanted? Only baking lightmaps onto existing geometry?
  2. You don't necessarily have to use a separate plugin. Blender can lightmap pack multiple objects out-of-the-box. It's just that these objects need to share the lightmap texture. As for limitations, I don't see any, but it is not obvious how to connect these things in code.
  3. True that. Described process is the only way, as far as I'm concerned. It can be automated, but I will probably never find time to do that.
  4. Fully custom models are possible, but it's not going to be that easy. At a minimum, to be able to export this, you need to: Create Empty object Under KotOR Model Node set Type to MDL Root Rename to match exported filename or it could crash Reparent your Mesh object to a newly created Empty object
  5. Can't help without seeing your .blend file. Long story short, you need to duplicate vertices to emulate flat shading. This is a limitation of MDL file format. It's normals are per vertex, but in Blender normals are per triangle. Here's how you can workaround that: Mark edges connecting your flat triangles as sharp Add Edge Split modifier to the object (ensure that Sharp Edges flag is set) On export, this will duplicate vertices on sharp edges, creating a flat shaded look.
  6. You have loose vertices in Cylinder01. Select that object and do Mesh -> Clean Up -> Delete Loose. Meanwhile, I will have to think how to handle it properly.
  7. Hard to say. Can you send me the .blend file so that I could investigate?
  8. You can edit and create animations in KotorBlender, no problem. > Why do the game models have these weird boxes rather than actual bones? Low-poly parts are used both as bones for skeletal animation, and shadow casters. High-poly parts are bound to low-polys via vertex groups. This is just how 3ds Max works, which Bioware used at the time. In KotorBlender you need to animate these low-poly parts, instead of armature. Just import some existing models and see how it works. Armature can still be created (see Recreate Armature under KotOR Model), but only for preview, not export purposes. I tried to make armature animations exportable, but quickly found that not to be practical, due to different coordinate system of armature bones and other shenanigans.
  9. Hey, Here they are in GOG PC version on a recent NVIDIA GPU. Seems like it has nothing to do with Xbox/PC, but I did notice that this effect is most noticeable on High texture quality. Other than that, I have no idea.
  10. @miraf001 I believe danglymeshes work in your case, but the effect is very subtle. Try increasing "displacement" property from 0.03 to something like 0.1. P.S. I'm using KotorBlender so no idea how to do that in KotorMax.
  11. Hmm, the ASCII looks normal. Please attach exported MDL/MDX, unless DP beats me to it.
  12. Add them to another model how? I might be able to help you pinpoint the issue if you share the edited model. The way danglymeshes work, in theory, is that you assign to each vertex a weight between 0 and 255. This weight is how much a vertex is affected by character movement and wind.
  13. Imported these in KotorBlender and re-exported. Let me know if it did the job. These models seem fine. The only thing out of order was that root object name did not match the model name. Artifacts you've experienced are more likely caused by skeletal animation (QBone/TBone), not name mismatch or vector compression. Luckily, this is what KotorBlender also does better. xbox_models_fixed.zip
  14. Hey, thanks for the info. Then yeah, these textures need to be duplicated\renamed as you've said.
  15. There you go. Replaces vanilla head pmhc05. pmhc07.zip
  16. I have added Xbox model support to KotorBlender 3.4.2. @YourSoul1sMine, you might want to check if it handles your models better than MDLedit does. From my experience porting the code, some data in Xbox models is compressed, and MDLedit compression code is off and may result in integer overflow.
  17. Released 3.4.0 with this and a couple of other fixes, but most importantly I have reworked the UI. It now fits Blender 2.8 style alot better. Here are some screenshots:
  18. Was a bug, fixed it in the repo. Doesn't feel good spamming DS with all the minor versions, so I guess I'll wait until more bugfixes are accumulated.
  19. In 3.3.0 now you can. You can even add supermodel animations on top of head models and they will look ok. I have also finally fixed precision issues with export of custom normals. Exported models now look exactly as they were imported, and MDLedit no longer raises a warning. Overall, I did some testing and this version seems to be pretty robust. I'm tempted to say it's final for now.
  20. Reworked armature support in version 3.2.1. Tried exporting armature keyframes directly, but this solution ended up being too complex and slow. So this is how editing animations currently works (and is very likely to stay that way, since I'm satisfied with the result): Import model with "Import Animations" ticked Select animation under Object Properties -> Odyssey Animations and press Play button to focus on it Position bone objects, insert/remove keyframes, etc. Set current frame to frame 0 or exactly 5 frames left from any animation. That is the Rest Pose Press Rebuild Armature. This step is entirely optional, but useful if you want to test your animation with the skinmesh Export model with "Export Animations" ticked
  21. Published version 3.2.0. Thank you guys for asking and making me look at things more thoroughly. I've fixed some custom meshes related issues, particularly modifiers not being applied on export. More importantly, I've added an option to merge duplicate vertices and mark sharp edges, which is a similar feature to smoothing groups in Max. This is important because KotOR models have a LOT of duplicate vertices, which is exactly how smoothing groups work - they create additional geometry where surface needs not to be smooth. Same result can be achieved with sharp edges and Edge Split modifier in Blender. Some example screenshots: New Import Options Normals Algorithm = None (normals are ignored) Notice sharp edges on the head, despite normals not being imported. That is because of duplicate vertices. Normals Algorithm = Custom (MDL normals are used as is) Notice how smooth edges on the left arm are. There are duplicate vertices there, but custom normals make them look smooth. Normals Algorithm = Sharp Edges, Sharp Edge Angle = 10 degrees (duplicate vertices are merged and sharp edges are marked) Notice how edges on the head are still sharp, despite duplicate vertices being merged. That is the result of these edges being marked as sharp. Unfortunately, edges on the left arm were not marked as sharp, because we could not merge duplicate vertices there - they have different UV coordinates. This happens on more than one model - maybe I'd need to improve the algorithm in the future.
  22. Don't see the diff in the first two pictures. This is what I think is going on: Sharp Edges and Auto Smooth are a display-only thing in Blender. These affect how split normals (vertex normal per polygon) are calculated, but do not result in new geometry. Because split normals are not supported by MDL, what current approach does is it calculates vertex normal as an average of its split normals, effectively cancelling them out, unless all split normals are pointing in a single (imported) direction. What you need to do instead, with custom meshes, is to add Edge Split modifier to your mesh and apply that prior to export (KB doesn't automatically apply modifiers on export, regression on my part). Edge Split generates new geometry based on sharp edges and angles between edges, which is exactly what we need. With Edge Split you no longer need Auto Smooth, Custom Split Normals or Export Custom Normals. P.S. Since you're also using quads, make sure to download KB 3.1.1 (or later) - it fixes export of quads UV.
  23. I've just realized that I don't fully understand how normals work in Blender under the hood, and that results on export are most likely incorrect. Will have to investigate this some more. UPDATE: False alarm. Current approach works, although exported normals a tiny bit different from original values, most likely due to precision error. To answer your question, in order to export an "auto smoothed" model, you tick Export Custom Normals checkbox on export and ensure that Custom Split Normals Data is set under Object Data Properties -> Geometry. When "Import Normals" checkbox is ticked on import, Custom Split Normals Data and Auto Smooth are set automatically.
  24. Published version 3.1 of the add-on with import & export of original normals, support for saber meshes and optimized export.