Author Topic: Quad mesh to displacements  (Read 162 times)

VanderAGSN

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
  • Acolyte
    • View Profile
Quad mesh to displacements
« on: November 02, 2018, 01:15:15 PM »
I apologize for the huge screenshots. I do not know how to put them in the spoiler. I ask administrators to correct and not close the topic because it is important for me. Thanks

Hey. I am doing a project in another program, because it is easier for me with the interface there. This is Cinema 4D, so I prepared a scene

from there, this is one huge object with quads, exported to fbx for 3ds max. I tried to export small 8x8 polygons objects, after which a window appeared with the inability to apply polygons to displacement
.
Nevertheless, I wonder if it is possible to take a ready-made terrain, and already in 3DS Max it is easy to make displacements from this?



P.S. If there is no Editable Poly modifier, and Plane from 3DS Max is used with the Plane modifier, then everything works. With Editable Poly it is not possible to make displacements from it. I will be very happy to help, thanks
« Last Edit: November 02, 2018, 01:18:24 PM by VanderAGSN »

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3561
  • Karma: 98
  • Behind me?
    • View Profile
Re: Quad mesh to displacements
« Reply #1 on: November 03, 2018, 08:06:51 AM »
Welcome to WW.

The Planes to Displacements function only works on Plane primitives.

For other objects use the Polys to Displacements in the Anvil Displacement tab. Note that the Displacement Tab in Anvil is now the legacy tool for displacements. Instead, use Wall Worm > Wall Worm Level Design > Launch Displacement Floater. Then use the All Quads or the Selected Quads buttons to create displacements from the quads of selected objects.

Note that making displacements from Non-Brush surfaces is no longer recommended in WW. You should start with brushes in Max as the base. Not doing this is likely to create some visible tearing between displacements due to rounding errors. Also, you should only create displacements from planar quads. I'm not saying the whole surface needs to be planar, but each quad should be completely flat.

I am working on a new displacement tutorial video. Until that is out, refer to the Displacement Chapter in the Hammered to the Max e-book which you can download from that link.

VanderAGSN

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
  • Acolyte
    • View Profile
Re: Quad mesh to displacements
« Reply #2 on: November 03, 2018, 08:24:58 AM »
Thanks for reply and helping, can we expect displacements support via editable poly? It is very difficult for me to 3ds max as a modeling program unfortunately.. Is it technically possible? Vertexes will be the same amount. Polygons too. Therefore, I would be very happy if you did this in the near future

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3561
  • Karma: 98
  • Behind me?
    • View Profile
Re: Quad mesh to displacements
« Reply #3 on: November 03, 2018, 08:41:41 AM »
You must misunderstand the information above. Editable Poly is supported for displacements. The All Quad Faces function in the displacement floater will convert all Quad Polygons of the selected objects into displacements (so each polygon becomes a displacement).

Unfortunately, an understanding of Max and WW displacements is necessary for successfully using the tools. But what you are looking for is already supported if you want to turn each quad into a single displacement.

VanderAGSN

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
  • Acolyte
    • View Profile
Re: Quad mesh to displacements
« Reply #4 on: November 03, 2018, 09:02:12 AM »
I mean that my 8x8 (Power 3) displacement from fbx could be turned into WW displacement with the same vertices positions. I need that in the one displacement were all 4x4 or 8x8 polygons, and not every quad into a separate displacement. Is it even possible to do so that all 8x8 or 4x4 polygons can be turned into one displacement? Thanks

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3561
  • Karma: 98
  • Behind me?
    • View Profile
Re: Quad mesh to displacements
« Reply #5 on: November 03, 2018, 10:00:48 AM »
OK, I see what you mean.

This is not supported and will unlikely to ever be supported. The way displacements work is that they are a tightly controlled type of editable poly with very strict vertex order rules. I have no plans to add support for converting any arbitrary mesh directly into displacements beyond those tools inside Max.

I understand that this is inconvenient for you since you would rather sculpt the displacements in another application.

