Announcement

Collapse
No announcement yet.

Is there any way to access the files in the content folder via blueprint ?

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

    Is there any way to access the files in the content folder via blueprint ?

    I want to iterate all the textures and take only the ones that meets the conditions.
    I need to make an array of about 1500 textures, and to drag them one by one could be really annoying.

    I'v noticed that if i make an ADD node for an array of textures, and then disconnect it, it gives me the path to the texture instead of the texture itself, and it looks like this :

    Texture2D /Game/Textures/T_Tech_Hex_Tile_M.T_Tech_Hex_Tile_M

    Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	46.5 KB
ID:	1139691

    But i don't find a way to convert a path into an object reference, is there any any i can do it ? and if this is not possible with blueprint, how can i make a blueprint node via c++ that can convert paths into object reference ? it could be real useful if someone can make it.
    Last edited by Sahkan; 10-21-2014, 10:38 AM.
    Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

    #2
    YOu are trying to use images to make end game movie? Wouldn't it be more efficient to just convert it to a movie format?
    Check my working title: The Locked Room here: https://forums.unrealengine.com/show...he-locked-Room

    Comment


      #3
      Originally posted by starseeker View Post
      YOu are trying to use images to make end game movie? Wouldn't it be more efficient to just convert it to a movie format?
      The project i'm working on is on 4.2 ( only 4.5 can run videos as textures in materials ) and i also need to fade it in and out on a certain moment in the game, and, no c++ in this project, so this is the best solution i'v found.
      I'v tested it with a short video and made about 50 instances of it while they all run ( replacing each texture in the material every 0.04sec ( 25fps 1/25 ) and the performance are great. I don't know why no one else have thought about it before. it is all working excellent but the part of filling the array ( Currently i have to drag the textures into the array one by one ). I need to find a way to iterate it and it will be great. i know in c++ it can be done very well and i saw some example in a search in google but i don't know how to do it only with blueprint.
      Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

      Comment


        #4
        Originally posted by Sahkan View Post
        The project i'm working on is on 4.2 ( only 4.5 can run videos as textures in materials ) and i also need to fade it in and out on a certain moment in the game, and, no c++ in this project, so this is the best solution i'v found.
        I'v tested it with a short video and made about 50 instances of it while they all run ( replacing each texture in the material every 0.04sec ( 25fps 1/25 ) and the performance are great. I don't know why no one else have thought about it before. it is all working excellent but the part of filling the array ( Currently i have to drag the textures into the array one by one ). I need to find a way to iterate it and it will be great. i know in c++ it can be done very well and i saw some example in a search in google but i don't know how to do it only with blueprint.
        Sounds pretty cool, would love to see some videos of it in action.

        Personally, I am an advocate of being able to do everything in blueprint, so I hope you find a solution.

        Talk to Rama. I bet he can make a node that works for you.
        Map Generator 1.0
        Map Generator 2.0
        Map Generator 3.0

        Comment


          #5
          Originally posted by Zeustiak View Post
          Sounds pretty cool, would love to see some videos of it in action.

          Personally, I am an advocate of being able to do everything in blueprint, so I hope you find a solution.

          Talk to Rama. I bet he can make a node that works for you.
          Thanks, i will try to talk to him.
          Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

          Comment


            #6
            Ramas teh man, & yes, I like to see your texture in action as well.
            Check my working title: The Locked Room here: https://forums.unrealengine.com/show...he-locked-Room

            Comment


              #7
              Ok i'v made a video, notice that in this video i use 100 frames of 1920x1080 each in 25 fps. i spawn a lot of instances of this video in this gameplay.
              Also, the frame rate in the video itself is not smooth ( Specially at the first 2 seconds ), i noticed it only after i imported it into UE4. but the performance of the game itself while running the sequence are great.
              I have gtx680 but i ran so many instances that i don't think it will be slow on weaker machines .
              I also have recorded myself talking if you wanna listen
              Video :


              And this is the whole blueprint actually, very simple :
              Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	164.4 KB
ID:	1058055
              Last edited by Sahkan; 10-22-2014, 09:55 AM.
              Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

              Comment


                #8
                Interesting, I save the blueprint for future reference.

                My main concern is RAM. 1500 images at 1080p will eat a lot of RAM? Wouldn't it. Have you tested it on a machine with far less ram?
                Check my working title: The Locked Room here: https://forums.unrealengine.com/show...he-locked-Room

                Comment


                  #9
                  Why can't you update to 4.5?

                  Comment


                    #10
                    Originally posted by starseeker View Post
                    Interesting, I save the blueprint for future reference.

                    My main concern is RAM. 1500 images at 1080p will eat a lot of RAM? Wouldn't it. Have you tested it on a machine with far less ram?
                    I didn't try it with so many images, this is not so fun to drag them one by one :\

                    Originally posted by Mosel3y View Post
                    Why can't you update to 4.5?

                    This project is done and this is the only thing to add, and when moving to newer versions there are always bugs and i don't have time to check the whole game again, i got only 1 day or 2 to finish it.
                    Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

                    Comment


                      #11
                      Originally posted by Zeustiak View Post
                      Personally, I am an advocate of being able to do everything in blueprint, so I hope you find a solution.

                      Talk to Rama. I bet he can make a node that works for you.

                      I am also an advocate of BP having as much power as possible

                      And yes I can make a node for this, one sec!

                      Rama
                      100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                      UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                      Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                      Comment


                        #12
                        Dear Sahkan and Everyone,

                        Two New Nodes

                        Get Object Path & Load Object From Asset Path!


                        I have created the node you requested, and also its compliment, so that you can get the asset path of any object from the world during runtime!

                        In my test case I specifically loaded a Texture2D from asset path

                        I gave you the same code I use in C++ with my in-game editor that saves and loads levels for my game to compressed binary files

                        More info here and download link here!

                        https://forums.unrealengine.com/show...l=1#post167829

                        Click image for larger version

Name:	LoadObjectFromPath.jpg
Views:	3
Size:	305.8 KB
ID:	1058068
                        Last edited by Rama; 10-22-2014, 01:20 PM.
                        100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                        UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                        Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                        Comment


                          #13
                          OMG Thank you so much man !!!
                          I'm gonna try it right now !
                          Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

                          Comment


                            #14
                            I'v just tried it in 4.2, and it gave me these messages :
                            Click image for larger version

Name:	1.JPG
Views:	1
Size:	22.5 KB
ID:	1058071
                            Clicked "Yes".
                            Starting to compile with a small loading window for about one second and then :
                            Click image for larger version

Name:	2.JPG
Views:	1
Size:	19.0 KB
ID:	1058072
                            Clicking "Yes".
                            Editor starts loading and then :
                            Click image for larger version

Name:	3.JPG
Views:	1
Size:	33.0 KB
ID:	1058073
                            Afterward the project started and all seems to be good, there Victory plugin is checked as installed but there are no new nodes between the blueprints nodes.

                            Is the new code contains elements that are not in the 4.2 version of the engine ? :\
                            Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

                            Comment


                              #15
                              I compiled the BP library for 4.5

                              You are still on 4.2 ?

                              I can recommend upgrading at least to 4.3

                              If you do 4.3 I can get you a 4.3 version

                              Rama
                              100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

                              UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                              Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

                              Comment

                              Working...
                              X