Recommended Posts

Nice to see it updated.  Just three things.

First: Blender 2.80+  makes meshes double-sided by default. So the code to turn the lightsaber blades double-sided  is redundant and results in a trace back error when imported.

Second: I imported a character model and exported. Some of the tangentspaces read as tangentspace false instead of tangentspace 0. This lead to a mdledit error. Changing all instances of tangentspace false to tangentspace 0 let the model go through and everything worked as intended.

Third: Unsure if the next one is a bug or user error, but I had some trouble getting any  alpha other than 1.0 to export.

  • Light Side Points 1

Share this post


Link to post
Share on other sites
13 minutes ago, Hunters Run said:

First: Blender 2.80+  makes meshes double-sided by default. So the code to turn the lightsaber blades double-sided  is redundant and results in a trace back error when imported.

Second: I imported a character model and exported. Some of the tangentspaces read as tangentspace false instead of tangentspace 0. This lead to a mdledit error. Changing all instances of tangentspace false to tangentspace 0 let the model go through and everything worked as intended.

Third: Unsure if the next one is a bug or user error, but I had some trouble getting any  alpha other than 1.0 to export.

Thanks for the feedback. I've fixed the first two issues you've found. Regarding alpha: where are you expecting it to be set? Currently alpha is written to and read from the Multiply shader node (the second input).

  • Like 1

Share this post


Link to post
Share on other sites

I have a question regarding kotorblender but the model format in general.

I have compiled a model with kotorblender and in the face section of a model I found the following line:

138 136 130  1  138 136 130  0

As far as I understand the first 3 entries are the number of vertices which are connected to form a triangluar face. The 4th entry is the smoothing group right? What does the lost entries mean.

When I used Kotorblender to export a model the very last entry (0 in aboves example) was changed by Kotorblender from 1 to 0.

So could you tell me more what this does?

Thanks a lot and stay safe!

Share this post


Link to post
Share on other sites
38 minutes ago, Crazy34 said:

I have a question regarding kotorblender but the model format in general.

I have compiled a model with kotorblender and in the face section of a model I found the following line:

138 136 130  1  138 136 130  0

As far as I understand the first 3 entries are the number of vertices which are connected to form a triangluar face. The 4th entry is the smoothing group right? What does the lost entries mean.

When I used Kotorblender to export a model the very last entry (0 in aboves example) was changed by Kotorblender from 1 to 0.

So could you tell me more what this does?

Faces have the following structure:

vertex_index1 vertex_index2 vertex_index3 smooth_group uv_index1 uv_index2 uv_index3 material

The last value, i.e. the material, does indeed get lost unless the model node is a walkmesh. This is the behaviour of original KotorBlender and I don't think it's necessarily wrong. Exported area models seem to work ok regardless of the lost information.

  • Thanks 1

Share this post


Link to post
Share on other sites
13 hours ago, seedhartha said:

Thanks for the feedback. I've fixed the first two issues you've found. Regarding alpha: where are you expecting it to be set? Currently alpha is written to and read from the Multiply shader node (the second input).

Well, I would set the alpha in the principled bsdf of a texture to 0.3. Then export and check under the texture that I set the alpha.  The alpha would still be 1.0.

Share this post


Link to post
Share on other sites
9 hours ago, Hunters Run said:

Well, I would set the alpha in the principled bsdf of a texture to 0.3. Then export and check under the texture that I set the alpha.  The alpha would still be 1.0.

Alpha is controlled by a separate shader node, which multiplies diffuse texture alpha by model node alpha. You need to change the latter for alpha to be exported - this is by design.

  • Thanks 1

Share this post


Link to post
Share on other sites
15 minutes ago, seedhartha said:

Alpha is controlled by a separate shader node, which multiplies diffuse texture alpha by model node alpha. You need to change the latter for alpha to be exported - this is by design.

Got it, thanks for your help.

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.