However, there is a workaround.

  • Create your landscape in your preferred app
  • Bake the landscape into a heightmap and save as a bitmap
  • Create the displacements inside Max with native WW functions*.
  • Convert all your displacements into a Sculpt Mesh in WW
  • Add a Displace modifier to your sculpt mesh
  • Load your heightmap into the displace modifier and increase the strength until the landscape looks right
  • Commit your sculpt mesh

* ADDED NOTE: Since you are going to use a height map, make all of these displacements on one flat plane.

VanderAGSN

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
  • Acolyte
    • View Profile
Re: Quad mesh to displacements
« Reply #6 on: November 06, 2018, 09:59:21 AM »
Tried heightmaps, does not fit. The architecture is located on different axes, not only on Z. Still thanks for the help, but your method does not work personally for my purposes. I will look for a way to create a script that will make the displacement from editable poly

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3561
  • Karma: 98
  • Behind me?
    • View Profile
Re: Quad mesh to displacements
« Reply #7 on: November 06, 2018, 10:56:14 AM »
I presumed you were doing meshes like in the opening post where a heightmap is a valid solution.

I think that you are going to have far more luck and less frustration by actually building the displacements inside 3ds Max. I understand this is challenging if you are not familiar with the sculpting tools in Max--but I think that the amount of time it takes to get successful arbitrary meshes into Source Engine displacements will not be worth it in the end. What you are hoping to accomplish has been something I have considered many times and several years of experience and expertise on this topic makes me conclude it's just not worth the hassle because of the very strict vertex and face ordering requirements and the way displacement information is stored in Max/WW.

There is a new video coming out soon that gives a current overview of working with displacements in WW. Perhaps that will help you.

VanderAGSN

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
  • Acolyte
    • View Profile
Re: Quad mesh to displacements
« Reply #8 on: November 06, 2018, 05:40:29 PM »
Thanks for the answer. I do not like the fact that in 3ds max everything is much worse in terms of visuals, at least for me. Cinema 4D look's very smoothly, more intuitive development process. Also in 3ds max, while editing the brushes and other things, the process itself hangs on me with wallworm. Without it all ok. In 3ds max 2018, your plugin does not work correctly at all. Brushes not exported, or through time. In 2016, everything is fine . I was told that in wallworm pro there's is no such problems, but unfortunately I donít have money for it

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3561
  • Karma: 98
  • Behind me?
    • View Profile
Re: Quad mesh to displacements
« Reply #9 on: November 06, 2018, 06:21:31 PM »
If you give me more information on how your brushes are set up or send me a sample scene that is not exporting, then I might be able to help you. The exporter works fine in 2018 with the free version. Make sure you install the 2018.4 update as it is the best version of 2018 for WW.

Generally speaking, when new users explain that something doesn't work, it most often simply means they haven't got Max/WW set up correctly and/or they are unfamiliar with some of the setup/steps. The more I know about your setup the easier it is for me to help guide you through the process.

Joris Ceoen

  • Global Moderator
  • Full Member
  • *****
  • Posts: 217
  • Karma: 23
  • WallWorm Ambassador
    • View Profile
Re: Quad mesh to displacements
« Reply #10 on: November 09, 2018, 10:01:29 AM »
Also in 3ds max, while editing the brushes and other things, the process itself hangs on me with wallworm. Without it all ok. In 3ds max 2018, your plugin does not work correctly at all. Brushes not exported, or through time. In 2016, everything is fine . I was told that in wallworm pro there's is no such problems, but unfortunately I donít have money for it.
I understand where it comes from, but I think, like Shawn stated, that most of the problems you might be experiencing are due to the fact that indeed, there is not a full understanding of 3DS Max as a program, or perhaps by extension about the Source Engine. Every displacement in Source still needs to have a base brush from which faces have been converted. This methodology remains identically the same in 3DS Max/Wall Worm, so if you're trying to do something that simply is not possible in Source, will also not work in 3DS Max. To fullfill your wish, you would need to have a script or program that could detected the measures of your displacement mesh, calculate all those vertices and map coordinates, and then kinda guess that's going to be the big brush it needs etc etc etc, that's just too much of a hassle I'm afraid  :( Would such a thing exist, that would be amazing, but then again if I'm allowed to be honest, that 'reverted' process is really just not the correct way to go about it.

Aside from that, I can proudly say that there's no other program in the world that possibly gives you so much power for editing and/or creating displacements outside of Hammer than Wall Worm. Once everything's perfectly set-up, this is a dream come true.
I think that you are going to have far more luck and less frustration by actually building the displacements inside 3ds Max. I understand this is challenging if you are not familiar with the sculpting tools in Max--but I think that the amount of time it takes to get successful arbitrary meshes into Source Engine displacements will not be worth it in the end.
I agree completely! I think the videos will be extremely helpful  :)

