Announcement

Collapse
No announcement yet.

somewhat unique problem: how would you solve?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    somewhat unique problem: how would you solve?

    Hey gang, Blueprint newb here.

    I have external data (.csv) i need to import and use to drive a series of particle effects. My test is a couple hundred lines with values of 1, 2, or 3. The idea is that if 1 then fire a single particle from 'Emitter_Red', if 2, then fire Emitter_Green etc.

    Basically i want to trigger a single event that then reads through the entire .csv and fires off the couple hundred particles (from 3 emitters) driven by the external data. So 1,1,1,2,3,1,1 would trigger red, red, red, green, blue ,red,red. I'm making unique particle systems for each (as opposed to driving some value inside a single particle system).

    I'm using Data Tables based on this basic tutorial https://www.youtube.com/watch?v=nMy6H1o1zO0 but not sure thats the right approach. Both high-level and detail / specific suggestions appreciated. Thanks!
    Last edited by jsunandmax; 12-09-2017, 04:21 PM.

    #2
    Is this what you're after:

    Click image for larger version

Name:	Capture.PNG
Views:	55
Size:	60.1 KB
ID:	1397831

    Not sure where the 3 emitters come here but this should read every row from the DT.

    Comment


      #3
      Thanks! Yeah, i have something like that (see below); my main problem now is getting it to increment the eventID through the '3particles' array (see left of image) to then Spawn one of each of the emitters per line. Print works, so i have first part solved (getting second column in).

      How do i get it to change the Index each time, and then fire off one of three different emitters?

      thanks in advance!

      Attached Files
      Last edited by jsunandmax; 12-10-2017, 04:31 PM.

      Comment


        #4
        so, making progress, got emitters happening, but for some reason it just spits out huge globs of particles at once....so i added a delay. Now, i get 1 red, 1 green and 1 blue, then 1/2 second later, same thing....regardless of what is in the datatable. It's almost like the delay is screwing up the for next loop? i get one of each color over and over. Any thoughts?

        Attached Files

        Comment


          #5
          try moving your delay to be after the for each loop.

          Comment


            #6
            thanks Thuranius, but tried that. I've put those delays everywhere and either i get a) a huge clump of all 500 lines from the DT firing at once or b) RED, GREEN, BLUE over and over and over where somehow the delay seems to bork the loop? the first 3 entries in the table are red, GREEN GREEN, so i'm not sure how i'm even getting RED, GREEN, BLUE at all...i've also tried moving to a switch approach, but the results are the same.....delay either causes RGB over and over, or no delay causes clumping of all 500 simultaneous.
            Attached Files

            Comment


              #7
              To control spawning rate, have a function/event timer increase the index and then pull it out of the DataTable. Something like this perhaps:

              Click image for larger version

Name:	Capture.PNG
Views:	91
Size:	167.4 KB
ID:	1398510

              Not entirely sure what your vision is. I might be missing the point completely. ;p
              Last edited by Everynone; 12-11-2017, 04:35 PM.

              Comment


                #8
                Hmmm, some new concepts there i'll try your suggestion Everynone. The "vision" is i want to use a single column (column B) of my DT to fire off one of three particles.....It consists of 500 lines, each line is either a 0,1, or 2. I need it to take.....say 5 seconds to step through those 500 lines of DT (spawn 100 particles/second each one from the DT). I've got everything working with above approach, but it 'clump' fires all 500 at once. Delays anywhere seem to bork it. Looks like your method with 'Set Time by Event' may address this.

                Comment


                  #9
                  Everynon, I got this far:

                  Couple questions: what is that SET off the 'Set Timer' ? I coudn't figure out how do make that.

                  Mainly, how does your 'Get Data Table Row' have more options than mine? I dont have 'Out Row ID' as an Int, specifically. Finally, how did you add another Option to the Select node?

                  Sorry for the super-newb questions....

                  Attached Files

                  Comment


                    #10
                    what is that SET off the 'Set Timer' ? I coudn't figure out how do make that.
                    It's a timer handle; in case you want to stop/reset/alter/see how much time is left - allows you to interact with the timer, a reference. You can right any ReturnValue and PromoteToVariable rather than create reference manually.

                    Let's say you want to stop the timer when you run out of DataTable rows:

                    Click image for larger version

Name:	Capture.PNG
Views:	85
Size:	55.0 KB
ID:	1398550

                    Mainly, how does your 'Get Data Table Row' have more options than mine?
                    You can right click any struct pin and Split/Recombine - it sometimes saves screen space. You can drag a wire and break struct, same thing.

                    Option to the Select node?
                    Right click and AddOption.

                    It seems that right click solves all the problems today

                    I dont have 'Out Row ID' as an Int,
                    I thought I saw EventID int in one of your screenshots.
                    Last edited by Everynone; 12-11-2017, 05:42 PM.

                    Comment


                      #11
                      thanks for the help everyone; i learned a ton. The biggest issue i ran into was the 'clumping' or firing off the entire .csv file's worth of emitters in a single tick. It turns out i had to rebuild the loop as a custom macro, here's what i wound up with for those interested:

                      Click image for larger version

Name:	ue_8.jpg
Views:	59
Size:	280.1 KB
ID:	1399152

                      And then inside the macro....
                      Click image for larger version

Name:	ue_9.jpg
Views:	59
Size:	335.5 KB
ID:	1399153

                      hope this helps someone,

                      Comment


                        #12
                        Not sure if this helps but I was having a similar issue with wanting a delayed ForEachLoop. If you double click a ForEachLoop you can copy the node setup and create a new macro and then add a delay to make a custom delayed ForEachLoop.

                        Web
                        Facebook

                        Comment


                          #13
                          I don't see it mentioned often but you can adjust the Tick Interval, too: (class settings)

                          Click image for larger version

Name:	Untitled.png
Views:	41
Size:	5.4 KB
ID:	1399341

                          Comment

                          Working...
                          X