Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.24 Alpha 2 V2 Foliage Bugs #21

Closed
adracott opened this issue Jun 11, 2020 · 4 comments
Closed

4.24 Alpha 2 V2 Foliage Bugs #21

adracott opened this issue Jun 11, 2020 · 4 comments

Comments

@adracott
Copy link
Collaborator

Hey So I tested out the latest version and played around with the foliage and had some feedback/bugs to report:

Bug #1- When I added a second instance of the same foliage generating HDA to the level, it wouldn't initially work (though it did generate "invisible" foliage instances all over the entire landscape instead of where I was telling it to place them. They showed up in the foliage window but not in level). When this happened the first instance was still working like normal. Its like the mask I was using was being ignored, and it was generating the instances over the entire landscape but was then invisible. Deleting that foliage from the foliage window then recooking the 2nd HDA instance fixed the problem

Repro - Use attachedHda_A2V2_01 (1st input landscape, 2nd input object mask)

Feedback - Currently while they are placed in foliage and do update when recooked, they don't seem to behave like foliage (snapping and following the terrain when its painted). Idk if that is possible but it owuld be nice to not have to recommit the terrain when painting to see the foliage update (like how normal UE4 foliage behaves)

Feedback 2 - The unreal_foliage tag only worked as an attribute as an integer, not a float. may want to add that to the documentation

Feedback 3 - More of a question than a piece of feedback but how would I go about having 2 separate HDAs in the level contribute and use the same base foliage settings? Currently they are each tracked as separate foliage, but ideally if each HDA was a "biome brush" I'd want all pine trees from each to use the same foliage setting and be tracked in the same place. I know I can have them both point to the same mesh instead of using a generated cube, so maybe that would do it? Unsure

AttachedHDA_A2V2_01.zip

@dpernuit
Copy link
Contributor

Hey Alex,

Thanks for the feedback!

Regarding bug #1, normally, when doing the scattering using asset refs (unreal_instance attribute), and if a foliage type is already using that same asset, the plugin should reuse it and add new instances to it.
Recooks or updates on the hda should also only update the procedural instances, and leave the manually placed foliage instances untouched.
Using two hdas with the same refs should work similarly as well, but I managed to run into a similar issue (invisible foliage) after undoing the second hda creation, so there might still be a few bugs/issues with the foliage instances.
I'll try with your HDA and will get back to you on that later.

Regarding feedback #1, this will likely be difficult to implement.
Unfortunately, we can't really tell on the plugin side if the instances where scattered on something, and can't assume by default that one of the HDA's input was used. Potentially, we could fix this by adding another set of attributes to the foliage instances, but I'm not sure if we could have an automatic way of detecting what the instances were scattered on.

Feedback #2, I fixed it, the attribute is now properly taken into account as int/float, and on points, primitives and detail. (current alpha ignored it on points, unfortunately).

Feedback #3, If I understand what you want correctly, this should already be possible as two hdas can contribute to the same foliage type as long as they use reference to same "source asset".

Cheers!

@adracott
Copy link
Collaborator Author

Hey @dpernuit I gave the new 3.2 update a try! I was able to set the foliage mesh via manually setting the reference which worked great, I can confirm multiple versions of the same HDA pointing to a single source mesh did indeed only make one foliage. I did run into multiple instances (specifically when alt dragging the HDA actor to duplicate it) where extraneous extra meshes were created which I was then unable to remove.

Repro: Have 1 HDA contributing to foliage instances iwth a fixed source mesh, have rebuild on transform set to true, alt drag it to duplicate it in the level, and it created tons of random meshes that didn't go away even after deleting the actor.

Bug 2: when in the same scenario as above, adding a second curve seemed to not act as an additional geometrey input (when it did when I was just creating instanced static mesh components

Bug 3: When I restarted my session all my inputs got dropped (had to recommit terrain) AND my curve input array went from closed curves to open.

I did have another question: while its awesome to be able to set foliage contributers to direct static mesh references, is it possible to point them to actual static mesh foliage types? (the ones unreal lets you save foliage presets out as in the content browser). Pointing to those would be incredibly useful, though I did try and it didn't seem to do anything. Attached is the HDA I've been using

Great stuff!

Alex
Alex_addnoise_V2.zip

@valdomat
Copy link

valdomat commented Oct 6, 2020

Hello!

I want to second Alex's ask to reference a "Static Mesh Foliage type". It's very useful to leave the control over foliage in Unreal while only working with placement and what not in Houdini.

Cheers!

@dpernuit
Copy link
Contributor

Hi,

The plugin can already directly instance "Foliage Types", instead of only using SM and having the plugin create the Foliage type.
(when using attribute instancer, "unreal_instance").
I will also likely soon extend the geometry inputs so they can read/import foliage types.

I have also submitted quite a few fixes that will resolve the extra "leftovers" foliage instances when modifying the HDA.
That fix will be available in tomorrow's daily build (H18.5.501)

The issue was that the plugin wasn't properly cleaning previous foliage instances generated by the HDA when directly using Foliage Types, or when switching from foliage instances to regular instances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants