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"

Control particle spawn locations from C++ in Niagara

I am trying to render a point cloud with specific point locations that I have in a file. I know there are some solutions out there focused on photogrammetry data but I think in my situation I need more control in the end. I believe what I want is a particle system in Niagara where particles spawn at the locations from my file. So I believe I need to do the following:

  • Create a particle system and replace the location entry in the particle spawn stack by something that delivers the desired locations

  • Looking at the SphereLocation blueprint it appears that I basically need a node that outputs one location (+metadata) from my file per call and wire the output into Particles.Position

Summing that up I need to write this node for producing the locations. In the SphereLocation BP this is (more or less) done by the Gaussian Random Vector node. But that is a Blueprint and I probably want to do this in C++. I am decently skilled in C++ but lack the Unreal experience so here are my questions:

  • How do I create such a node in C++?

  • Especially, which base class do I need?

Of course, I might be completely on the wrong track here.

Product Version: UE 4.20
Tags:
more ▼

asked Jul 22 '18 at 10:13 AM in C++ Programming

avatar image

BaalSeinOpa
18 1 6

avatar image HolyBob Nov 09 '18 at 10:20 PM

Having the same question

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

2 answers: sort voted first

Did you make any progress here? I too want to do something very similar.

thank you, 0xf00d

more ▼

answered Sep 23 '18 at 09:30 PM

avatar image

jgosztyla
1

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

I ended up writing a Niagra Data Interface for my point data, and it works in Niagara beautifully. I originally did all the work for the GPU version too, but in the end I just supported CPU. I used the included source code in SideFX as a template for my class.

0xf00d

more ▼

answered Nov 12 '18 at 03:10 PM

avatar image

jgosztyla
1

avatar image Skan 6 days ago

Cool! Are you planning to release this maybe? Or share some tutorial at least? Would be nice to have a plugin or something, I need something similar (database with tons of points at specific locations), but I'm not that good at C++! ;)

(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