Search - User list
Full Version: Unreal_Material Attribute on Terrain/Landscape not working?
Root » Houdini Engine for Unreal » Unreal_Material Attribute on Terrain/Landscape not working?
ZN-Games
Hi there,

i've created a little digital asset containing a heightfield, some noise and erosion nodes.
After these nodes i added an attribute_create (name:unreal_material class: primitive type:string), and tried to asign some unrealmaterial by copypasting the path from within unreal to the string field.
Problem is: this doesnt work in unreal. There is always assigned standard world grid material.
I also tried unreal_face_material as name, but documentation says unreal_material for landscapes?!?

Any ideas?

Here is the network:
chrisgreb
In my testing it seemed to work if the material reference is hard coded in the “Attribute Create” node instead of using a channel reference. For example: Material'/Engine/EngineMaterials/CubeMaterial.CubeMaterial'

There may be a bug in how that string expression is being evaluated by the plug-in. I've added a bug report for it.
ZN-Games
Yeah, hardcoding the material reference did the trick!

Another question regarding landscape/terrain materials:

Is there already a way to let the digital asset create and bake (& save) splatmaps inside the unreal project for the used unreal material? This would be awesome! I mean saving a splatmap from inside houdini and importing it in unreal afterwards, isnt a problem, but it might be cool if the splatmap could be automatically get updated, when changing parameters on the terrainassets interface.
chrisgreb
Yes, your heightfield Layers will be imported as Landscape Layers in UE4, if that's what you mean.

http://www.sidefx.com/docs/unreal16.0/_landscapes.html [sidefx.com]
dpernuit
Hi,

Just a few more info on the subject:

The unreal_material (and unreal_material_hole) used for landscapes in the plug-in are used for a “default” assignment of material on your generated landscape.
You also have the option to override these materials, by changing the materials on the assets itself in unreal.
(in the Houdini Generated Meshes part, in the details panels).

These overriden materials will be kept even if you recook the asset, and will override the “default” material assignement.

All the additionnal “layers” on the heightfield node (mask, cliffs, edges, bedrock etc…) are automatically created when the heightfield is converted to a landscape by the plug-in, and are updated when the asset recooks.
They are created in the HoudiniEngine/Temp directory, and should already be assigned and “paint-ready” on the generated landscapes.
ZN-Games
With the above example the final output has all heightfieldlayers, but there is only one landscape layer (bedrock) created in unreal, the others seems to be ignored…

Unreal Version is: 4.15.0-3299760+++UE4+Release-4.15
Houdini : 16.0.547
dpernuit
Normally, all these layers should be created with the landscape too.
Are those missing layers “flat”?

Unreal just ignores layers when they just have a single value…
They should be there if they have any kind of information.
ZN-Games
I just did another test, using terrain hills from the terrain fx tab, packed them into a digital asset and imported it to unreal …. same here, only the bedrock layer shows up.
I will update to 16.0.550 and give it another try.

Edit: Same with 16.0.550 …. bedrocklayer only
dpernuit
That's probably because the missing layers are “flat” (all white / all black).

If you look at the different layers on the terrain hills (by adding an isolate_layer node in houdini), you'll see that they are all flat, except the bedrock one.

As I've mentionned earlier, if some layers are missing, it's certainly because they have been discarded by Unreal because they are flat..
ZN-Games
This is strange, I've checked all my layers by using the isolate_layer node as you mentioned and every layer besides the mask layer isnt flat.

Right now, my network is really really simple:
heightfield —> heightfield noise —> erode —-> output(null)

I've changed the heightfield size to 4033x4033 and in the erode node i've hit the compute range button (under visualization tab) and played the timeline to frame 10 after that.
All the other settings are at default & untouched.
dpernuit
Oh, I see what the issue is:
if you are using the erode node, you'll notice that on your first frame, all layers but the bedrock are flat.

Even if you advance the timeline to frame 10 in Houdini, and compute those frames, this will not be the case in Unreal, as instantiating the HDA in Unreal is like importing it in a new instance of Houdini.
What you have in Unreal, is actually your hda at frame 1.

(you can check this by going to file > open Scene in Houdini in Unreal, this will allow you to analyse the content of the houdini scene in Unreal.)

To have the erosion node active, add a timeshift node after the erosion and control the “frame” there.

Here's a simple hda that does this.

(also make sure to use the latest version with it)
ZN-Games
Thanks a lot!
My terrain now has all the layers in unreal.
I had to delete the channels on the timeshifts framenumber field to get it to work.
Sometimes Unreal can't save these layers, but after restarting everything is fine.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB