Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Assemble a blueprint with mesh components during import

Forgive me if this has been asked or addressed in the docs, but I can't seem to find an answer...

Is it possible to automate the process of creating a Blueprint asset, assembling static and skeletal mesh components while building the game, not when spawned in the level or at runtime? Ideally using Blutility would be nice, but if not, what about through C++?

Thanks for any insight!


Product Version: UE 4.12
more ▼

asked Jun 17 '16 at 02:54 AM in C++ Programming

avatar image

6 1 4 5

avatar image MOS99Z Jun 17 '16 at 03:08 AM

What exactly do you mean by assemble a blueprint? Like attach weapon meshes to a monsters hand and what not?

avatar image LumenArtisan Jun 17 '16 at 03:35 AM

Yeah, that's sort of what I'm thinking. In this particular case we have some hard surface machinery with lots of distinct parts that need to be "grouped" together into several large BP assets - some are static meshes, and some are skeletal. Rather than going through and assembling hundreds of these parts manually, I'd love to be able to automate the process.

I know we can do this at runtime or when spawning the Blueprint, but can it be done in the Editor through Blutility or C++?


avatar image MOS99Z Jun 17 '16 at 03:55 AM

Well you kinda have to do it manually, sorta, I mean if you thought about it im sure you could design some kind of automated system, but even then there will be things that you have to do manually. Now if you just want to set up all these parts in the blueprint before its ever spawned into the world you can. When you add a mesh component to a blueprint, just make sure its under the mesh you want it to be attached to then in its Details: Sockets: Parent Socket: that box there, you type the name of what socket you want it to be attached to or click the magnifying glass icon next to the box and it will give you a list of all available sockets for the mesh that it has as its parent. This is how i attach weapons to monsters in my current project before run time. makes it easier to see what its going to look like ahead of time as well, though you can also preview what something will look like in the skeleton viewer by attaching things there as preview only.

avatar image LumenArtisan Jun 17 '16 at 04:20 AM

Right... that's sort of how I'm going about it now for assembling these things. But this project isn't really like adding weapons to creatures - more like adding all the individual parts to a fully detailed car. It's just a tremendously tedious and painstaking process to do everything manually since there are so many parts.

I'm really looking for a way to do this through code by reading in some sort of manifest file. I've written a general purpose output script in MEL that exports all the individual parts from Maya and writes a text file outlining what joint each object belongs to. I'd really like to parse this file in UE4 and use it to add each static mesh component to the appropriate parent joint or socket automatically. I just don't know how to add static mesh components to specific skeletal mesh joints via C++ or Blutility outside of a spawn or level event.

avatar image MOS99Z Jun 17 '16 at 04:23 AM

Yea this problem seems like it is going to take some leg work either way, sorry I cant be of more assistance.

avatar image LumenArtisan Jun 17 '16 at 04:34 AM

Nah, I'm glad you've taken the time to discuss it with me and give feedback on the approach, so thanks!

I know it'll be some work to do it either way - I just want to automate what is essentially a very repeatable process as much as possible.

avatar image sranck Aug 31 '16 at 11:23 PM

You may want to look into ue4's Blutility feature.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

You need a system to attach everything together, starting from one, or various "base" meshes/components. You basically add it as a mesh component, as a children of the root (collision or base mesh), then update the collision. You can have the program do it automatically by looping through attachment rules and arrays, or do it manually with huge if statement (bad practise). Then at the end, update the stats based on added components.

more ▼

answered Jun 17 '16 at 09:34 AM

avatar image

335 33 26 45

avatar image LumenArtisan Jun 17 '16 at 03:31 PM

Thanks Zarkopafilis. I understand generally what you're suggesting, but I guess my question is really more about how to trigger such a system to run in the Editor: basically edit-time instead of at run-time.

I get what your saying about adding mesh components and then looping through an array to populate the Actor. Right now the only way I can automate any changes to the Actor are if I make an instance of it in the level (i.e. "run-time"). I really need to add components to the Actor in the Content Browser (i.e. "edit-time") so that I can use the final assembly in multiple levels.

Does this make sense?

avatar image Nintari Aug 31 '16 at 04:00 PM

Do let me know if you find the answer to this. I'm trying to do the same thing. Looking to assemble an actor blueprint via C++ that contains a collection of static meshes as a "prefab" equivalent.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question