Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / Autodesk 3ds Max / 3ds Max Design 2012 / Maxstart.max and medit.mat
  RSS 2.0 ATOM  

Maxstart.max and medit.mat
Rate this thread
 
63741
 
Permlink of this thread  
avatar
  • Dan_Cole
  • Posted: 21 January 2012 07:45 AM
  • Total Posts: 20
  • Joined: 21 December 2009 06:41 PM

hope someone can help.

I’ve created a maxstart.max file with objects in the scene. These objects have assigned materials.

On start up the materials do not load in the material editor but can be found by navigating to the scene materials.

I then made a library containing the materials in my scene and saved over my medit.mat file

Now on startup, yes the materials appear in the material editor, but they are not assigned to the object. Further more if you go to the scene materials the material assigned to the objects are there too (as expected), meaning a duplicate of my material.

So if I assign the object with the material in the editor max brings up the assigning material dialog box stating a material with the same name already exists in the scene.

If that makes sense, my question is that can you please edit max so on startup max has objects in the scene with assigned materials AND these materials are shown in the material editor?

Thanks in advance for any help.

- Dan
Twitter: @DanCole3D



Replies: 1
/userdata/avatar/avatar_14884.gif

In the maxstart.max file load the materials into the editor before saving the scene. Anything saved in that scene is loaded at max start and reset. If you don’t save the materials in the editor, then it won’t be loaded with the scene and will need to be loaded with each start.

-Eric

Author: PiXeL_MoNKeY

Replied: 21 January 2012 11:10 AM  
avatar
  • Dan_Cole
  • Posted: 21 January 2012 07:02 PM

Thanks for the reply Eric.

Sadly this isn’t the case, from what I’ve experienced and from reading several post the material editor is one of the few things which isnt effect by the maxstart.

Saving the scene with materials in the editor and assigned to objects, they wont be on the editor on re-start. You have to navigate to the scene materials. The only way to have materials loaded into the material library is to change medit.mat file

Doing so though the objects are not assigned to these materials but have their own set of scene materails.

It is this I am trying work out. How to have objects actually assigned to materials in the material library on startup.



Replies: 0
avatar
  • Location: West Midlands, England, UK
  • Total Posts: 14445
  • Joined: 06 August 2007 11:06 PM
  • Permlink of this post

I am at a complete loss to understand what the problem is here. The only statement in any of the above that I can confirm is that Maxstart.max will not “pre fill” the material editor - that has to be done via Medit.mat. This has, AFAICR, always been the case.

As for the other points I’m not seeing the described behaviour at all.

Start Max, create a few Boxes, create the same number of (simple) materials. Apply all but one of the materials to the Boxes. In my case I had 4 boxes and 4 materials with 3 of them applied.
If using the “Compact” editor then nothing more needs to be done, but if using Slate then Instance the materials (all 4) onto the Sample Slots and remove them from the working “view”.
Save the scene and close Max.
Open Max, open the scene and the sample slots contain the Materials they had before - even the one material which was not applied to an object. The Scene Materials, quite correctly, only shows 3 because of the 4th one not being applied.

If you’re seeing something different then we need to find out why, because it shouldn’t be happening.

Please create an example scene (as described above), zip and post it here so we can take a look.

Also, lets have some details please. Max or Max Design, 32/64bit, what renderer, what type(s) of Material, brief system specs.



Max 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.

Attachment Attachment
Replies: 0
avatar
  • Dan_Cole
  • Posted: 22 January 2012 12:07 AM

hey Steve sorry for not being more specific. Perhaps you are right and I am seeing something different as when I load my scene the materials are not being shown in the sample slots.

First off I’m running 64bit max 2012 on an i7 proc, 6gig Ram, windows 7 machine with VRay Edu 1.5 sp6

using your example I have made a scene with 4 objects, 4 materials (3 of which are assigned to objects) and have saved this as maxstart.max see jpeg ‘mastart’

on reboot of max see jpeg ‘reboot’ my material browser is the ‘default’ library which loads (as you would expect as this is loading the medit.mat file) the materials have not been ‘pre - filled’ the only way to see the scene materials is by going to scene.

now i have added the 4 materials to a material library and saved it as medit and over written the medit file in my enu>defaults>MAX.vray folder see jpeg ‘medit’

now on opening max again the material have loaded in the slots, yes. see jpeg ‘openmaxagain’ but these materials are not assigned to the boxes. (you can see reflect mat is not assigned nor are any of the materials which have loaded)

and by going to the scene materials they can be seen here. so by assigning the material which loaded in the material browser i get a ‘materiel with the same name ...’

what i am trying to accomplish, is on start of max, geometry is loaded, this geometry has assigned materials, AND these materials are pre loaded into the material slots in the editor.

thank you all for your help so far. really is appreciated. attached is also my maxstart and my medit files

- dc



Attachment Attachment
Attachment Attachment
Attachment Attachment
Attachment Attachment
Replies: 0
avatar
  • Location: West Midlands, England, UK
  • Total Posts: 14445
  • Joined: 06 August 2007 11:06 PM
  • Permlink of this post

Multiple things there - the main one being that you didn’t ZIP the scene/medit files - such files will not attach unless zipped. See this post for help with attachments.

Next up - I did not suggest saving the scene as Maxstart. That won’t work (for the material editor) as I mentioned above. The only way to do that is through Medit, but that in turn will only work on a new scene (having just loaded Max or done a File > Reset). Maxstart would usually not contain objects - it’s designed to be a “clean restart” file (useful for setting up default settings whenever you start a new scene). It is not treated in quite the same way as a normal scene which is why they’re not being loaded. Also, because the objects have materials and the editor has different materials with the same names you’ll get the problem of duplicate names. Scene materials are not instances of library materials - they are copies.

What you’re trying to do is not, I feel, possible - at least I can’t get it to work even using an embedded (persistent) callback script to manually force the scene materials into the editor.



Max 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.

Replies: 1
/userdata/avatar/tr6c236mh_studio lighting test1.jpg

Sorry for not zipping, thanks the post link.

and thanks for all the help, its a shame it isn’t possible but at least now I Know. I think the easiest work around would be on the maxstart opening, eye dropping all my objects into the material editor.

Again Steve thanks for the help, appreciated.

Author: Dan_Cole

Replied: 22 January 2012 11:54 AM  
avatar

So a few more thoughts on this, but not sure if they will work for you:
1) Use a Slate View to Store your Default Materials in the maxstart.max scene. Put your default materials in a Slate View, name the View something like “Default Materials”, and save the maxstart.max file. The View will be preserved and the materials will still be assigned.
2) It can be done through a callback, but only supported on scene reset. So if you are willing to manually reset 3ds max everytime you start it, then you can make it work with the CME.

-Eric



Eric Craft
“The Evil Monkey hiding in your closet.”

Replies: 1
/userdata/avatar/tr6c236mh_studio lighting test1.jpg

oo thanks for this, im trying 1 now

are you able to please provide any links regarding the callback. im not too clued up on scripts…

Author: Dan_Cole

Replied: 27 January 2012 08:43 AM