Announcement

Collapse
No announcement yet.

Prefabricator - Open Source Prefab Plugin

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

    #76
    It's not an empty scene, but it's certainly odd behaviour, and another one has started too! I've attached a couple of images to show what's going on.

    Click image for larger version  Name:	UE4Editor_20190314_173200.jpg Views:	2 Size:	579.3 KB ID:	1594840

    (bigger version attached to this reply)

    In this image, you can see that I've got a nice prefab composed of five candle-prefab-collections and a few lights. The prefab is in the scene on the left. I'll refer to this as the 'top prefab'.

    You can see the five smaller collections in the content browser. Each of those collections contains three prefabs that are assembled candles and wax blobs with a particle effect on top.

    When I first assembled these, I could duplicate the top prefab either directly in the scene or by dragging Prefab15 from my library, but the lights wouldn't work. If I go into the duplicated prefab and change anything then the lights begin to work.

    In the image, you can see a duplicate of Prefab15 where the lights are not working at all... And a new bug has appeared!

    Between last writing on here and today, I closed UE4. When I reopened it, I discovered that the top prefab from previous sessions looks fine, but when I duplicate it then the meshes don't appear! The green-outline bounding box of the prefab also only covers the lights, not the meshes (i.e. where the meshes should be appearing).

    Which is odd... But wait, there's more!

    Click image for larger version  Name:	UE4Editor_20190314_173700.jpg Views:	1 Size:	528.8 KB ID:	1594839
    In this image, I've duplicated it, but the meshes do show up... So what changed?

    Between the first image and the second image, I dragged all of the lower prefabs ('prefab', 'prefab1', 'prefab2', etc.) into the scene and then deleted them. After doing this, they began to appear when I placed collections containing those prefabs.

    I also discovered something else. I dragged only one of the wide-candle prefabs into my scene, then placed the wide-candle collection in the scene. When I clicked 'randomize' on the collection, only the candle that I'd dragged in would appear in the collection - the collection would appear empty two-out-of-three randomizations!

    By placing all the prefabs into the scene once and then deleting them, I could duplicate the top prefab and the meshes would now appear (as you can see on the right in the image above). Additionally, after doing this, if I press 'randomize' on the middle version of the top prefab, the meshes now appear correctly.

    It's all very intriguing, and I've no idea what's going on, but it appears that prefabs appear to need to be in the scene individually before collections will work with them properly... Or they need to be placed per-UE4-editor session for collections to work.

    I hope this helps you track down some of what may be going on!

    (BTW, the red X mark on your lights means that you have too many overlapping moving lights - if you reduce the radius of effect then that will often fix the problem, or turn the lights to 'static').

    As you can see - I think prefabs are going to be a really powerful way for me to create some great randomised placements of objects in my game, but I've hit some really interesting bugs!
    Attached Files
    Last edited by CopperStoneSea; 03-15-2019, 09:53 AM.

    Comment


      #77
      Thinking more about this, the common thread seems to be that meshes/lights in the stack of prefabs and collections don't show up properly until they have been adjusted or placed in the scene.

      I've also tried a few different sequences of actions:

      Duplicate top prefab >
      nothing shows up on top prefab (no lights, no meshes)

      Duplicate top prefab >
      nothing shows up on top prefab (no lights, no meshes) >
      save, close, reopen >
      no change

      Duplicate top prefab >
      nothing shows up on top prefab (no lights, no meshes) >
      place all the lowest prefabs (only meshes and particles) in the scene >
      nothing shows up on top prefab (no lights, no meshes)

      Duplicate top prefab >
      nothing shows up on top prefab(no lights, no meshes) >
      place all the lowest prefabs (only meshes and particles) in the scene >
      nothing shows up on top prefab (no lights, no meshes) >
      randomize the duplicated prefab >
      meshes appear - lights don't work

      Duplicate top prefab >
      nothing shows up on top mesh (no lights, no meshes) >
      place all the lowest prefabs (only meshes and particles) in the scene >
      nothing shows up on top mesh (no lights, no meshes) >
      save game >
      meshes appear on the duplicated prefab - lights still not working

      Duplicate top prefab >
      nothing shows up on top prefab (no lights, no meshes) >
      place all the lowest prefabs (only meshes and particles) in the scene >
      nothing shows up on top prefab (no lights, no meshes) >
      save game >
      meshes appear on the duplicated prefab - lights still not working >
      go in to every light and adjust it (move then Ctrl+z undo is enough!) >
      now both the meshes and lights are working!

      Duplicate top prefab >
      nothing shows upon top prefab (no lights, no meshes) >
      place all the lowest prefabs (only meshes and particles) in the scene >
      nothing shows up on top prefab (no lights, no meshes) >
      save game >
      meshes appear on the duplicated prefab - lights still not working >
      go in to every light and adjust it (move then Ctrl+z undo is enough!) >
      now both the meshes and lights are working! >
      duplicate the duplicated top prefab >
      meshes work, lights don't >
      save, close, reopen >
      duplicate the duplicated top prefab >
      nothing shows up on top prefab (no lights, no meshes)

      So... That's a few versions!
      Last edited by CopperStoneSea; 03-16-2019, 08:05 AM.

      Comment


        #78
        I just had a small brainwave regarding the lights! My lights are actually part of a blueprint (I use a mix of static and stationary versions to get the effect I want - the stationary one flickers a bit).

        When I create a prefab with a normal point-light and my blueprint 'flickering light', duplicating the blueprint stops the blueprint-light working while the normal-point-light continues to work.

        So, there's an issue with lights components in blueprints that are part of prefabs - they can work, but seemingly only once they have been adjusted after the prefab has been placed. This adjustment only needs to happen once for it to be permanently okay, but duplicates need it to be done again.

        Comment


          #79
          Hopefully this isn't out of place but I am struggling. I am using Prefabricator to make a prefab that consists of BPs and static meshes. I then spawn a line of them on begin play. My problem is that I can not(read-can't figure out how) to destroy a prefab. What I would like to do is specify an index to destroy anything attached to the prefab at that specific index. I am able to destroy some actors using a complicated scaling/overlapping/mess of a bp but it does not accurately destroy everything. Any guidance would be greatly appreciated.

          I'm looking for this flow of functionality;
          spawn prefabs -> store list of spawned prefabs-> set desired prefab to destroy from external bp -> destroy desired prefab -> update list of stored prefabs.

          Below is the solution I came up with. I removed the spawning from the level blueprint and put the creating and destruction logic all in the same bp.
          Last edited by Harvard Black; 03-31-2019, 11:01 AM. Reason: My solution

          Comment


            #80
            I found another use:
            Water

            There isn't a super quick way in the engine to throw down all the pieces -plane for water, physics volume, etc.


            So you just toss it all down and make a prefab. Of course you still have to adjust it and everything but, its all the pieces. Which is huge time saver

            Comment


              #81
              Well if anyone reads my above post they, like me, will be sad to know:

              the water volume stuff "works" but for some reason the physics volume and post process although are part of it, and listed in the prefab, with settings you can change.

              The dont seem to actually BE there?

              Comment


                #82
                That could be the same bug I was having - some things seem to not be rendered in the world until you create another version of them.

                Could you try something please? Create a new post-process volume, then place a new copy of your prefab. Does the post-process volume appear now?

                I think there's something about cacheing and loading of objects that are inside prefabs that's not working. Unless you created a non-prefab version of an entity during that editing-session (i.e. since loading and not closing that project) it doesn't seem to appear in the prefab.

                Comment


                  #83
                  Click image for larger version

