Malkior

Modelling edits for Area Models and their various trials

Recommended Posts

Alright. I've finally got KotorMax installed, primed, and a nice (Mildly warm now) cup of coffee close nearby; let's get this crazy train rolling.

First things first. I've been working constantly on updating or at least fixing some of the many modeling problems with the Telos Restoration Zone, and chief of these being the ground itself. The most glaring issue with it; the mesh is too high in one part (The characters float above the ground) 

 

 

K2_00616.jpg 

And near the wall, the mesh is so low, the characters are half covered by the ground

 

 

K2_00617.jpg 

'

 

Unfortunately, fixing this isn't as easy as moving the offending vertices into place since someone has informed me that the pathfinding AI can get stuck if the walkmesh is edited too dramatically.

To add further challenge to this exercise, I personally am probably the most uninitiated when it comes to using GMax (and 3d modelling in general), so something as basic as importing and exporting may require the information step by step.

As with most of my forum topics, I hope to continually update this thread as I stumble upon more 3d modelling projects including some character edits such as adding actual collar meshes to the armor models and tree/ foliage fixes.

 

 

Share this post


Link to post
Share on other sites
7 minutes ago, Malkior said:

Unfortunately, fixing this isn't as easy as moving the offending vertices into place since someone has informed me that the pathfinding AI can get stuck if the walkmesh if edited too dramatically.

It is (mostly) that straightforward if you are talking about editing the actual terrain. The walkmesh is an entirely separate mesh, not rendered in-game. Which is why they sink or float independent of whatever the ground appears to be doing. As long as you don't touch the walkmesh and are just vert shuffling the terrain meshes, you shouldn't run into too many dramas.

Share this post


Link to post
Share on other sites
56 minutes ago, DarthParametric said:

It is (mostly) that straightforward if you are talking about editing the actual terrain. The walkmesh is an entirely separate mesh, not rendered in-game. Which is why they sink or float independent of whatever the ground appears to be doing. As long as you don't touch the walkmesh and are just vert shuffling the terrain meshes, you shouldn't run into too many dramas.

Ah, so edit the area mesh around the Walkmesh.. Makes a lot more sense.

Now to do that, I just convert the 231TELA.mdl to ASCII and then import it into GMax, right?

Share this post


Link to post
Share on other sites

You'll want to decompile the model alongside the walkmesh so that the layout position is included in the ASCII. You can also load the entire area at once using the area tools in KMax, which requires the LYT (layout ) file.

Share this post


Link to post
Share on other sites

Would you consider making a walk through along your journey? I got 3ds max going for some character model changes, but I'm gearing up towards an overhaul on Peragus. So any info you discover along your way here could be super helpful!

Share this post


Link to post
Share on other sites

Alright. I extracted the WOK, MDL, MDX, ran Read/Write with MDLOPS; and then Imported the LYT and MDL into GMax.

Everything seems to be working properly, so now the actual editing begins..

And here's where my inexperience shows through. 

I want to add a vertex to the area with a red arrow in the pic.

EditinginGmax1.jpg

 How exactly would I do that? I know how to get to the sub-object, but is there a tool like the knife tool in Blender to bisect the edge/ add vertices?

More importantly, is there a better way to do this instead of just adding a vertex and pushing it up?

Share this post


Link to post
Share on other sites

The first thing you want to do is turn on Edged Faces in the viewport so you can see all the polys outlined. Right click on "Perspective" in the top left corner of the viewport and click on "Edged Faces". In that same menu you also want to go to "Configure" and then in the new menu that pops up under the "Viewport Rendering Options" section enable "Shade Selected Faces" and hit ok.

Now you should be able to easily identify the polys you need to cut to get the vertex you want:

GMax_Subdivide_Polys_01_TH.jpg

Before going any further, you'll need to expand the Editable Mesh modifer, select the Vertex sub-mode, select the surrounding verts of these polys, like so:

GMax_Subdivide_Polys_02a_TH.jpg

