[SOLVED]Select Element & Texture Question

Started by Primarina, January 18, 2016, 07:43:29 PM

Previous topic - Next topic

Primarina

I generally use wunderboy's importer/exporter in 3ds Max 2012 in my other computer, but since I currently don't have access to it now, I currently use Max 2015 with the use of wallworm's importer/exporter.

In 3DS Max 2012 when I used wunderboy's importer/exporter, I was able to easily get textures immediately when I prompted with a missing external files prompt. All I need to do was just find the right texture folder and I was able to get the textures easily. But my question is that how do I apply textures to the models in Max 2015 without drag and dropping the materials in the model as that will add extra materials to exported .smd file? Because I can't seem to get the textures the same way as I did in Max 2012.





However, the Select Element for Max 2015 doesn't seem to function properly as it will just function as if I am using select polygon unlike in Max 2012 where select element seems to function just fine as I can select whole pieces of the model. This issue also extends to functionally of the edit envelopes function as I seem can only select three vertices in Max 2015, whereas in Max 2012, I can select whole parts of a model.

3DS Max 2012


3DS Max 2015


3DS Max 2012


3DS Max 2015

CarbonCopyCat

For the textures, just use "Pick Material from Object" in the Material Editor (icon's shaped like an eyedropper and is in the top-left in Slate and is next to the drop-down menu in Compact). From there, just change the paths of the materials to the proper directories.
As for the "Select Element" issue, it seems like the vertices aren't welded together, so each face is an individual element, rather than an issue with Max itself.

K@rt

So long as the names and paths are correct there is no reason why adding the materials using CopyCats method above should add extra materials to the exported .smd

Primarina

#3
Quote from: CarbonCopyCat on January 18, 2016, 08:53:18 PM
For the textures, just use "Pick Material from Object" in the Material Editor (icon's shaped like an eyedropper and is in the top-left in Slate and is next to the drop-down menu in Compact). From there, just change the paths of the materials to the proper directories.
As for the "Select Element" issue, it seems like the vertices aren't welded together, so each face is an individual element, rather than an issue with Max itself.

I don't get the last part of your method. From the Material Editor, I can't seem to find a way to just change the paths of the materials to proper directories as I don't see any button or function in the Material Editor that can do that stated function.

Well, I tried the "Weld Vertices" function in the import list, but it doesn't seem to do any effect. Since you stated this is a Max issue which is odd because I never got that issue in Max 2012, is there a way to fix this issue?

Quote from: K@rt on January 19, 2016, 04:58:02 AM
So long as the names and paths are correct there is no reason why adding the materials using CopyCats method above should add extra materials to the exported .smd

FYI, I didn't use his method to put the textures. I selected the model and then just drag and drop, which through the textures appeared right, it ended giving the extra materials, which I already stated in the original post.

CarbonCopyCat

Quote from: Lopunny on January 19, 2016, 05:06:58 PM
I don't get the last part of your method. From the Material Editor, I can't seem to find a way to just change the paths of the materials to proper directories as I don't see any button or function in the Material Editor that can do that stated function.
If you're using the Slate Material Editor, the material you picked from the model should either look like this (ignoring the number of standard materials):



or this:



If it's the first, then double-click the Bitmap you want to change. This menu should pop up to the side; click the circled box and you should be able to change the path.



If it's the second, there's no bitmap assigned, so you need to assign one. Double-click the Standard material you want to change. This menu should pop up to the side; click the button, choose bitmap, and then choose the image you want the texture to be.



However, if you're using the Compact Material Editor, I can't really help since I don't use it much. You should be able to do things similarly though.

Quote from: Lopunny on January 19, 2016, 05:06:58 PM
Well, I tried the "Weld Vertices" function in the import list, but it doesn't seem to do any effect. Since you stated this is a Max issue which is odd because I never got that issue in Max 2012, is there a way to fix this issue?

You could just select all the vertices and weld them together in the Edit Poly modifier, but you may need to set the weld tolerance to a really low value (like 0.01) so it doesn't accidentally remove necessary vertices. It might mess up your skinning, so beware of that.

K@rt

CopyCat has given a clear explanation. Tbh it isn't making a lot of sense to me when you say that you are getting "extra" materials. In your smd a material name is given on a per triangle basis, with each tri starting with the name of the .vmt of the applied material. You cannot have more than one material applied to a tri within the smd. Any other materials would come from the .qc

When reexporting/compiling a model using WWMT you need to set the correct path names for the materials. I would recommend always assigning materials by using the eye-dropper tool. That will set up all the correct nodes for you in slate.

As for weld verts you can do it manually if it isn't importing welded. A lot has changed since Wunderboy/cannonfodder last updated their tools and anyway the whole process of decompiling and importing has never been 100% reliable. Smd importer would often also have problems with welding and smoothing groups which would have to be fixed manually.

Primarina

Quote from: CarbonCopyCat on January 19, 2016, 10:35:53 PM
Quote from: Lopunny on January 19, 2016, 05:06:58 PM
I don't get the last part of your method. From the Material Editor, I can't seem to find a way to just change the paths of the materials to proper directories as I don't see any button or function in the Material Editor that can do that stated function.
If you're using the Slate Material Editor, the material you picked from the model should either look like this (ignoring the number of standard materials):



or this:



If it's the first, then double-click the Bitmap you want to change. This menu should pop up to the side; click the circled box and you should be able to change the path.



If it's the second, there's no bitmap assigned, so you need to assign one. Double-click the Standard material you want to change. This menu should pop up to the side; click the button, choose bitmap, and then choose the image you want the texture to be.



However, if you're using the Compact Material Editor, I can't really help since I don't use it much. You should be able to do things similarly though.

Quote from: Lopunny on January 19, 2016, 05:06:58 PM
Well, I tried the "Weld Vertices" function in the import list, but it doesn't seem to do any effect. Since you stated this is a Max issue which is odd because I never got that issue in Max 2012, is there a way to fix this issue?

You could just select all the vertices and weld them together in the Edit Poly modifier, but you may need to set the weld tolerance to a really low value (like 0.01) so it doesn't accidentally remove necessary vertices. It might mess up your skinning, so beware of that.

Thanks for the explanations, but unfortunately I tried every single one of your methods, none of them seem to work at all.

And it seems like the Edit Poly modifier completely messed up the normals. Guess you were right about the Edit Poly messing up the skinning. Is there an another way to fix this "Select Element" Issue?

Quote from: K@rt on January 19, 2016, 11:17:31 PM
Tbh it isn't making a lot of sense to me when you say that you are getting "extra" materials. In your smd a material name is given on a per triangle basis, with each tri starting with the name of the .vmt of the applied material. You cannot have more than one material applied to a tri within the smd. Any other materials would come from the .qc




The textures rendered properly when I directly dragged & dropped the textures to the model itself. However, Max created new materials for the bitmaps for some reason instead using the materials the model provided itself.

As a result, the wallworm exporter created new .vmts from the new materials Max created when I exported to .smd format, resulting in messing up the model.

K@rt

Ah k, Max is making a new material. I never use drag and drop but I am guessing that if you have mutlisubobject materials and you drag bitmaps onto that then maybe Max doesn't know where exactly to substitute the texture so it makes a new material. Whatever the original cause, now it is like that, you simply need to set up the material correctly in slate, renaming/replacing the extra materials. Alternatively import the model again (into an new scene if you want) and use the dropper tool to grab the original material from the model, substitute in the correct bitmaps a la CopyCat above. Then reapply that to the model you are working on.

As for the normals... I am not sure why Edit Poly modifier will mess up all the normals but the subject of bad normals on a model came up in another thread recently: http://www.wallworm.net/index.php/topic,1499.msg4677.html#msg4677
In this thread it is explained how to reset the normals on a model.

However if you are trying to weld the vertices on and skinned/rigged model, the welding will probability mess up the skinning completely. Vertices in a model are identified by number and certain modifiers can become completely messed up if the number of vertices a model contains is altered (essentially its topology - because this causes all the vertex IDs to change) and normally skin modifier is one of those.



wallworm

From skimming this quickly, I think that the issue comes from the way WW Imports meshes. The Weld option only works when importing SMD files directly. When importing a QC File, WW will not weld the vertices of any mesh that isn't a $staticprop. This means that each triangle is it's own Element.

Avoiding that scenario is a feature request by many WW users who do a lot of importing. I have it on the TODO list but it's not high on my priority list ATM. I've just got too much work on my plate to look into that right now. Paying the mortgage takes precedence :)

In the meantime, you can do this:

Add A Vertex Weld Modifier (ABOVE THE SKIN MODIFIER). Then add a Poly Select Modifier. Now you can select elements as you'd expect.

Primarina

Quote from: wallworm on January 20, 2016, 09:53:46 PM
From skimming this quickly, I think that the issue comes from the way WW Imports meshes. The Weld option only works when importing SMD files directly. When importing a QC File, WW will not weld the vertices of any mesh that isn't a $staticprop. This means that each triangle is it's own Element.

Avoiding that scenario is a feature request by many WW users who do a lot of importing. I have it on the TODO list but it's not high on my priority list ATM. I've just got too much work on my plate to look into that right now. Paying the mortgage takes precedence :)

