mdl problems exporting from max

Posted By: bs_twinbits

mdl problems exporting from max - 10/04/06 20:11

I'm using the export plugin from Malabar for Max, max2mdl.
The functionality is very nice, but now, I'd make some new exports with some prototype models and have problems now.(I'm using A6 Prof 6.50.2 , it happens also with 6.40) The problems are to get shadows and it seems the engine has problems with the Z-buffer now, because the sorting of the polygons is wrong. I opened this models in MED and save them again in mdl7 mode, but it makes nothing, the bug still exists.See the screens.
Bernd




Posted By: lionclaws

Re: mdl problems exporting from max - 10/04/06 21:38

hmm ...interesting,if you 've done all the necessary set up right;should be experiencing all the stuff.I export all the time...no problem,I am not certain why you getting these "wrong sorting" but will like to hear JCL explain though.
Posted By: jcl

Re: mdl problems exporting from max - 10/05/06 06:22

The engine has no z buffer and thus can hardly have any "problems" with it. A z buffer is a feature of the hardware.

So I guess it's a "read the manual" issue. You've imported your models with transparency. Transparency sorting is explained meanwhile in thousand threads all over the forum and also in the manual, so it should slowly become common knowledge. You can read about transparency and sorting on the "entities" page in the manual.
Posted By: bs_twinbits

Re: mdl problems exporting from max - 10/05/06 10:31

JCL, I didn't imported my models with Transparency, I can't remember. So the problem must be an other. I only turned on the flag "shadow" and "polygon" within the properties, not more!
Bernd
Posted By: jcl

Re: mdl problems exporting from max - 10/05/06 10:47

For making them intransparent, remove the alpha channel from the skin if it has any, and also make sure that the material alpha is at 100%.

I'm moving this to the beginner's forum as it is not a beta issue.
Posted By: bs_twinbits

Re: mdl problems exporting from max - 10/05/06 10:54

There is no alpha channel on the skins, the skins are BMP files, as I knew they can't store alpha channels.
JCL, I can't explain me what happens.
Bernd
Posted By: jcl

Re: mdl problems exporting from max - 10/05/06 10:57

Right, now set the skin material alpha at 100% and your models will be intransparent again.
Posted By: bs_twinbits

Re: mdl problems exporting from max - 10/05/06 11:01

JCL, I'm not at home, later after working I will do it. The problem is, that it's the same if I take the mdl directly as exported file from max, or I will open it in MED and restore it as an mdl7 model.
Bernd
Posted By: bs_twinbits

Re: mdl problems exporting from max - 10/05/06 11:03

OK , I will try it later and thank you for your help, I will report you what happens.
Bernd
Posted By: jcl

Re: mdl problems exporting from max - 10/05/06 11:15

I am not familiar with Malabar's plugin, but most importers also import the material, and if it's Diffuse.alpha value is only slightly below 100% you get transparency.

If that's not the reason for your problem, you can either ask again in the Ask Conitec forum, or contact the support. We'll then go step by step through your model settings.
Posted By: Grimber

Re: mdl problems exporting from max - 10/05/06 11:43

I'm not sure about the exporter you are using but It happens often when I import .3ds models that the models usualy DO have groups and materials assigned to them. Much of the time too the alpha will be set below 100 ( usualy at 0)

here is an example I'll show you

I downloaded a model of the spaceship from the Planet of the Apes movie (Charlton Heston version) that was in .3ds format

Imported it into MED.



Has many groups and materials already in it.



All the groups materials Alpha is set to 0 from the importing, so I would have to go through and manualy reset all the alpha values.


Your importer is probably doing the same thing, assigning an alpha value to each material/skin/group that is below 100
Posted By: vlau

Re: mdl problems exporting from max - 10/05/06 13:47

I'm using malabar exporter too and having the same
problem all the time, the workaround is set the flare
flag to off :

action myModel
{
my.flare = off;
}
Posted By: Grimber

Re: mdl problems exporting from max - 10/05/06 15:12

has to be a transparency issue then someplace. since my.flare=on sets transparency to 50%

got one of them imported models that is got problems that you can upoload? can look at it then

Posted By: bs_twinbits

Re: mdl problems exporting from max - 10/05/06 17:30

First I will say thanks to you Grimber and you vlau.
Thank you JCL, moving my thread to the beginners forum, thanks for your bad doing!
Ok Grimber, it's not a problem of the malabar exporter, the Alpha is still 100% after exporting. In earlier version of A6 the exporter form malabar makes no problems. So something must be changed in the engine, that this happens with the mdl models.
So vlau I will try your workaround. Thanks to both of you.
Bernd
Posted By: bs_twinbits

Re: mdl problems exporting from max - 10/05/06 18:33

Hi vlau...
I used your workaround, but it changed nothing. The problem still exists and also, my models have no shadows.
Bernd
Posted By: vlau

Re: mdl problems exporting from max - 10/05/06 19:50

Mmmm.... First, it works for me. To settle the problem,
I suggest you draw a simple cube in Max, assign a diffuse
map to your model then export it again.
Posted By: bs_twinbits

Re: mdl problems exporting from max - 10/06/06 04:58

Sure I will do it, at the weekend I have time enough to test something.
We will see what happens and I will report you what I find out.
Bernd
Posted By: vlau

Re: mdl problems exporting from max - 10/06/06 11:09

I have made a model with my.flare = off, and reproduce
the transparent problem similar to yours like the following
picture :



Fortunately, I found the following codes that was posted by
other forum member (sorry, forgot his name) and solve the
z-order problem.



Code:

material right_alpha_mat
{
effect =
"
technique right_alpha1
{
pass p0
{
zWriteEnable=true;
alphaTestEnable=true;
}
}
";
}

action right_alpha_acc
{
my.material = right_alpha_mat;
my.shadow = on;
}



If it still doesn't solve your problem, send your model
to MALABAR, may be he has a solution.

Good luck!
Posted By: bs_twinbits

Re: mdl problems exporting from max - 10/06/06 19:29

Hi vlau...thank you for your help!
I found out what the problem is. It's easy when you knew it, but until now I used only an older version of my A6 Prof. engine. So I did one export with the malabar export plugin and the same model again with an older export plugin for max. The goal was, that the export with the older exporter makes no prblems. So I'm searching the differens between these both models and found out, that malabar exporter sets the skin to 32 Bit by default. In MED you can open the skin settings now and change them to 16 Bit. 32 Bit skin A6 reads as a skin with Alpha.
So at the screens you can see my prototype actor with shadow and no transparency.Also the other MDL's are shown with shadows and in right sorting now.
Bernd









Posted By: vlau

Re: mdl problems exporting from max - 10/06/06 19:39

Ah, thats great!! its much better
than writing codes.
© 2024 lite-C Forums