Author Topic: Best way to convert model to displacement?  (Read 4730 times)

kody_

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
  • Acolyte
    • View Profile
Best way to convert model to displacement?
« on: March 08, 2016, 03:25:49 PM »
Hello, I am trying to convert a model into valid geometry for use in source.
The models are from another game and I want to make a novelty map for CS source.
The area is a large outdoor area making source not the best engine for this but I am sure it can be done.

I attempted this years ago by importing the models into hammer and manually making brushes to match the buildings and making displacements to match the terrain but it became too tedious and I abandoned the project. After discovering all the wallworm tools I have a new hope that this map may be achievable.

Here is a screenshot of the map:


My question is what tools should I use to make this happen? I am not very familiar with 3ds max.

Can shellvex make valid convex brushes from a model like the building in the background of the screenshot?

Can I somehow convert the terrain into displacements and apply a bitmap for the alpha channel similar to this topic?
http://www.wallworm.net/index.php/topic,1297.0.html

I understand this kind of area is not suited for the source engine and the map would be hard to optimize. but I could reduce the draw area with fog right?


wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3497
  • Karma: 98
  • Behind me?
    • View Profile
Re: Best way to convert model to displacement?
« Reply #1 on: March 08, 2016, 07:42:23 PM »
OK, the quick answers:

My question is what tools should I use to make this happen?
Wall Worm Model Tools, ShellVex and WW Displacements.

Can shellvex make valid convex brushes from a model like the building in the background of the screenshot?
Yes.*
Can I somehow convert the terrain into displacements and apply a bitmap for the alpha channel similar to this topic?
Yes
but I could reduce the draw area with fog right?
Yes.*
I am not very familiar with 3ds max.
This makes the process more challenging.

I'll try to provide a better and more in-depth answer a little later this week.

kody_

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
  • Acolyte
    • View Profile
Re: Best way to convert model to displacement?
« Reply #2 on: March 08, 2016, 07:57:47 PM »
Thank you for the quick response, now that I know there is a way I'll try and learn as much as I can.

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3497
  • Karma: 98
  • Behind me?
    • View Profile
Re: Best way to convert model to displacement?
« Reply #3 on: March 08, 2016, 08:12:50 PM »
Can't go into too much tonight, but you can use the thread you linked to above... and mix into it the use of using Conform tools in Max to conform your WW Sculpt Mesh (a consolidated version of displacements) to the terrain that already exists in your scene. You can look into the Conform Brush in the Graphite Modeling Toolbar. (EDIT: I earlier posted Conform modifier, but I meant to include the Conform compound geometry... but avoid that right now as displacements will crash when using it at the moment.)

For the props, the easiest (but somewhat dirty) method is to break each section of props into individual objects (assuming this is all one giant object) and then go to Wall Worm > Wall Worm Level Design > Models > Quick WWMT. When you do that on a selection, each selected object becomes a prop with the default settings based on the checkboxes, etc. For this scene make sure to have Use Local Origin and Origin in SMD on.

For the ShellVex of the background building: the cleanliness of the mesh will help get best results. It often takes some practice with the settings to get the results you want. You should first separate the building from the other meshes (detach if one mesh) before applying a ShellVex, because using ShellVex on a mesh with thousands of faces could be slow (which would be the case if you apply it to the terrain).
« Last Edit: March 08, 2016, 08:27:02 PM by wallworm »

kody_

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
  • Acolyte
    • View Profile
Re: Best way to convert model to displacement?
« Reply #4 on: March 08, 2016, 08:39:33 PM »
Okay, I will look into the conform tools and the WWMT.
I'm going to try and familiarize myself with 3ds max over the next few days now that I know what to look for.
Thank you again for the help.

kody_

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
  • Acolyte
    • View Profile
Re: Best way to convert model to displacement?
« Reply #5 on: March 10, 2016, 11:26:00 AM »
Im having problems with the scale of the imported model.
It is too small, when I scale it, the dimensions don't actually change it only appears larger.
But when I try something like XForm modifier or Rescale World Units utility nothing is resized but instead all of the individual models get moved further apart and the terrain gets ignored.
before:
 
