|
Author
|
Topic: Assigning material values in Max
|
Nat Pilot
|
posted 05-17- 06:59 PM
Yep, another Q about Max.. that I need an answer to that even I will understand  Dealing with terrain tiles... How do I alter the materail value of some faces in am object only? I tired what seemed the obvious route, and just assigned selected faces the water material, then mapped it with the tif and exported, but after putting it in the game it's remained the same. Can someone give me a walk through of this? Thanks Guys ~Nat~ IP: Logged |
Bryan Russell Pilot
|
posted 05-17- 08:21 PM
Nat,The only thing I can suggest is that if you use OPS to import the meshes, then you can format the MAX material name in a special way to acheive this. The format is &<mat_name>_<flag>_anything For example &wood_00 or &water_00 the 'anything' bit is just so you can have many '&wood_00's e.g. &wood_00_one, &wood_00_two. its just text so you can do anything you like. If you want two polys with the same texture but different OP material then just create two MAX materials both using the same bitmap and then name them differently. Then using a Editable mesh select faces and assign each material. The other thing you can use this for is to assign poly flags, which is the '00' bit in the examples above. E.g. &wood_E0_abc would make the poly 2-sided in SDOE. I hope that helps IP: Logged |
JG5Jerry Pilot
|
posted 05-19- 04:36 AM
Does OPPs support Max's Multi/SubObject materials? If it does, then you're in luck, and I'll tell you how to use these  ------------------ C/O Jagdgeschwader 5 'Eismeer' http://www.madasafish.com/jerry/jg5/
IP: Logged |
Nat Pilot
|
posted 05-19- 06:51 AM
Thanks.. I'm getting a little lost with Bryans explination (Sorry Brian) So any help is good help.. see with the tile it's all land right now, but obviously I want the faces around the island to be water material.. and this is where I'm stuck.IP: Logged |
Bryan Russell Pilot
|
posted 05-19- 07:28 AM
Sorry Nat,Here's (Hopefully) a simple version: If you look in the material panel in MAX, it has all of the coloured balls, and each of the materials might have a name like 'Material #1' or something similar, unless you have changed them of course. NOTE that when you first add a Bitmap to a MAX Material (a Map) the panel ini the material editor will show the map values an it will have a name like ‘Map #1’ in the combo box at the top. Just click on the combo boxes button and select the actual material again. What you need to do is change the name of the material from (for example) 'Material #1' to '&water_00_seatif'. When OPS imports the OBJ file, it also loads the associated material file, and it decodes the Max Material names (the thing we changed to '&water_00_seatif' above) as: & = this is just a tag to let OPS know that a formatted name follows water = the name of one of the OpenPlane supported materials. The list is in the OpenPlane doc _ = The underscores are just a separator for the 'parameters' 00 = This is the hexadecimal poly flag. You can set this to what ever you want based upon the values detailed in the OpenPlane doc. For example you might want to change it to E0 (1000 0000) to turn 2-sided on seatif = this is a freeform alpha numeric thing so that you can have more that one max material with the same OP material and poly flag value. It can be anything but I use the texture name (without the path and extension) as a convention. So now you have renamed all of your materials, you can use 'Sub-Object' = faces while the max modifier stack is in 'Editable Mesh', select the faces you want and then apply the appropriate MAX material. For some reason ‘Mesh Select’ and ‘Edit Mesh’ do not allow you to apply materials to individual faces. If the stack is not in ‘Editable Mesh’ then you might have to collapse the stack, or at least call up the ‘Editable Mesh’ from the bottom of the stack. If you need different faces that use the same texture to have a different OP material, then just create two MAX materials, both using the same bitmap but using the appropriate name format. You will still be able to texture map the whole object even though there are actually two materials involved. Let me know if there is anything that doesn’t make sense and I’ll clarify it. Bryan
IP: Logged |
Nat Pilot
|
posted 05-19- 11:22 AM
Now thats what am talkin bout! Thnaks Bryan, that helps 100%, I'll be working on it again later so I'll let you know how it goes, but from your explination there I don't see there being any problems.Thanks alot Bryan  ~Nat~ IP: Logged |
Nat Pilot
|
posted 05-19- 07:04 PM
OK Brian, it's kinda taken me 1 step forward and 2 steps back, it's helped in that I've been able to alter the tile to water.. .but although I only selected the faces I wanted to alter, it changed the whole tile.. so it's all water now. Plus, it doesn't show that map once in SDOE ( I haven't checked the asc file yet, is there another way to do this without extracting the whole terrain?)So, to sumerise, it's change the whole tile and not just selected areas, and I've lost the texture. I may have done something wrong.. basicaly I: selected the faces that I wanted to change, ignoring backfaces and showing normals.. Opened Material editor, edited the drag down box showing the material name to what you showed me above, applied this. Closed Material editor and colapsed the stack, exported firstly using Jonny Ow thing, and then using the other. I tried both in OPS one after the other, both had similar results in the game, all water, no texture Any hints are very appreciated, and thanks for taking the time Brain ~Nat~ IP: Logged |
Bryan Russell Pilot
|
posted 05-21- 09:17 PM
The most important thing is to select the faces when the stack shows 'Editable Mesh', not 'Mesh Select' or even 'Edit Mesh'. It is probably easiest to collapse the stack *before* you select the faces just to make sure. This is the most likely problem that is occuring is you select some faces and the material gets applied to the whole object. If on the other hand it works and looks good in MAX, then I would suggest that you don't use the Johnny Ow plugin for this. Reason being that the Johhny Ow plugin does not support materials and OPS will just use the same texture and OP material for the whole model, based on whatever the first poly of the original mesh is set to. With MAX2OBJ, if you get this problem then it is possible that the material file is not being exported, or it is not being exported correctly. If you were trying to sort out shading problems using the the Johnny Ow plugin then it will cause a problem becuase of above. I have just about finished the VRML thing ( A huge pain in the ass, believe me) so stick to MAX2OBJ and you should be able to use VRML for the 'final' when it is released. Bryan
IP: Logged |
Nat Pilot
|
posted 05-22- 07:47 AM
thanks Brian... I guess it don't help me much that I'm trying to get this done as fast as I can... but you know how it is  Thanks ~Nat~ IP: Logged |
Nat Pilot
|
posted 03-17- 11:04 PM
Yipee!!! Thanks for the talk Argon, it's helped me dig through these old threads again, and with my better understading of Max now I'm really hopeful I can crack this now!!!Cheers Argon ole buddy  IP: Logged |
Nat Pilot
|
posted 03-18- 01:16 AM
again this failed, I followed Bryans instructions above, and when that didn't work I tried using the material value instead of the name still with no success.Do I need to export using Materials and Create Material Library? I tried that at first, but when I then imported the tile into OPS it also imported the texture file reference with a bad flag, and terrain tiles don't have singular texture file references. If someone with Max could help me out here or Bryan maybe have a moment to advise it could reap very large rewards in the terrain building  IP: Logged |
ArgonV Pilot
|
posted 03-18- 02:42 AM
DOH!  IP: Logged | |