In the meantime, you can do this:

Add A Vertex Weld Modifier (ABOVE THE SKIN MODIFIER). Then add a Poly Select Modifier. Now you can select elements as you'd expect.

Well, I hate to say this, but I wasn't importing from a .qc file. I was importing from a .smd file, it had the same issue you described where each polygon had it's own element even with "Weld Vertices" on.

Also, I really do hope there an easier way to implement textures just like wunderboy's importer/exporter did, but I guess with the drag/drop and rename method for now.

wallworm

Quote from: Lopunny on January 22, 2016, 12:55:16 AM
Well, I hate to say this, but I wasn't importing from a .qc file. I was importing from a .smd file, it had the same issue you described where each polygon had it's own element even with "Weld Vertices" on.
I should also have added that the Weld option requires the Remove Bones (Becomes Staticprop) option. Which isn't generally an option with rigged models. So adding the modifier yourself is the current solution.

Quote from: Lopunny on January 22, 2016, 12:55:16 AM
Also, I really do hope there an easier way to implement textures just like wunderboy's importer/exporter did, but I guess with the drag/drop and rename method for now.
A couple of things. The WW importer will import your materials and textures automatically as long as your Modelsrc files and Materialsrc files are set up according to the docs on importing models and materials. See SMD, VTA and QC Importer and the docs on the Material Library Generator.

