VarsityPuppet

Ajunta Pall WIP

Recommended Posts

Well, back when it was just the Ajunta Pall body, and I set the alpha, it seemed to work just fine. Once I added the head and the mask to the model (along with setting the alpha), that's when it started crashing. So perhaps it has something to do with the head or the mask. Note: The model itself works just fine, as long as there is no alpha value set on any of the meshes

 

At any rate, here is my current set up:

 

mesh 1) torso and arms skin

mesh 2) pelvis and legs skin

mesh 3) left hand skin

mesh 4) right hand skin

 

mesh 5) head skin

mesh 6) mask (trimesh, hooked to head)

mesh 7) left eye (trimesh, hooked to head)

mesh 8) right eye (trimesh, hooked to head)

 

Why did I split up the body that way? Idk, I'm lazy? I would have even made it all as one mesh, but it wouldn't let me compile if I had more than 16 bones tied to the skin modifier :(

 

One last thing: If I set the mesh alpha, it looks like I get a shiny texture? I have a feeling this has to do with bumpmaps... am I going to have to get rid of bump maps?

Share this post


Link to post
Share on other sites

Are the meshes themselves set to cast shadows? Poly count is an issue there - any mesh over somewhere around 1,500 polys will cause a crash if it has shadows enabled. Maybe it's the same with alpha?

 

Couldn't really say with your shiny texture issue. I haven't tried normal maps with alpha. What's your TXI semantics?

Share this post


Link to post
Share on other sites

I'd have to double-check (I'm at work and away from my modding computer).

 

IIRC, no shadow casts are being set. Not even the bones. I turned off shadow casting for everything because ghosts don't cast shadows. I suppose it is possible that it is accidentally being set in the ascii?

 

txi semantics are probably something like

 

p_ajunta texture:

bumpyshinytexture cm_baremetal
bumpmaptexture p_ajuntab
 

p_ajuntab

isbumpmap 1
bumpmapscaling 3

Share this post


Link to post
Share on other sites

I do want shiny. What I noticed is that when I set the mesh alpha, it didn't actually make the character transparent like a ghost, but instead made him shiny. If I change the txi so it's not set up with a bumpmap, it works fine - I get shiny and transparent. 

 

mesh alpha + envmap + bumpmap = whole character is shiny

