Download

[TOOL] PolyWorld for the Unreal Engine!

Announcing PolyWorld for the Unreal Engine!

Polyworld is a world of high-performance Art and Code packs to help you create a flat-shaded, faceted world inside the Unreal Engine. ​This thread will contain all product information, screenshots, and development information so be sure to subscribe!

Unfamiliar with PolyWorld? Visit http://polyworld.qt-ent.com to see the goal of this series of packs. It’s currently only available for the Unity engine, but my goal is to bring the same functionality (and more) to Unreal!

9/28/2015:
Right now I’m working on converting landscapes to faceted meshes; maintaining the component-based mesh organization to help with performance. Here are some shots to show where I’ve been and where I’m going:

I initially started with writing a blueprint construction graph routine to convert landscapes to faceted meshes. I wanted to see what the performance would be when doing it with pure blueprints. It wasn’t bad, but when the landscapes got to be around 256x256, the generation took well over 5 seconds. I think this could be faster if the heightmap data was exposed through blueprint. I’m raycasting each vertex on the landscape to determine its Z position. I assume that’s the bulk of the time spent. Interestingly, the raycast would miss near borders of components, so I had to slightly nudge-in the source of the raycasts. Normals that were generated from the included CalculateTangentsforMesh won’t output what I need, so I also had to roll my own normals generation function inside blueprint.

Here is a pic of the result. It will generate X number of meshes based on the number of landscape components and create normalize UVs for lightmapping.

Much about landscapes is not exposed to blueprint, so I ditched all this work (still have it though) and went into C++. I’m from a C# background, so C++ is quite a transition. I’m feeling my way through, but getting better everyday. My goal is to make blueprint nodes that you can use to create PolyWorld terrains. The data I need is probably data everyone can use, so making these nodes can be handy for more than this purpose.

The code right now will generate mesh components, with quads, based on the landscape, but the Z positions of vertices is not yet applied. It’s quite interesting to dig around and see how the data is stored. This is a WIP shot of the custom C++ nodes I’m working with. It’ll be cleaned up as I get closer to a shippable product. That “GetHeightmapData” node is extracting the height info from the heightmaps of each landscape component. Looks like the red channel of the heightmap provides the height. It shouldn’t be hard to transfer this data into a Z coordinate for a vertex.

If you have any questions, let me know!

WOO!

This has made my day :smiley:

Questions -

  1. Will this work with the World Composition toolset?
  2. What are the target platforms for Polyworld? (Mobile? Desktop? VR? Etc.)
  3. What is the planned price point for this?
  4. Will there be a conversion script or tool for our assets much like there currently is for the Unity3d version of polyworld?
  5. What further plans do you have for this tool?
  1. I have to examine it further, but I’m not making anything that’s foreign to the engine. I’m just constructing meshes in code. If that system handles streaming meshes, then it should have no problem. The only issue I can think of is terrain visibility after a certain distance. There are also meshes and other things included that should work as expected.
  2. Any. I plan on having at least two LOD levels for each terrain component, so mobile shouldn’t be much of a problem.
  3. <100$
  4. Yes. The terrain code is what I’m working on right now. I’d like to also do a mesh/conversion tool, but the API doesn’t seem to contain the hooks for manipulating static and skinned meshes. I will have to examine further.
  5. The goal is to feature-match with Unity, but since this is the Unreal engine, I can put in features that are unique to the pipeline; things that might be easier to achieve. Nothing specific yet.

Good update for today. This faceted terrain has been generated from pure c++ code to blueprint. Getting the height values from the landscape was the most interesting part of the effort here. From digging through the UE4 Answerhub, most people are mentioning their method of reading pixels from a texture using the mips] array, passing that into BulkData, etc etc… Details are here.

I had some trouble with that, and in the end I’m sure it could’ve worked, but instead I chose the functions included in the FLandscapeEditDataInterface class. There you can get the heightdata as a unit16* array (by passing it as uint8. refer to source), but the thing I tangled with is understanding how to convert that data into actual Z coordinate data for the vertices. Basically, if your landscape has a resolution of 31x31, that’s the size of your heightmap. 31 verts across, 31 verts down; 31x31 = 961 vertices. However, the TArray you’re passing to the GetHeightData function is of a length 9612. Each element is a byte, but every 2 elements are representative of a 16bit value. I would do 256element[x+1] + element[x] to get the 16bit integer value (0-65535), then remap the range to the Unreal landscape range of -25600 to 25600 and boom, Z position. That was a new exercise for me.

Looking up the correct array element based on the landscape component was fun too. If anyone reading this needs more info, just reply here.

Next up is reading the weightmaps and the landscape basecolor texture2ds at the correct mapscale to be able to sample that color per landscape vertexUV. Get the final lerp’d pixel color, then map that to a vertex color array that gets used by the faceted mesh. Average the vertex colors within a triangle and you have faceted color. Here’s hoping it’s easier than the heightmap data.

I know nothing about developing blueprints, but I had been doing alot of research into terrain deformation and one post from a dev here had some insights into accessing heightmap data at runtime. This is probably a complete misdirection on my part, so apologies if it’s not helpful or completely out of context.

Hi.

When is this going to be available?
I really want this tool. I believe its something i’d been looking for all around.
Any ETA?

Also, will this work on mobile?

The generation for the terrain can be a bit slow. I have some things to try before publishing it. I also have some contract work to get through, so I’m aiming for a release before the end of the year.

It also looks like I can’t access vertices of static meshes, so I can’t convert a character or prop to the faceted style yet. Talking with some Epic engineers might be in order.

Since landscapes get converted to meshes, yes I suppose it will work just fine on mobile if you can budget things to run on it.

I’ve been following your work for a long time, can’t wait for this to come out. I’ll be a day one buyer. Keep up the good work!

Any news on when PolyWorld will be available for Unreal?
And will you be able to get it for free,when you already bought it for Unity.

Hi. Any updates on the plugin??
Have been eagerly waiting for this one.

Thanks everyone. I paused work on it due to some other projects that needed to be done sooner. Here is a status update on where it is now:

  1. The generation of the terrain is slower than I’d like. I imagine it’s because of how I look up the pixels in the terrain textures to apply to the polyworld mesh. Some optimization has to be researched there. Using a lower mip map of each texture would help.
  2. The procedural mesh generation class in UE4 doesn’t support more than 1 UV channel, so static lighting isnt’ currently supported.
  3. There is no standard mesh class that I can use to access the vertex data of static mesh actors, so right now I can’t develop a character/prop converter. I’ll have to poke around here on the forum and ask around.

Trust me, I’d love to get this out to you as it’s very popular in the Unity Asset Store. I feel these items need to be fixed before I can confidently ship! If anyone has any informatioin on them, by all means share!

Sorry! Purchasing assets in a separate engine is a new purchase.

Hey, big fan of your work. I’ve been following you since before the polyworld release. I can wait on this because I know it’s best to have a polished product, however I have a question. I also have unity 5 so would I be able to export anything I make in the unity polyworld version out and import it into unreal engine 4? I have some models I’d like to make low poly and I’d like to start to start my project sooner than later.

Starkium,

You’ll need an exporter for that. I only convert meshes into the engine’s proprietary format.

Sick! I’ve been using your tool for Unity for quite sometime now. Awesome job man! Can’t wait to try the UE4 version :smiley:

This is going to be a must buy for me.

Awesome!

Is there any news about this tool? I have been struggling so much to get a flat, low poly landscape shader to work properly. I am hoping this will be my salvation :stuck_out_tongue:

It’s still on hold until there is a suitable mesh api available. I need a good mesh api to be able to convert props to faceted props.

awesome, can´t wait for it