Then in the "Weld" section in the value box for "Selected" put in 0.1mm and hit the "Selected" button.

GMax_Weld_Selected.jpg

Any mesh you import will typically have most of its faces detached, which will screw up attempts to perform many modelling operations, so unifying a mesh (or sections of a mesh) is usually the first thing you need to do. You can weld the entire mesh, but you need to be careful doing this, since in some cases you may accidentally destroy needed geometry (like two overlapping faces that have their normals pointed in opposite directions for backface culling reasons, common in character models) or run into shading issues if you don't manually reassign all the smoothing groups afterwards.

Go to Customize -> Grid and Snap Settings and tick "Vertex" on the Snaps tab. You can press the S hotkey to enable and disable snapping, so now you will be able to snap to vertices (in some cases you may want to also temporarily enable Edge and Midpoint).

Now in Polygon sub-mode, under the "Edit Geometry" section enable the "Cut" tool:

GMax_Cut_Tool.jpg

Then with snaps enabled, click on the starting vert of your cut line, then snap to the end vert:

GMax_Subdivide_Polys_03_TH.jpg

Click on the end vert and you should have a set of new polys and verts:

GMax_Subdivide_Polys_04_TH.jpg

Right click a couple of times or manually hit the button to turn off the Cut tool. Note that Max is a bit flaky about this sort of thing, refusing to cut across polys that aren't coplanar, so sometimes doing it from the Top viewport is more reliable.

Now you should have the vert/s you need to match the walkmesh. Note that you'll probably want to load in the textures to make sure that you are not getting too much distortion. In some cases creating new polys like this will necessitate adjusting the UVs to fix such distortion. In this case it should be fine, but given the propensity for terrible unwraps in KOTOR you're bound to get some distortion eventually when doing this.

  • Thanks 1

Share this post


Link to post
Share on other sites

Finally got the new vertices and moved them to hopefully match the walkmesh better. However, I can't find any way to display the textures in GMax. Is there some step I'm missing, or is it more complicated than just ticking a box?

 

Also, just in case it'd be easier to test it in game; how do I export it to the game? Just an inverse of how I imported it? (IE  Save, open in MDLOPs and convert it to Binary, Put the Binary into the Override, ????, Profit)

Share this post


Link to post
Share on other sites

To compile, export with animations and the layout position option enabled. Grab the latest beta of MDLEdit, set the game to TSL by hitting the big button for game version, File -> Load to load the ASCII, File -> Export -> Binary to compile. You can delete the WOK, since you want to use the vanilla walkmesh. Copy and paste the MDL/MDX to your Override.

