Help: Importing VTF brushes workflow/settings? [EP2]

Started by darendark, December 06, 2016, 02:46:22 AM

Previous topic - Next topic

darendark

Hello, I've previously been fooling around with Wallworm and ran into a lot of lighting problems trying to make my Hammer brushes into models using this program. (See my post history) It didnt work out and decided to invest in Wallworm Pro to see if this would fix my issue. It only sort of did. http://imgur.com/a/C7P3P

I am looking for a way to import a vmf from Hammer into Wallworm Pro 3DS Max, convert it into a model and use it in Hammer.

Here is my workflow:
1. Save vmf Hammer file with a group of brushes that I want to make into a model.
2. Open the latest version of 3DS Max and wallworm pro (All at the default EP2 preset settings) and use the "Import VMF" tool to import the brushes.
3. Wallworm Model Tools> Convert Scene to Model
4. Wallworm Model Tools> Wallworm Model Tools
5. I change the name, and I don't export any of the textures because all the textures are already from the game. I believe the game is supposed to use the original VTFs.
6. Recently using this technique I've been getting this result: http://imgur.com/a/QdFtU


As you can see, the results are always in some way flawed. I am unsure of what else to do, as there are a lot of different options in the settings panes (ie different exporters to choose from and the MAXscript stuff) Im willing to learn how to work with this clearly powerful tool, but its just kicking my ass at every turn. If its not too much to ask, could anyone provide me with the appropriate steps to convert brushes into models with the same textures I've used in hammer. If at all possible, could you please let me know what settings I need to set my wallworm models tools window and the settings pane in order to get results?

Thanks for reading!

wallworm

I have a feeling that the issue is the Materials (as opposed to the textures). While you do not need to re-export textures (which are VTF files) you do need to export the materials. This is because the incoming materials are probably LightMappedGeneric which is not supported by models.

So something you need to do is open each material on the model in the material editor, go to the WW settings on the material, and check the For Model option then choose VertexLitGeneric. Make sure the WWMT is using a Material Path that won't send any of the materials to the same folder where they already exist (because you don't want to overwrite and break any of the brush materials). Then in WWMT UI, click Export VTF for the model (which exports both VMT and VTF) and check all the Material (VMT) checkboxes and export.

Now the materials should work.

As for the window and bad shading, that is likely due to the smoothing groups blending with faces on the sides of the model. If the incoming brush has nodraw on the sides, use the delete tool texture option in the Convert Scene to Model rollout. If not, then select the model, go to polygon sub-object mode and delete all faces that are not visible (like the outside rim). That or make sure that the front and side do not share the same smoothing group. Then re-export the model.

darendark

#2
Hey there! Thank you for taking the time to explain all this to me! I seem to have gotten the result I was looking for!

However, to get this result it took me quite a bit of fiddling with the material editor. For instance, I had to tick "receive flashlight" and disable "Advanced Detail Settings" (which makes the textures dark by default. but perhaps this setting is useful for when you're making your own models),  and enable the detail scale. Edit: I just realized that I would only need to do this once per model, so maybe its not that bad, since once you export the vmts once you dont have to do it again..

Is it possible to automate the process of changing the smoothing groups? I can do it now, but it sure is a pain to select every brush individually. And if there's a way to automate my proccess with the material editor, that would be helpful too.

Thanks again! My models actually work now!  :D

wallworm

Here's the thing about your requests:

1) The materials that the brushes bring in are LightMappedGeneric materials with their own set of settings. There isn't really any way for me to know programmatically what settings any particular user wants/doesn't want from any material (other than that the model shader should change to VertexLitGeneric). But considering that the user needs to choose what path to save to, etc, etc... it's really just something that you need to accommodate on your own. You can make MAXScripts to mass change the values to what you want... but each case would be a different set of values. I might write a dummy script that users can customize when I get a free minute.

2) Smoothing groups: this is really a problem of bringing in brushes. The thing is that the way you make a brush requires that complex things are composed of multiple convex shapes where the majority of the sides are not used (for brushes sent to the game, the game engine compiler throws away all those sides). I don't really have any fast way to detect what sides to throw away other than material detection. And in terms of the smoothing groups, WW simply keeps the smoothing groups on those faces from the actual brush. So if you want a fast way to delete faces or edit multiple face smoothing groups, assign all the faces you want to remove a material like NODRAW and then the scene to vmf tool can delete the faces or you can select the faces with epoly face matID selection tools.

Hopefully this helps you understand the process some.

darendark

Thanks for the explanations! I think as I get more familiar with the tools and workflow I'll figure out how to speed up my process. You've been a great help. :D

darendark

Hi again,
This is a similar issue, so I decided not to start a new topic.
I'm trying to convert models from Hammer brushes again using Wallworm Pro. I am using stock textures, so I am only exporting the .vmt

I have ticked "For Model" in the material editor, so my materials are VertexlitGeneric.

When I view the model in the modelviewer, it doesnt show up. I can see the wireframe version of it, but the stock textures do not apply for some reason.

Here is what it looks like in the model viewer:



For some reason, in Wallworm, when extracting the vmt, Wallworm puts the vmt in a different folder than my material folder:
(The reason I mention this, is because last time I did this and it worked, wallworm put the materials in my specified materials folder)





So I am at a loss as to how to trouble shoot this. It seems the model is picking up the texture, but its not really visible. Any insight would be great! :)

wallworm

Sorry about your confusion. This is something that I need to document more.

There are several factors that can control the output of a VMT for a model. (For world textures, it's always the full name of a material, so this discussion is just model materials).

The output path of a model's VMT is normally controlled by the material path in the WWMT helper. But this isn't always the case. Sometimes your model is using materials from several different paths (like when you are taking a few different models that use different paths and then turning them into a new cluster). In that event, there is no need to create new materials. So if you use the Convert Scene to Model function, you'll notice that it exports the materials from their original full paths.

To change this behavior for the WWMT that created it, select it's WWMT Model and open the modify tab. There is a checkbox for Full Material Path. Turn that off and re-export the WWMT model's materials. Note this option is not in the main WWMT floater, just the modify tab.

That should solve the problem.

Let me know if this helps.

wallworm

Just to clarify, this was recent change in WW that models created with the Scene to Model function will set the Full Material Names to true. It's a change we needed with some of the work going on in Black Mesa. So just remember to uncheck that option if you are just collapsing brushes. I'll make an update that will check to see if there are any MDL nodes in the collapse--if not fall back to the previous way.

darendark

Hey, thanks a lot - this was exactly the issue, it seems!

SMF spam blocked by CleanTalk