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"

What would be the best way to get an array of random coordinates from a seed value?

Hello, i'm currently developing a procedural environment algorithm, i've figured out most of it, like noise functions and what-not, but, i can't seem to find a way to get just an array of random coordinates from a seed, what would be the best way to achieve this? Also the array would need to have a limit and a radius, but, these are details.

Product Version: UE 4.18
Tags:
more ▼

asked Apr 29 '18 at 08:08 PM in Blueprint Scripting

avatar image

Sabudum
3 1 5

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

2 answers: sort voted first

If you need something relatively simple, look into Random Streams - it's a seeded number generator

Here's another useful node: http://api.unrealengine.com/INT/BlueprintAPI/Math/Random/RandomPointinBoundingBox/index.html

If you need something a bit more sophisticated, 4.17 introduced random sobol generators:

Search here for New: Sobol Blueprint and Material Nodes to see the examples.

more ▼

answered Apr 29 '18 at 10:00 PM

avatar image

Everynone
14.8k 77 25 62

avatar image Sabudum Apr 30 '18 at 03:37 PM

Thanks a lot for this information, it will be very valuable! I'll try this things out.

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

There are a couple ways of doing it. This is how I did it, but I wanted objects to be random areas on the landscape, so I used a collision trace for each random coordinate, to give me the exact world-space location. It looks a bit complex at first, but just continue to study it piece by piece and you will understand it to make your own variations in no time.You can also use a box collision and have your random coords be within that box.

Hopes this helps...

bp1 bp2

more ▼

answered Apr 29 '18 at 09:29 PM

avatar image

Kmontoya
76 4 5

avatar image Sabudum Apr 30 '18 at 03:36 PM

Wow, this is awesome, thanks for sharing this, i'll try it out, in my case i think i won't need to trace the location, since i can just get it from my noise function.

(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