To have KMax automatically load in textures, in GMax go to Customize -> Configure Paths -> Bitmaps then click the Add button and browse to the directory containing your textures.  I would advise extracting all the textures for both games into separate directories (they'll need to be converted to TGAs) and adding both to the list. KMax will check directories for textures in the order they are listed in GMax, so for texture names that are shared between both games but differ in content (for example, PxBI robe textures) you will have to manually reassign the correct game-version texture in the material editor.

Trying to explain how GMax's Material Navigator (three coloured balls icon on the toolbar) and Material Editor (single shiny red ball icon) work (and how they differ from Max) is an extensive subject of its own, so I'd suggest you try Googling that.

Share this post


Link to post
Share on other sites

I am currently in the process of proverbially pulling my hair out in trying to figure the GMax interface.

Every time I hit Export in the Kotormax bar, it acts like nothing happens and any time I hit "Set" it says "No Odyssey mesh selected". I tried to set the "Browse" parameter to the folder I want the export to go to, but nothing in GMax can export GMax files to MDLs. Should I just keep the program running at all times since Gmax files are less than useless if I hope to keep using the MDL? Is there a way to save files as anything but GMax's through the Kotormax interface? More importantly, did I make a huge mistake by ever saving my files as GMax's?

Share this post


Link to post
Share on other sites

GMax is crippleware, being a cut-down version of Max 4 made for demo purposes. Thus it has no native export function. To get around that, scripts like KMax output to the Listener, then rely on a "snooper" to grab that and save it out to a file. Sounds like it isn't running in your case. You should see a green icon in the taskbar if it is. Do you have a "kotormax.exe" in the root of your GMax folder?

Share this post


Link to post
Share on other sites

I have Kotormax.exe in my Gmax root and use a shortcut to it on my desktop to start the program, but I don't see any green icons when I'm running it.

 

image.png

I'm running it from Direct3D on Windows 10, if that has anything to do with it.

Share this post


Link to post
Share on other sites
3 minutes ago, Malkior said:

I'm running it from Direct3D on Windows 10, if that has anything to do with it.

I'm not even sure what you mean by that.

4 minutes ago, Malkior said:

I have Kotormax.exe in my Gmax root and use a shortcut to it on my desktop to start the program, but I don't see any green icons when I'm running it.

You shouldn't need to manually run it if the script is set up to launch automatically with GMax. Click the little up arrow in the taskbar to reveal hidden icons.

Share this post


Link to post
Share on other sites

Well... turns out I wasn't looking at the ticker on the bottom right letting me know that it was actually exporting the entire time. I'm so trained by popup boxes that it didn't even occur to me.

Also, the green snooper icon was exactly where you said it'd be in the hidden icon tab.

So, back on track I guess..

(I hope my pratfalls benefit someone trying this for the first time, because I'm sure these constant panic moments are no doubt exhausting. Thank you for helping out with this process as I hit each speedbump one after the other..)

Share this post


Link to post
Share on other sites

I think @bead-v just reused NWMax's snooper, and it's pretty barebones. There are alternatives around. The Dragon Age I/O script used one called YAGG, which IIRC did pop up a save dialogue. It's possible that the existing one can too, but maybe it's just not being fed the command to do so (the script outputs instructions to the Listener that tells it what to do). Since you input the export location in the base's modifier panel right above the export button, I imagine it was determined there was little need for it.

  • Like 1

Share this post


Link to post
Share on other sites

Finally finished the mesh fixes. 231tela.zip I imagine my polygons are kind of horrible in places, but as far as I've tested, you no longer float three feet above the ground.

Thank you for the primer in using Gmax; I've found a few useful tutorials, and even so it is quite stripped down so even something as simple as the Bridge function has to be done manually. Still it's a fine alternative to paying $700, so I'll take what I can get.

 

Now, I'm looking at improving the trees if I can, but I need a few more steps laid out for me. There are a few tree models out there, but will they work with the game models and is there a process required to add them to the geometry with minimal issues?

 

Lastly, I want to do some armor editing on the side. Do the armor models need specific animations, or are they basically static objects and don't have their own animations?

 

 

Again, thank you for the massive help you've provided in my first foray into 3d modelling; If there is a want, I can draft each of my many hard-earned lessons into a lengthy tutorial.

Share this post


Link to post
Share on other sites

The problem with the trees (or any other level geometry) is that new additions will need to be lightmapped. Given that we don't have the light positions used for the original bakes, you have to completely guess and do a lot of fiddling with settings/rebaking. Probably not what I would suggest for someone just starting out.

Armour/clothes/robes are all skinned meshes, the same as heads, etc. Adding geometry or welding verts will destroy the skin weights, since weights are assigned per vertex and thus rely on unique vert ID numbers, so this is not something to be done haphazardly. You can shuffle vert positions around without affecting the weights, but there's only so much you can do with that. Especially since moving a vert too far from its starting point will likely introduce undesirable deformation during animation. You might want to describe in more detail what it is you want to achieve.

Also, regarding Max, if you have an EDU email address you can get free educational versions of Autodesk products. Licenses should be valid for 2 years.

Share this post


Link to post
Share on other sites

Alrighty. Then I guess for the trees, it seems more viable to just edit the geometry already present in the scene. The hard part is going to be rewrapping the textures so that  I can have a unique texture for the bushes and branches (since currently they both use the same texture)

Heck, most of the geometry is blurred terribly because of how bad the UVW maps are; is there a tutorial somewhere on how to assign or remap textures specifically in GMax?

 

Regarding the clothing, my ultimate goal is to introduce actual collars to the various armor and clothing meshes instead of the painted on ones in Vanilla. Thankfully the area around the neck doesn't have to deform much, as far as I know.

Share this post


Link to post
Share on other sites

Since only walkmeshes support multi-materials, you'll either have to split the leaves out to separate meshes to assign a different texture, or create a new double width texture with both branch and leaf textures side-by-side. The latter approach may be the easier route if you have to completely remap them anyway.

Max's UV tools are pretty clunky. I assume GMax's are even more limited, but the basics should be mostly the same. I'd suggest a search on Youtube. Some basic Max tutorials should be broadly applicable if you can't find anything GMax-specific. Just keep in mind that the lightmap UVs are stored in channel 2, so be careful you don't destroy those.

Your problem with collars is going to be that you'll need more geometry to make anything half-decent, which will destroy the skin weights. There are ways around that, but GMax is not particularly ideal for it since it lacks some of the tools Max has.

Share this post


Link to post
Share on other sites
15 hours ago, DarthParametric said:

Adding geometry or welding verts will destroy the skin weights, since weights are assigned per vertex and thus rely on unique vert ID numbers, so this is not something to be done haphazardly.

So does this mean the entire mesh's weights are destroyed if you just add or remove one vert? Or is it just that in the relevant portion the weights don't correspond to the ones around them?

Share this post


Link to post
Share on other sites

The modeling software will compensate (at least 3ds Max will) if you edit the object via its modifiers, but it's not perfect and some actions will change the vertex setup too much and completely strip the skin weights.

Share this post


Link to post
Share on other sites
8 hours ago, bead-v said:

So does this mean the entire mesh's weights are destroyed if you just add or remove one vert?

Deleting geometry is actually ok. It's only adding new geometry that destroys the weights. This was something I was going to come back and add after re-reading what Malkior said. Namely that you could select the appropriate block of polys around the neck region all weighted 1 to torsoUpr_g, then duplicate the mesh, on the original delete the selected polys, on the duplicate invert and delete everything else. Now on the split out neck piece you can add new geometry with impunity, as long as you don't reposition/alter the bottom ring of verts that mate to the rest of the body. Reskinning it manually once modelling is complete is trivial, since all the verts will be weighted 100% to one bone.

  • Thanks 1

Share this post


Link to post
Share on other sites
On 3/18/2020 at 9:26 PM, DarthParametric said:

Deleting geometry is actually ok. It's only adding new geometry that destroys the weights. This was something I was going to come back and add after re-reading what Malkior said. Namely that you could select the appropriate block of polys around the neck region all weighted 1 to torsoUpr_g, then duplicate the mesh, on the original delete the selected polys, on the duplicate invert and delete everything else. Now on the split out neck piece you can add new geometry with impunity, as long as you don't reposition/alter the bottom ring of verts that mate to the rest of the body. Reskinning it manually once modelling is complete is trivial, since all the verts will be weighted 100% to one bone.

Gonna take a few attempts to figure that out, but I have a few days this weekend to do it.

-Will post updated questions as they arise-...

Share this post


Link to post
Share on other sites

After first booting it up and attempting export, I get this Error Message:

Error1.jpg

 

I also keep getting a message that the mesh "Depends on the Typology" of the skin modifier which is higher on the stack.

Error2.jpg

Do I just ignore this and proceed?

How do I duplicate the mesh? Is there a modifier, menu item, or shortcut key to do this?

In duplicating the mesh, am I just duplicating the entire thing or is this for just the torso section?

Share this post


Link to post
Share on other sites

The second one you can ignore. That's Gmax's way of saying what we were talking about before - certain edits to the modifier can potentially break a modifier higher up in the stack, in this case the skin. So long as you don't add vertices willy-nilly it should be fine, however.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.