after:
 


edit: Figured it out, I had to apply the xform modifier first, then scale, then reset xform.
I'm going to leave this post here in case anyone else has this problem too.
« Last Edit: March 10, 2016, 01:03:13 PM by kody_ »

kody_

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
  • Acolyte
    • View Profile
Re: Best way to convert model to displacement?
« Reply #6 on: March 12, 2016, 06:53:23 PM »
I am having an issue getting brushes exported from 3ds max to align correctly in hammer.
The model that I start with is not on grid, I started by cleaning the model up, then taking portions and turning them into seperate valid brushes.
I then add the brushify modifier to get the convex brushes on the grid, but when I export them to hammer they are not aligned.
Here they are in 3ds:



And this is what it looks like in hammer:


Can you think of why they are looking like this? I have verified that my grid is setup correctly as per your video on the grid.

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3497
  • Karma: 98
  • Behind me?
    • View Profile
Re: Best way to convert model to displacement?
« Reply #7 on: March 12, 2016, 07:51:24 PM »
It's hard from the screen shot to tell exactly. My email is in the WW readme. Click File > Save As > Archive and create a zip of the scene and email that to me. I'll look at it and see what is amiss. Often times one of the functions to adjust is the Auto Edge setting (in both Brushify and in ShellVex). Using this setting can often be helpful. If it's something else, I can figure it out if I have the scene.

kody_

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
  • Acolyte
    • View Profile
Re: Best way to convert model to displacement?
« Reply #8 on: March 12, 2016, 08:03:17 PM »
I sent you an email with the attached file.

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3497
  • Karma: 98
  • Behind me?
    • View Profile
Re: Best way to convert model to displacement?
« Reply #9 on: March 13, 2016, 12:34:59 AM »
I've had a chance to look at the files you sent. There are some things I can share but I'll leave the bulk for tomorrow.

Assuming the FBX is 100% accurate to what you had originally in Max, then here is what I must point out. Because VMF files store information about brushes based on three points per side, only some vertices in a brush node actually exist inside the VMF data. Those that are not stored inside the VMF are derived. Because of the way the sides are sliced, you can often see inside Hammer points that are not where you expected. In other words, even if you make an object with all points on the grid, those points that aren't part of the set that are stored in the VMF can be unexpected--and this explains why for years you can save a VMF in Hammer and open it later to find that a brush that was valid when you made it is suddenly off grid or even invalid. Usually this comes with brushes that are not cut along certain angles.

I have several tips to share on this, but it's too late for me to discuss. I'll try to take some time tomorrow to write up an article on this topic and ways to get around it.

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3497
  • Karma: 98
  • Behind me?
    • View Profile
Re: Best way to convert model to displacement?
« Reply #10 on: March 13, 2016, 02:44:41 PM »
I was going to write up more about what, exactly, is going on here, but there is already long-standing information on this (as the reason it's happening with a WW exported scene is identical to why it happens in Hammer). It's simply how the information is stored inside the VMF (and how Hammer itself handles this when opening VMF files).

Read this thread for a discussion from 2012 (regarding Hammer): http://forums.steampowered.com/forums/showthread.php?t=2954025
I've attached a Max scene with the original brushes you sent in FBX along with a copy. The image attached here shows the scene. I edited the brushes that work in this manner:

Reduces the 4 brushes to 2 brushes. In the processed, removed the unnecessary slice. This helped reduce brush count and brush sides, and reduced the number of vertices that need to align. The alignment was problematic because the brushes had sides that were causing problems because of very narrow face normal.

Generally, you have three choices with things like this:

1) If it's a func_detail, just ignore it unless it causes visual problems.
2) Turn it into a prop
3) If it needs to affect vis, rethink your design process and build the brushes with Source engine requirements in mind with brushes (as I did with the remade brushes).

Hopefully the linked thread, what I wrote earlier and the new info help you understand this issue.