Need working sample for a Material

 
 
 
Posted by:psaii
Data created:2 August 2010

Hello there,

I'm in the process of evaluating Max.NET for our tools. I currently have severals plugins written in C++ I want to port to C# using Max.NET. So far, I was able to write a basic exporter, a controller, a modifier, a new object, but I can't figure out how to write a material plugin... So far I was able to have it showing up in the material list, but when I try to select it, either max crashes, or it selects a standard material instead. Anyone has a sample he would share ?

Thanks  & lot,

Hi Michel,

I have not yet tried to create materials with Max.NET, I did just create a working sample of a Texmap plugin with UI (which I will post with next build of Max.NET). I'll see if I can cook up a material sample for you as well.

Regards

Marsel Khadiyev (Software Developer, EPHERE Inc.)

Sounds good, thanks a lot :)

Do you guys have a rough idea when the next version will be out, by the way ?

 

Shouldn't be long, maybe in a week or so. There have been a lot of changes/improvements that I need to merge into the main branch and also a bunch of fixes still pending. I hope to try and write a material sample this week sometime.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

If your texmap sample works in the current downloadable release, could you post it somewhere ?  Maybe it will help me in the mean time.

Question 2 : regarding the UI (in your texmap plugin), are you embedding a C# form inside the rollout somehow ? or is it still the (limited) auto generated UI we can see in the samples ? if it's not possible to use regular forms (bypassing the whole parameters framework if needed), do you think it will be at one point ? so far that's the only limitation that bugs me ;)

Thanks,

If your texmap sample works in the current downloadable release, could you post it somewhere ?  Maybe it will help me in the mean time.

It doesn't work in the currect build, it will in the next one. I will post a sample with it.

Question 2 : regarding the UI (in your texmap plugin), are you embedding a C# form inside the rollout somehow ? or is it still the (limited) auto generated UI we can see in the samples ? if it's not possible to use regular forms (bypassing the whole parameters framework if needed), do you think it will be at one point ? so far that's the only limitation that bugs me ;)

For now the UI is auto-generated. I have the WinForms embedding on my TODO list though. Meanwhile you can pop up a WinForms dialog on BeginEditParams (or CreateParamDlg in Textures/Materials) and close it on EndEditParams- its not ideal but a workaround nevertheless.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

Cool, thanks for the answer ;) I'll wait for the next version then, got plenty of stuff to test in the meantime.

As far as the UI goes, I'm happy to hear embedding forms is on your list. I'm now experimenting with the concept you're using with zookeeper (as far as I can tell from the videos), beeing having an app docked in Max directly.

Keep it up,

---
Psaii