mesh alpha + envmap = transparent and shiny, no bumpmaps though :(

 

I guess basically what I'm saying is that bumpmaps don't seem to play nice with mesh alpha

Share this post


Link to post
Share on other sites

You could try adding

isdiffusebumpmap 1

isspecularbumpmap 0
To the normal map's TXI. You may also need to switch the diffuse's TXI from bumpyshinytexture to envmaptexture, but I'm not entirely sure on that.
  • Like 1

Share this post


Link to post
Share on other sites

I will give that a shot the first chance I get. I'll try troubleshooting the alpha mesh stuff as well. I'll post updates in the thread, so we can figure out what's going on

Share this post


Link to post
Share on other sites

Yeah no luck. Even if I set one of the hands to have a mesh alpha value, it may load up for awhile, but it will eventually crash in the game :|

Share this post


Link to post
Share on other sites

That has me stumped. Assuming it's not something specific at your end, like a vid card issue, all I can suggest is send the model to ndix UR and bead-v to have a look at, see if they can spot the source of the problem.

Share this post


Link to post
Share on other sites

Why did I split up the body that way? Idk, I'm lazy? I would have even made it all as one mesh, but it wouldn't let me compile if I had more than 16 bones tied to the skin modifier :(

 

Really? The 16 bone limit should just be a warning in both kmax and mdledit, if it didn't let you then it's some sort of bug. If you still have that model around, I'd be interested to see what happens if the game gets a model with more than 16 bones. The thing is, the format can encode any number of bones, there's just this one list that only has 16 places for them... and we don't yet know how relevant it is.

 

 

Well, back when it was just the Ajunta Pall body, and I set the alpha, it seemed to work just fine. Once I added the head and the mask to the model (along with setting the alpha), that's when it started crashing. So perhaps it has something to do with the head or the mask. Note: The model itself works just fine, as long as there is no alpha value set on any of the meshes

I'm interested in taking a look into this :)

  • Like 1

Share this post


Link to post
Share on other sites

Really? The 16 bone limit should just be a warning in both kmax and mdledit, if it didn't let you then it's some sort of bug. If you still have that model around, I'd be interested to see what happens if the game gets a model with more than 16 bones. The thing is, the format can encode any number of bones, there's just this one list that only has 16 places for them... and we don't yet know how relevant it is.

 

 

I'm interested in taking a look into this :D

 

Okay, I may have misspoken in terms of the 16 bones. All I remember is that it does not have the desired effect for me, which is to have everything animating correctly.

 

I really appreciate the help guys, may God bless all of you :D

 

For y'all who want to test this mesh alpha business, here's a little care package for you. Let me know if you need anything else from me.

 

As far as other work goes, I'm just waiting to see how the mesh alpha stuff turns out - it's otherwise pretty much ready for release

Ajunta_Pall_Care_Package.zip

  • Like 1

Share this post


Link to post
Share on other sites

I notice you are specifying tangentspace 1, yet not actually using normal maps. I tried creating some but it still crashed. Although interestingly it seems to crash during the cutscene, not if you just stand there and watch him. Is mesh-based alpha not compatible with tangentspace ndix UR/bead-v? It's also not actually using the alpha, but I haven't checked it yet without tangentspace enabled.

 

As an aside, I also noticed you were using mid-grey diffuse/ambient values for most of your mats, which I gather was unintended.

Share this post


Link to post
Share on other sites

I notice you are specifying tangentspace 1, yet not actually using normal maps. I tried creating some but it still crashed. Although interestingly it seems to crash during the cutscene, not if you just stand there and watch him. Is mesh-based alpha not compatible with tangentspace ndix UR/bead-v? It's also not actually using the alpha, but I haven't checked it yet without tangentspace enabled.

 

As an aside, I also noticed you were using mid-grey diffuse/ambient values for most of your mats, which I gather was unintended.

 

Does that map to isBumpmappable in kotormax? I feel like I've been getting that to work.

 

My thought process is:

 

- Mark mesh as bumpmappable

- Specify a bumpmap texture in the txi of the texture that's applied to the mesh

- Specify in the bumpmap texture's txi that it's a bumpmap

- Works fine in game?

 

Yes, the mid grey ambient and diffuse is unintended. Not sure how that always tends to happen. I feel like a student who submitted his homework and is now getting it graded haha

Share this post


Link to post
Share on other sites

Does that map to isBumpmappable in kotormax?

Yes. But I don't see much merit in bothering with greyscale bumpmaps when you could be using tangent space normal maps. But either way, that doesn't seem to be the problem. Even if I disable the tangentspace flag in the model and set the diffuse textures to just use a envmap, I still get a crash during the start of the cutscene. Although the alpha does now work, so I gather it is indeed incompatible with bump maps/normal maps.

 

I think the next step is to try chopping up the mesh into smaller chunks, see what that does.

Share this post


Link to post
Share on other sites

Yes. But I don't see much merit in bothering with greyscale bumpmaps when you could be using tangent space normal maps. But either way, that doesn't seem to be the problem. Even if I disable the tangentspace flag in the model and set the diffuse textures to just use a envmap, I still get a crash during the start of the cutscene. Although the alpha does now work, so I gather it is indeed incompatible with bump maps/normal maps.

 

I think the next step is to try chopping up the mesh into smaller chunks, see what that does.

 

Ah I see. I must have looked at the wrong bumpmapping tutorial. Interesting about the alpha maps... so do you think it is crashing because of the presence of both envmaps and mesh alpha?

 

I can chop up the mesh into smaller chunks, but it'll have to wait until I get home

Share this post


Link to post
Share on other sites

I notice you are specifying tangentspace 1, yet not actually using normal maps.

But I don't see much merit in bothering with greyscale bumpmaps when you could be using tangent space normal maps.

Ah I see. I must have looked at the wrong bumpmapping tutorial.

 

What you're doing isn't wrong, exactly, - you're making a height map, which you need to do to make a normal map. But there's a step after that. I use an Nvidia Photoshop plug-in to convert a greyscale height map to a proper RGB normal map. You have to be in indexed color mode to save it properly, but apart from that it's no more complicated than applying an effect. Although, I would suggest using a 50% grey background rather than black, since that serves as the default no-height-change value.

 

As an aside, I also noticed you were using mid-grey diffuse/ambient values for most of your mats, which I gather was unintended.

Yes, the mid grey ambient and diffuse is unintended. Not sure how that always tends to happen. I feel like a student who submitted his homework and is now getting it graded haha

 

Grey is the default color for materials in 3ds Max, I assume so highlights and shadows will be visible when a default material is applied. But of course it has to be white for KOTOR, even if the default is grey. I wouldn't feel too bad about it, though - you might remember the problem with Kreia was that her material was yellow, and that somehow made it into the game...

Share this post


Link to post
Share on other sites

you're making a height map, which you need to do to make a normal map.

That's one way of doing it, although the results are often somewhat lacking. At least in modern engines anyway. Odyssey is kind of useless when it comes to normal maps, so it doesn't matter too much. That aside, my preferred method is to generate normal maps from actual geometry, which shouldn't be a problem when you are making your own custom models.

Share this post


Link to post
Share on other sites

My suspicion is that there is some bad geometry or loose vertices or something somewhere in the model. If you use MDLedit's 'Minimize (weld) vertices (Ascii)' function, the crashing goes away. Personally, I recommend always using that setting unless it is messing something up for you (or you are doing very specific model comparisons etc.). First hint was that a mdlops compile 'just worked' (it doesn't separate out minimize/addition of vertices like mdledit does. in mdlops the option is just 'validate' yes or no, validation being minimization as possible and addition as needed. mdledit does addition as needed always, but lets you turn on/off the minimization as possible part)

 

There's a chance that number of vertices or something is an issue, but I doubt that. For me, it is much more likely that some bad geometry that could be collapsed confused MDLEdit into putting some bad calculations onto a vert somewhere.

 

I also noticed though that you have the classification of the model set to 'flyer' ... setting it to 'character' would help rule out another issue.

  • Like 1

Share this post


Link to post
Share on other sites

That's one way of doing it, although the results are often somewhat lacking. At least in modern engines anyway. Odyssey is kind of useless when it comes to normal maps, so it doesn't matter too much. That aside, my preferred method is to generate normal maps from actual geometry, which shouldn't be a problem when you are making your own custom models.

Well, yeah, there is that. It's definitely an easy way rather than the best way. But the best way would be to have actual geometry, which, of course, isn't an option here. It seems like a waste to me to go to the trouble of modeling that when it has to be simplified before going into the game... even if you do get a lot of that detail back with the normal map. But maybe it only seems that way to me because I'm more comfortable with texturing rather than modeling.

Share this post


Link to post
Share on other sites

I also noticed though that you have the classification of the model set to 'flyer' ... setting it to 'character' would help rule out another issue.

Oh yeah, I forgot about that one. I changed that to character, no difference.

Share this post


Link to post
Share on other sites

Well, I tried changing the base to character, turned off my awful height/bumpmaps and used `minimize (weld) vertices` option in mdledit...

 

... still crashes. It will load up the dialog most of the time, but if I alt tab in/out of the game it definitely always crashes

  • Like 1

Share this post


Link to post
Share on other sites

Haha, your bumpmaps aren't awful.

 

I tried splitting the mesh (and disabling bumpmappable) but it still crashes when using mesh alpha. It works fine with alpha set back to 1.0, so there's something screwy there somewhere.

  • Like 1

Share this post


Link to post
Share on other sites

Could you... possibly hex the 1.0 alpha value to a lower one and see if that crashes, to verify whether the problem lies within the alpha value or the compilation? Just a thought.

Share this post


Link to post
Share on other sites

When you say you 'turned off' the bumpmaps, do you mean removing the TXI information, or also turning tangentspace to 0? I just spent a bunch of hours debugging a crashy area level that was due to having tangentspace 1 on meshes that did not have normal mapped (or envmapped) textures. Dunno if that is an issue here, but it's probably worth making sure you disable tangentspace calculations during the ascii->binary compile when you are testing mesh alpha to get clean test results. I've only seen the issue on an nvidia device and, since it's a vanilla area model, it's not an issue with our compiler tools.

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.