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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

Random mesh generator

Greetings, I'm trying to make a simple auto mesh generator for a ThirdPersonCharacter. The idea is to generate on the startup 1 mesh from a few meshes which we place in to the blueprint. Which function is the best to work with and where I can learn more?

alt text

Product Version: UE 4.12
blueprint.png (177.0 kB)
more ▼

asked Jul 30 '16 at 08:56 AM in Blueprint Scripting

avatar image

28 3 5 11

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hello, Cryptaline,

If what you want is to pick one mesh out of a list of different possible meshes, and those meshes are already imported as assets (so you are not talking about procedural content here), then it is quite easy.

Just create a variable of the type "Skeletal mesh reference", name it "Possible meshes list" and turn it into an array. Then add as many entries to that array as you want and point them to your different skeletal mesh assets.

On the construction script, use the get node to get one of the elements of that array. For the index, you can use a "random integer in range" node. The Min value would be 0 and the Max would be your array length. That will pick one random element of your list every time. Then you plug the output of the get to the new mesh input of the set skeletal mesh and you are done.

If on the other hand you are talking about grabbing a bunch of meshes and turning them into a single mesh at runtime, and setting that, then that is another issue and I don't believe it is possible with skeletal meshes. For static meshes there exist instanced static meshes that you can use.

more ▼

answered Jul 30 '16 at 09:08 AM

avatar image

586 13 10 34

avatar image Medvega Jul 30 '16 at 09:37 AM

Yes I was asking about

pick one mesh out of a list of different possible meshes

Thank you alot! Works fine.

(comments are locked)
10|2000 characters needed characters left
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