VanderAGSN

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
  • Acolyte
    • View Profile
Re: Quad mesh to displacements
« Reply #11 on: November 14, 2018, 01:55:45 AM »


Imported VMF to Wallworm. And as I see it - here is not Plane.

Question. Can I manually make my brush as a position, and only then insert my own 4x4 or 8x8 displacement instead of the original?

VanderAGSN

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
  • Acolyte
    • View Profile
Re: Quad mesh to displacements
« Reply #12 on: November 14, 2018, 02:08:23 AM »
UPD: For some reason, after exporting and importing the same scene in fbx - displacements are no longer so...

VanderAGSN

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
  • Acolyte
    • View Profile
Re: Quad mesh to displacements
« Reply #13 on: November 14, 2018, 02:28:10 AM »
When I import fbx, every WW Displacement becomes an Editable Mesh, after converting it to Editable Poly it's still does not want to be exported as displacement, although I donít understand why. Since the basis of the Brush and everything else is fully present

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3561
  • Karma: 98
  • Behind me?
    • View Profile
Re: Quad mesh to displacements
« Reply #14 on: November 14, 2018, 05:18:44 AM »
Displacements in WW are very tightly controlled Editable Poly objects that have a very specific structure and custom attribute tied to them. They can only be created directly inside 3ds Max with any kind of sanity. I know that you are hoping to generate and edit these in external apps but that is not going to be an easy quest for you. I know the ins-and-outs of the system like no one else on this planet and I wouldn't bother with even trying it because you are already working inside the world's premier 3D editor in Max anyway.

But to explain the very basic technical requirements:

  • All Displacements and their Displacement Brush (not the actual brush) should always be and remain forever Editable Poly objects. Using other types of object types (editable mesh) will cause errors.
  • Each Displacement is composed of 2-3 objects: 1) Displacement; 2) Displacement Brush; 3) Optional Actual Brush
  • Each Displacement and Displacement Brush must always be identical in vertex count, vertex order and face count.
  • The vertex order in the displacement must ALWAYS match the vertex order of a native Max Plain object that has either 4, 8 or 16 length/width segements that is converted to ediable poly
  • UVs should never be relaxed; ALL UVS in a displacement must remain projected planar to the displacement as if it was flat (before sculpted); UV transformations (rotation, scale, offset) should only be edited uniformly across the entire displacement (like when using a UVW Xform modifier.
  • Displacements will only export if they have the correct custom attributes applied to the displacement and the displacement brush
  • Even if the displacements have custom attributes designating them as displacements, they must properly reference the displacement brush and store valid data relating to the displacement--likewise with the displacement brush
  • If tied to an actual brush, the side it's tied to must always be 4-sided.

There may be even more that I'm not thinking of off the top of my head. All it takes is for anything to change (like vertex order, etc) and the displacement is broken. When exporting to FBX many of the values within the custom attribute and necessary parameters are lost because they are not retained in the FBX.

There isn't much more that I can add that will help at this moment other than I strongly urge you to just use 3ds Max to edit your displacements. Also, I see in your screen shot that you are using Max 2016. I strongly urge that you update to 2019.2 if that is a possibility. There are many speed enhancements that effect working with displacements (both creating and exporting).