Jump to content

Custom Normals and Collision built into Generators


Olson95

Recommended Posts

@Eduard I believe we have a ton of potential to expand just a bit further with some of the tools and really change the game! We should think about having custom normal tools built into the generators. I've provided some images of both an in-scene demo and also a mockup for the UI.

Ideally this same functionality should also allow us to then also use primitives to build into generators that have their own UCX tag.  So when you sepperate to objects, you can have a parented collision model ready? 

Curious to hear your thoughts!

Ethan

 

Plant_WNormals.png

Plant_NoNormals.png

CustomNormals.jpg

Link to comment
Share on other sites

  • 1 year later...

Hello Olson95,

 

I don't understand why I missed these posts. I was hoping for notifications, but they haven't been working lately due to changes in Gmail.

The forum simply couldn't send emails. I apologize for the late reply!

 

So, I don't quite understand how this works?
And what is a UCX tag?

 

Thanks!

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Oh no worries! 

Basically, the idea here is that any mesh prefab that is used within the GrowFX hierarchy can have it's normals customized.This could allow fuller looking vegetation on thinner more sparse geometry or cards.  Impacting it's overall perception.

In the example I spawn blue spheres on the clusters of the flowers, and then have those clusters align their normals with what the sphere represents. 

And UCX is just a mesh prefix you assign to an object if you want Unreal to automatically associate an incoming mesh with this geometry as collision. 
So the idea here is, you could "Generate Collision" for your plant / tree.  This would take the incoming hierarchy, and allow you to do things like generate capsules, boxes and cylinders around spawned areas, that procedurally aligns. I image the smoothest workflow would be building this right into the mesh generators, and you could have options to dial in the collision settings for performance.  You could have a "Preview Collisions" option so you can see it live.  And if not needing it, or don't need to see it, toggle it off.

When generating hierarchy of meshes, you can have a checkbox where it says "Generate Collison". And it will be included as UCX_"SameNameAsParent" that is a child of the root geometry. 

Thanks for everything, GrowFx is awesome!



 

Link to comment
Share on other sites

Hello Olson95,

 

Okay, we'll try adding these features, but first, I want to clarify the following:

 

1. The normal mesh, as I understand it, should be applied to all leaves (Std leaves and Leaves mesh), right? Although we can also do this for branches that may be part of flowers or leaves.


2. Custom mesh: did you mean to be able to attach a custom mesh (via a Public node) and have it used as the normal mesh? But I still don't understand how to implement this?
Your Default Meshes (Sphere / Triangle / Octagon) are actually just algorithms for calculating normals, they don't actually create any mesh.


3. Collision Generation (UCX / primitives):

  • An option to automatically generate capsules/boxes/cylinders around branches or mesh clusters. Are capsules or cylinders necessary? If so, how many sides should they have?
  • Ability to preview collision shapes before baking.
  • Automatic naming using the UCX_<BaseName>_## convention for Unreal.

Should these primitives be children of their original meshes, or should they be a separate tree?

 

We'll start developing this a little later, as I'm currently very busy with the Space Colonization algorithm. This isn't just an algorithm, it will be an entire tree generation subsystem in GrowFX.

Thanks!

  • Like 1
Link to comment
Share on other sites

1. Yeah, it should be applied to all leaves and leaves meshes that are part of that node. 

2. Exactly this yeah. So in this case if we are using a custom mesh, there could be a button to retrigger the "stealing" of normals from the custom mesh.  So it's more performant and not live. But whenever you're ready to take the associated object, you can transfer the normals.  There is a plugin called "Normal Thief" which essentially does this which may give you a better idea on what I mean. An example would be, I use tyflow to generate a canopy approximation that captures the large forms and secondary shapes of the hull.  I can then tell the system to use the closest normal points of that mesh and directly transfer it to any part of the system I want.  Helping with overall artistic reads.

3. Ideally for gameplay I would expect capsules ideally to minimize any clipping in an FPS game, and to get enough accuracy as to be able to shoot very close to the tree without it being stopped incorrectly. Or line of sight for MMO's / RPG Games. In an ideal world we have the option to control the side count for complexity depending on the need.  If not, I'd say 5 would be the minimum. 
- They can be a separate tree as a whole, just as long as they share the same root parent (which could just be a dummy node with the name of the asset).  Since the export does expect the collision and mesh to live within the same export. 

And sounds awesome man, super excited to see that! 

There is some really awesome new tech coming into Unreal Engine for using skeletons to control Realtime rigs for Nanite Assemblies (think of it as a bunch of instanced components for hyper realism trees. So in reality, if you were to be open to exploring something, I would actually expect this to be the biggest win, and probably get a lot of attention for GrowFx in the UE world. 

Here's a link if you're curious about it.  The Witcher 4 Demo showed it off.
Here's a timestamped spot of where they show it.

Thank you!

Ethan
 


 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...