Name:	Untitled.png
Views:	1
Size:	337.3 KB
ID:	1617446

                  Thanks for the response and attempt at trouble shooting!
                  I had presumed it was just an issue with these two types of actors and how they do tend to act unique with behavior and settings

                  Including a screenshot for you.
                  The prefab forms and brings the actors into the list but aren't visible. The two cubes floating there are the post process and physics i tried to bring in to cause them to load.

                  Also tried duplicating, show/hide. Nothing seemed to make them pop up.

                  Comment


                    #84
                    This is an amazing tool but one thing that concerns me is the way it references other assets. I cannot replace references on a prefab which would be very neat. Is there a way to do that ?

                    Thanks

                    Comment


                      #85
                      If/when my dream project comes through, I'm sending you a truckload of money.
                      Thx a million times!

                      Comment


                        #86
                        Ali Akbar - How can I spawn a PrefCollection from C++ (in editor)? The SpawnPrefab helper function works for regular PrefabActors but not PrefabCollections. This is for a tool in the editor, so in this case I'm using it during edit-time rather than runtime.

                        Thanks!
                        Storyteller - An immersive VR audiobook player

                        Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

                        Comment


                          #87
                          Hi Ali Akbar - can this plugin be used together with the Snap Map Builder?
                          I have this scenario: I create a level with prefabs for walls, exits and Snap Map Connection infos.
                          When the dungeon builder creates the level - I get the same level every time.
                          I would like to randomize the level - THEN have the dungeon builder try to place it. Is this possible? That would be amazing! Creating dungeons would be a breeze.

                          Comment

                          Working...
                          X