User avatar
By Eric Lagman
#296704
JD,

I am having some issues going from the plugin to studio when using textures. I have a material that is embedded in the plugin that has a texture map applied to a body. I adjusted the tiling etc and everything looks good in the SW viewport.

If I render straight from the plugin the tiling does not represent what is shown in the viewport.

I opened up the file in studio and it looks like every object I had put a material on with a texture now has a new material called sw body (mxm9) or something like that and the tiling has been set to 1 instead of what I put in the plugin. All other parameters of this newely created material remain the same as what were in the plugin.

Any ideas on what is going on? Why is the plugin creating a new mxm for every material with a texture when it exports out the model to studio.
By JDHill
#296712
Thanks Eric, I'll look into it. I'm going to have a quick update coming due to the need for an x64 Rhino V5 installer, so I'll see what's going on here and get any necessary fix into the update. The description suggests that the plugin doesn't know there is a material assigned to the body; the name 'sw body mxm x' is the name of something auto-generated...are you absolutely sure the material you're seeing in Studio is really identical to the one in the plugin, aside from texture map tiling? I can't think of any way for that to happen - the material should be an all-or-nothing transfer, depending on whether it's ID is found in the body's data during export. That also doesn't seem likely though, because it apparently looks to be attached during your SW session. Possibly, you could take a look at the Output > Export > Multi-materials switch and whether or not the material is assigned to the body, or just to some of its faces. Like I say though, I'll take a look and see what I can find.
User avatar
By Eric Lagman
#296715
The material was applied at the part level, but the mxs was generated from a larger assembly the part was in. I will try and export it in just the part and see if it tries to auto generate the texture. Also I am sure the auto genarated texture was the same as the original plugin texture except for the name of course. It did not have the rendered preview as the thumbnail either. Just a solid color like all other autogenerated mxm's The weird thing is the original plugin mxm that I applied in SW comes in along with the autogenerated mxm, but its the autogenerated one that is applied to the body.
By JDHill
#296737
Thanks for the additional info. I'm trying to duplicate the issue using a decently-complex model (the Sea-doo sea scooter sample), assigning materials in parts, then rendering the assembly, or assigning them in the assembly, and so far I'm not able to come up with a scenario where assigned materials go missing.

As far as both the original material and a similar generated one coming in, that's understandable if only some of the entities are found to have the Maxwell material assigned during export. This is because at some point, when the Maxwell material was assigned, a SolidWorks material will have been created by the plugin and assigned in SolidWorks viewport. When this material is subsequently removed from the object, the plugin will try also to remove the SolidWorks viewport-appearance it created, but in some instances, the command to do this has no effect, and the SolidWorks appearance remains. If this part is then exported, the same texture map used in the previously-assigned Maxwell material will be still present in any material which is auto-generated for any part of the object, due to the plugin's normal method of inspecting the SolidWorks material during the material auto-generation process.
User avatar
By Eric Lagman
#296745
Ok got some more info for you. I took the sw files and texture maps associated with the mxm's home from work. I try it on my home machine and everything works as it should. Very strange. The main differences I can think of his my work pc is xp64 and my home is vista 64. Also on the work pc the texture maps were being refrenced from the server, while on my home pc I relinked the textures to my local drive. Thats the only differences I can think of. The tiling and everything remains in place from the plugin so that is good. I will try to put the textures on the local drive at work and see if that avoids the problem.
User avatar
By Eric Lagman
#296748
Ok one thing is still not working as expected. If I export out the multibody part that has mxm with texture maps applied to body level and face of same body it comes in ok with the multimaterial colored box next to the object. Problem is it only has one triangle group for that object, but this can be overcome by doing a triangle selection by right clicking on the correct mxm and dragging the mxm onto those selected triangles and giving it a group name. So not a deal breaker.

Now if I go into the larger assembly and export out with the same plugin setting the body that had an textured mxm on the body and face only comes in with one mxm applied to it. There is no colored mult-material box on the object as when I exported out from the part. I checked multi-materials in the plugin, re-exported and then it comes in like the part did. It has the mult-material box, and only one triangle group, but the other material is there, and can be discovered by right clicking the material in the material list and select assigned triangles command.

Hope that was not too confusing. I have always had issues with studio and triangle groups. Sometimes I get a ton of triangle groups for something I only put on a body, and other times I can have materials applied all over different faces of a body and only get one triangle group in studio. Its very eratic.
By JDHill
#296758
Thanks Eric, I think I can to decipher that. :) I am on Vista x64 here, using SW2009 x64 SP3.0, by the way.

One thing to keep in mind is that regarding texture scale, it will not get lost without the material being lost - that data is just as much a part of the material as any other aspect, and if the material is there, then the texture scale will definitely be there too. If it's not, then you're dealing with a totally different material, auto-generated by the plugin; there really are no two ways about it. It should also have nothing to do with where you are referencing texture maps from - if map paths specified in the Maxwell material aren't found, it will not prevent the material from being exported, along with all its texture scale parameters and such; any texture channels with missing maps will just be exported as disabled.

Regarding triangle groups, I don't really control too much about that, I just specify groups of triangles by index and give them a name and a material. How they show up in Studio is Studio's business. I just now modified the code that names them though. Problem is, SW doesn't have any kind of name for a face, so there's nothing meaningful to put there. I was using SW's 'face ID', but it looks like that is generally coming through as a zero. Now it will state the parent body name, and what the face's index is, as the body is exported. Still nothing that relates to the model in SW, but it's something.

About having alot of unnecessary triangle groups, let me know any other details you have about this. I recall this being possible with older plugins, but it should not happen now.
User avatar
By Eric Lagman
#296763
Ok thanks. Any idea on why multi material bodies come in different when exported from part vs assembly? Like I said it came in fine when exported from the part. It had a material with texture on the body and a different one on a face. When exported from the assembly the part lost the mxm with texture on the face and had the other one just applied to the whole body. As soon as I checked export multi-materials though it worked the same way as it did in the part. I can make it work by doing this, but just an FYI in case you see a way to fix it. Thanks for the help.
By JDHill
#296770
It's not really something to fix, it works that way because the export multi-materials switch is now a per-document parameter rather than a plugin-wide option. If you want it to default to this in all new scenes, enable the checkbox and then in the toolbar's Presets menu, choose Defaults > Store Current. All of the applicable Scene Manager pages have this feature in 1.8.2.
Will there be a Maxwell Render 6 ?

Let's be realistic. What's left of NL is only milk[…]