But even if you don't have all that set up correctly, WW still autogenerates the materials and the multimaterial for the model. This means that if you open up the material editor and click the Pick Material From Object button, you can select your model and the materials in it will be there along with their names. If the textures did not import, just add the texture(s) to the material(s)l that WW generated.

Primarina

Quote from: wallworm on January 22, 2016, 09:57:44 AM
Quote from: Lopunny on January 22, 2016, 12:55:16 AM
Well, I hate to say this, but I wasn't importing from a .qc file. I was importing from a .smd file, it had the same issue you described where each polygon had it's own element even with "Weld Vertices" on.
I should also have added that the Weld option requires the Remove Bones (Becomes Staticprop) option. Which isn't generally an option with rigged models. So adding the modifier yourself is the current solution.

Quote from: Lopunny on January 22, 2016, 12:55:16 AM
Also, I really do hope there an easier way to implement textures just like wunderboy's importer/exporter did, but I guess with the drag/drop and rename method for now.
A couple of things. The WW importer will import your materials and textures automatically as long as your Modelsrc files and Materialsrc files are set up according to the docs on importing models and materials. See SMD, VTA and QC Importer and the docs on the Material Library Generator.

But even if you don't have all that set up correctly, WW still autogenerates the materials and the multimaterial for the model. This means that if you open up the material editor and click the Pick Material From Object button, you can select your model and the materials in it will be there along with their names. If the textures did not import, just add the texture(s) to the material(s)l that WW generated.

