Putting static meshes the same way we do with foliage

Is there any way of putting Static Meshes in the level in the similar manner we can put foliage meshes in foliage mode? I mean being capable of specifying random scale, rotation, putting meshes in group etc.

Foliage is static meshes. It’s exactly the same, no?

Kind of, but it gets treated differently by the engine. When I use FindCollisionUV of the foliage mesh the UV I get are not usable they go outside of 0 to 1 range, it seems like the whole chunk of foliage meshes that share the same mesh are getting merged together for optimization reasons

1 Like

That’s right, it’s one big thing.

You can write your own placement tool, it’s pretty easy :slight_smile:

Never touched the code that manipulates the editor’s UI. Can you suggest where should I start looking?

No, you just write your own from scratch, it’s about 10 nodes :slight_smile:

I’ll do an example…

image

foliage

It’s only another few nodes to do scale and random Z rotation.

Then, you have another bit which converts them to meshes, when you’re ready…

1 Like

Thank you! Helped me a ton

1 Like

This bit adds random Z and scale min and max

If you initialize an array of components

as you add them, you can put them in the array

and then with an editor callable event ( in the event graph now )

PS: Better for scaling the box

image

1 Like

If i may,

The proper solution is not to try and place something else, but to get whatever you collided with to transform into something that returns the proper values.

Take this as an example

what you want as your end goal is to do it with a projectile or a line trace instead of the collision.

More details and vids on how the plugin works here, but you can calmly engineer something else (or use c++ which is better than BP anyway)

Placing meshes is nice and all, but you are going to bog down your performance in an engine that already has 0 performance…

Also consider that as a whole the engine has only gotten worse over the 4 years since dynofoliage was released. Youd be lucky to get 1/2 the frame rate shown in the optimized scenes on a 1080ti with the latest version of ue4.

1 Like

Looking into that. I think it would be a good idea to spawn a simple static mesh using the transforms of the foliage instance that I had line traced. And then line trace the newly spawned static mesh and use hit data to find UV. Going to try that out. Tho would be cool if I could somehow get the collision data of the static mesh and check the collision with it instead of spawning an actor like I could do that with a capsule by getting it’s collision shape