PDA

View Full Version : model problem


jrc24
07-13-2004, 08:59 PM
hi

I modify a mask model,

if I just move parts of this mask, export, convert to bin with mdlops, no problem, I get the modifications.
(here I use new mdl generated by mdlops, but I keep old mdx)

if I move some vertex, export, convert to bin with mdlops, vertex modifications are ok, no problem, but my texture become black, and metal or glass reflection is not same as before.
(here I use new mdl and new mdx, if I don t use mdx generated by mdlops, I don t get the modifications)


if somebody knows about that, thanks

cchargin
07-13-2004, 09:46 PM
Hello,

here I use new mdl generated by mdlops, but I keep old mdx
I have to warn you that mixing .mdl and .mdx from different models can cause kotor to crash.

if I move some vertex, export, convert to bin with mdlops, vertex modifications are ok, no problem, but my texture become black, and metal or glass reflection is not same as before.
When editing in max did you apply "unwrap uvw" to the model? If you do and then change the underlying mesh it will erase all of your uv coordinates.

Did you change the texture map name, and forget to copy the new texture map to override?

Before you convert the ascii model to binary, open it up and seach for "bitmap". Make sure that each "bitmap" entry has a valid texture name, and that you are copying those textures to override.

If none of this works, send me the ascii .mdl exported from max and I will take a look at it.

jrc24
07-13-2004, 11:37 PM
I have to warn you that mixing .mdl and .mdx from different models can cause kotor to crash.


Thank you for the warning


When editing in max did you apply "unwrap uvw" to the model? If you do and then change the underlying mesh it will erase all of your uv coordinates.


No


Did you change the texture map name, and forget to copy the new texture map to override?


No


Before you convert the ascii model to binary, open it up and seach for "bitmap". Make sure that each "bitmap" entry has a valid texture name, and that you are copying those textures to override.


That is not the problem


If none of this works, send me the ascii .mdl exported from max and I will take a look at it.


I send you the .mdl exported from max and the right tga file

thank you very much

cchargin
07-14-2004, 12:18 AM
Hello,

As I say, it is always the obvious things that get you.

If you look at your ascii .mdl you will see the lines:
ambient 0.3 0.3 0.3

The ambient option controls how much light the object reflects. If you want the object to look fully lighted you need to set it to:
ambient 1.0 1.0 1.0

To make a model look shiny like metal you have to create a .txi file and adjust the alpha layer in the texture. You should ask Svosh about this stuff, he knows it better than I do.

Finally, to make a mesh transparent, you have to find the following in your asii .mdl:
alpha 1.0

Change it to a value less than 1 and that mesh object will become transparent. I do not know any way to adjust this with max+nwmax.

jrc24
07-14-2004, 01:04 AM
ok thank you very much for these precisions

I put ambient 1.0 1.0 1.0 and it is better but that is not enough, it is not a problem, I will just put ambient 2.0 2.0 2.0 (right or not ?)

but

there is a problem with the small glass wich is in the front of the mask (I don t edit this part)

I have a txi file for reflection wich works fine if I don t modify the mask model

I keep the same txi file, but when I watch my new mask model in game, the reflection is not same

------------Good reflection--------------------------Bad reflection---------

http://module5.free.fr/mask3.jpg http://module5.free.fr/mask4.jpg

do you know something about that ?

cchargin
07-14-2004, 02:05 AM
Hello,

I put ambient 1.0 1.0 1.0 and it is better but that is not enough, it is not a problem, I will just put ambient 2.0 2.0 2.0 (right or not ?)
The values for ambient are from 0.0 to 1.0.
Each number corresponds to a color channel so:
ambient 1.0 0.5 0.0

would reflect 100% red light, 50% green light, and 0% blue light.

If the texture is still too dark, then you will have to make the texture brighter in a paint program.

I have a txi file for reflection wich works fine if I don t modify the mask model
In the model you sent me the texture name is:
i_jrc24visor.tga

Your .txi is named i_jrc24visor.txi right?

I made a .txi with "envmaptexture cm_baremetal" in it. I also modified the texture you sent me, I changed the alpha for the glass to 50% and it worked.

jrc24
07-14-2004, 03:12 AM
ok, I think you don t see the problem with reflection but it s normal, I don t explain very well what is the problem

I say bad reflection but the reflection works

but

do that :

compare the glass reflection of the model that I sent to you with the glass reflection of g1_i_mask03 (the original model)

you will see the difference

the original model (g1_i_mask03) reflect light on glass as if glass is bent (convex - i am not english, I hope you understand)

the modified model reflect light on glass as if glass is flat

good reflection - original model

http://module5.free.fr/mask7.jpg

there is a small band of reflected light on black glass

-------------------------------------------------------------------------

bad reflection - new model - when no light on glass

http://module5.free.fr/mask5.jpg

bad reflection - new model - when light on glass

http://module5.free.fr/mask6.jpg

the light is reflected on all the glass
it looks like the glass is flat

I think you see the difference now but how can we fix that :confused:
I don t know but perhaps it is not a small problem :(
I hope i m not right ;)

cchargin
07-15-2004, 02:18 AM
Hello,

Ok, now I know exactly what is going on. Yes, this problem is being caused by mdlops.

A problem has come back to haunt me.

What is going on here is that mdlops does not calculate vertex normals when it creates models. This is something I left out because it requires a lot of math and I did not think it would affect much.

But, now it looks like I have to fix it.

jrc24
07-15-2004, 06:41 AM
ok cchargin, I m happy to hear that

inform us when you release the new version of mdlops, I m sure many people are interrested

I send you encouragement

and thank you very very much for your work