I guess the modifier will have to do for now. I really do hope in the near future, you would add a weld option that doesn't require to use the remove bones option.  Thanks for the help though, but select element in edit envelopes still doesn't work though and I am not too sure if there's a fix for that.

As for the textures, so I guess the method I am using is correct, right? Still, I think the way how wunderboy's importer/exporter handled textures was a lot more better.

wallworm

Quote from: Lopunny on January 22, 2016, 12:15:59 PM
I really do hope in the near future, you would add a weld option that doesn't require to use the remove bones option...
Noted.

And so that this request finally stops hounding me... I will add this in the next update. QC/SMD importing has never been a priority of mine as it's not part of what I do. But I appreciate that users often want this. I just hope the userbase shows some appreciation. Generally when a crowd wants something, they get it and never donate or even say thanks. That is why I'm not always eager to add features that I don't use a lot myself.

Quote from: Lopunny on January 22, 2016, 12:15:59 PM
As for the textures, so I guess the method I am using is correct, right? Still, I think the way how wunderboy's importer/exporter handled textures was a lot more better.

The method you are using is not how I would approach it. As I said, Wall Worm creates materials every time an SMD is imported. Open the material editor and pick your model... and you'll see all the materials there. Just drag your bitmaps into Slate and connect them to the materials that WW created. No need to worry about selecting elements to apply materials then... it's all in the material editor.

Primarina

Quote from: wallworm on January 22, 2016, 01:05:37 PM
Noted.

And so that this request finally stops hounding me... I will add this in the next update. QC/SMD importing has never been a priority of mine as it's not part of what I do. But I appreciate that users often want this. I just hope the userbase shows some appreciation. Generally when a crowd wants something, they get it and never donate or even say thanks. That is why I'm not always eager to add features that I don't use a lot myself.

Thanks for the noting my request. I know you have been working hard on this tool and I make sure to thank you for putting all this effort in this tool.

Quote from: wallworm on January 22, 2016, 01:05:37 PM
The method you are using is not how I would approach it. As I said, Wall Worm creates materials every time an SMD is imported. Open the material editor and pick your model... and you'll see all the materials there. Just drag your bitmaps into Slate and connect them to the materials that WW created. No need to worry about selecting elements to apply materials then... it's all in the material editor.

I know the materials are there, but for some reason even when I put the bitmaps in the diffuse map, the textures still don't show up.



wallworm

#14
Quote from: Lopunny on January 22, 2016, 11:00:50 PM
Thanks for the noting my request. I know you have been working hard on this tool and I make sure to thank you for putting all this effort in this tool.
Indeed :) And do not feel I was talking about you specifically. In general, there are more people that use Wall Worm without so much as a High Five :) When some of those same kinds of users also make requests that I don't jump to, the reaction is often negative... and that often sours my desire to help.

In this case, the SMD Importer not welding verts of skinned models is something that many users have asked for since around 2013.

The reasons it's largely not necessary to me is that I rarely import QC/SMD much; when I do, it's just for reference in a scene. Unless you are going to change the actual topology of the model by remodeling it, then the vertices being welded or not has no actual affect on actions like adding/editing animations or adding/editing new skins. And if you are going to edit the model topology, you probably have to redo the skin weights anyway... so it's just not as necessary as is commonly expressed.

All that being said, it will soon be a moot point. I already added that to my local version of WW today. After testing some updates that are in this update, I'll release it.

Quote from: Lopunny on January 22, 2016, 11:00:50 PM
I know the materials are there, but for some reason even when I put the bitmaps in the diffuse map, the textures still don't show up.

If WW had found the VMT and bitmaps in the paths it's looking, then it would have been visible. Turns out that when it can't find the VMT, WW just creates a dummy material with the name of the face... and when this material is generated it doesn't get the setting to Display in Viewport. Starting in Max 2014? or so, the default state of new materials is to NOT display in the viewport. So whenever a material isn't displaying, select the material in the material editor and click the Display in Viewport icon at the top (it's a checkered box with a little light bulb).

In the next update, WW will set that automatically too.

SMF spam blocked by CleanTalk