x

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"

Instancing meshes in an array?

Hey all,

I followed THIS TUTORIAL (as far as I needed) to create instances on a flat plane. It gives me the ability to add 2 seperate instance meshes and have them randomly generate within the given parameters. The questions I have are:

  1. How would I make this into a 3D array instead of just a 2D plane?

  2. How would go about adding MORE types of instances? The way he shows only allows 2 with the use of a branch and a For Each Loop. I don't really know scripting logic well, and I'm unsure how to add more instances to the tree.

Thanks in advance,

[1]: https://www.youtube.com/watch?v=mI7eYXMJ5eI

Product Version: UE 4.9
Tags:
more ▼

asked Oct 04 '15 at 04:29 PM in Blueprint Scripting

avatar image

nukeydukey69
3 5 10 15

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

1 answer: sort voted first
 1) X = i % MaxX
     Y = floor (i / MaxX) % MaxY
     Z = i / (MaxX * MaxY)
  
  2) instead of "branch on ==" use "switch on int"
more ▼

answered Oct 04 '15 at 06:01 PM

avatar image

ScottSpadea
9.6k 319 205 449

avatar image nukeydukey69 Oct 04 '15 at 06:12 PM

This is great, but I'm very new to Blueprint. Could you try to explain further how to integrate that? Also, I realized I'm only making a cubed grid, not any rectangular, and I got the graph to work only using MaxX.

This is what my graph looks like now to give me an X and a Y. How should I change what I have to work with what you suggest?

alt text

blueprint_01.png (127.2 kB)
avatar image ScottSpadea Oct 04 '15 at 06:45 PM

try this:

alt text

avatar image nukeydukey69 Oct 04 '15 at 11:46 PM

I tried this and got weird results. It just shifts each sequential one up in Z space to make a cascading effect.

avatar image ScottSpadea Oct 05 '15 at 04:35 AM

if you have extra objects in the Z direction, it means you probably used Modulus when you should have used division, in the branch that calculates the Z component of the Vector.

(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