Announcement

Collapse
No announcement yet.

Unreal Studio Feature Requests

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

    #76
    Originally posted by 7raafy View Post
    I dont know but it seems like all guides and tutorials and everything require us to use 3dsmax while I do not use it nor do I want to install it just to to some basic stuff. It would be great if the UVW-nromals or whatever it does could be integrated just fine without the use of 3ds max.
    Exactly. I think that the whole DataSmith usefulness would be optimal to everyone that will pay the monthly fee if it was able to just convert each and every supported native 3D software data format without any requirement to rent or buy the license to any of them. When 3D models are bought on other online shops and the fbx is missing, incomplete or corrupted and there is a native file for another 3D software then DataSmith would be useful indeed if it was able to just convert those to UE4 with no need to do anything else. And obviously with no conversion issues or mistakes. Unless Epic Games would add in the fee a special license to some high end expensive 3D software editor but I don't think that that would ever happen. So DataSmith being able to convert everything easily would be the best option.

    Comment


      #77
      I want a new feature: [right click on actor] -> [Reset to origional position]
      (Just like 3ds max filelink a dwg file)
      Last edited by jjhuang; 08-01-2018, 10:09 AM.

      Comment


        #78
        Originally posted by maxbrown View Post
        I have a few suggestions if I may:
        1. could the object names in the geometries folder be the same as the object names in SketchUp and in the World Outliner? At the moment they don't match.
        The next version of the plugin will most likely improve on that. There are however details in how Sketchup stores data that we also respect that can change things a bit.

        See this image https://www.screencast.com/t/cxEfL5UQQG

        In the above model, I have 2 components and 2 groups. In Unreal, the actor names will respect what has been set in the Sketchup outliner. Note that a user can customize names in Sketchup that don't get stored are the Group/Component definition level so we are taking account of that.

        For components, they will point to the same meshes instances so we have one asset for many actors: the asset will use the component definition name, while the actor will use the outliner name.

        2. I added a small picture showing the issue of meshes in groups in SketchUp that get split up into separate meshes in US (imho not the expected behavior - I would already have made separate groups in SKetchUp myself if I would like them to get split up). A fix would clean up (shorten) the Oultiner graph in US a lot.

        That is by design. When several separate connected meshes sit inside the same level in the hierarchy, we preserve their separation. Grouping all faces as one mesh will create other issues, like gigantic lightmap uvs, improper culling etc. When working with unreal, we have to unlearn old habits from other renderers (like combining meshes by material or by layer) : this works against you in a realtime engine like Unreal.

        The real issue is "too many actors from sketchup" in general.

        In the future we will provide tools to regroup objects in a more smarter way to reduce drawcalls while respecting instancing. We have a prototype of that done in python that achieves this, I have attached it if you want to pay with it (no promises made to its usefulness). The downside of that method is that it will break re-import so we are thinking of a way to do it as a pre-import step.

        Code:
        import re
        import unreal
        
        # content folder where to put merged geometry
        content_folder = "/Game/"
        
        # utility function to get the full hierarchy of an actor
        def get_actor_hierarchy(actor):
            result = []
            list = actor.get_attached_actors()
            while list:
                a = list.pop()
                result.append(a)
                for child in a.get_attached_actors():
                    list.append(child)
            return result
        
        # retrieves all Actor in levels having the SU.GUID.XXXX tag
        level_actors = unreal.EditorLevelLibrary.get_all_level_actors()
        guid_actors = {}
        for actor in level_actors:
            tags = [str(tag) for tag in actor.tags if str(tag).startswith('SU.GUID.')]
            if len(tags) > 0:
                guid = tags[0][8:]
                if not guid in guid_actors:
                    guid_actors[guid] = []
                guid_actors[guid].append(actor)
        
        # handle nested components by using only the highest level actors for a guid
        for guid, actors in guid_actors.iteritems():
            actors_to_remove = []
            for actor in actors:
                parent = actor.get_attach_parent_actor()
                has_ancestor_in_roots = False
                while not parent is None:
                    if len([tag for tag in parent.tags if str(tag).startswith('SU.GUID.')]) > 0:
                        has_ancestor_in_roots = True
                        break
                    parent = parent.get_attach_parent_actor()
                if has_ancestor_in_roots:
                    actors_to_remove.append(actor)
            for actor in actors_to_remove:
                actors.remove(actor)
        
        # merge and instanciate
        for guid, actors in guid_actors.iteritems():
            print "GUID: " + guid
            if len(actors) == 0:
                continue
        
            actor = actors[0]
            # retrieves the list of static meshes to merge
            actors_to_merge = [a for a in [actor] + get_actor_hierarchy(actor) if a.__class__ == unreal.StaticMeshActor]
        
            # special case where 0 or 1 actor to merge
            if len(actors_to_merge) < 2:
                for old_actor in actors:
                    if len(actors_to_merge) == 1:
                        # keep static mesh actors and reparent them
                        static_mesh_actor = [a for a in [old_actor] + get_actor_hierarchy(old_actor) if a.__class__ == unreal.StaticMeshActor][0]
                        static_mesh_actor.attach_to_actor(old_actor.get_attach_parent_actor(), unreal.Name(), unreal.AttachmentRule.KEEP_WORLD, unreal.AttachmentRule.KEEP_WORLD, unreal.AttachmentRule.KEEP_WORLD, False)
                    # delete unnecessary nodes
                    actors_to_delete = [a for a in [old_actor] + get_actor_hierarchy(old_actor) if a.__class__ != unreal.StaticMeshActor]
                    for delete_actor in actors_to_delete:
                        print "deleting actor " + delete_actor.get_actor_label()
                        unreal.EditorLevelLibrary.destroy_actor(delete_actor)
                continue
        
            print "merging all static meshes under " + actor.get_actor_label()
            backup_transform = actor.get_actor_transform()
            actor.set_actor_transform(unreal.Transform(), False, False)
        
            cleaned_actor_name = re.sub('[^-a-zA-Z0-9_]+', '_', actor.get_actor_label())
            new_path_name = content_folder + cleaned_actor_name
            print "new path name " + new_path_name
        
            merge_options = unreal.EditorScriptingMergeStaticMeshActorsOptions()
            merge_options.base_package_name = new_path_name
            merge_options.destroy_source_actors = False
            merge_options.mesh_merging_settings.bake_vertex_data_to_mesh = False
            merge_options.mesh_merging_settings.computed_light_map_resolution = False
            merge_options.mesh_merging_settings.generate_light_map_uv = False
            merge_options.mesh_merging_settings.lod_selection_type = unreal.MeshLODSelectionType.ALL_LO_DS
            #   merge_options.mesh_merging_settings.lod_selection_type = unreal.MeshLODSelectionType.SPECIFIC_LOD
            #   merge_options.mesh_merging_settings.specific_lod = 0
            # only if single LOD level is merged
            #   merge_options.mesh_merging_settings.merge_materials = True
            merge_options.mesh_merging_settings.merge_physics_data = True
            merge_options.mesh_merging_settings.pivot_point_at_zero = True
            merge_options.mesh_merging_settings.specific_lod = 0
            merge_options.mesh_merging_settings.use_landscape_culling = False
            merge_options.mesh_merging_settings.use_texture_binning = False
            merge_options.mesh_merging_settings.use_vertex_data_for_baking_material = False
            merge_options.new_actor_label = cleaned_actor_name
            merge_options.spawn_merged_actor = True
        
            # merge and retrieve first instance
            merged_actor = unreal.EditorLevelLibrary.merge_static_mesh_actors(actors_to_merge, merge_options)
            merged_actor.set_actor_transform(backup_transform, False, False)
            merged_mesh = merged_actor.static_mesh_component.static_mesh
        
            # instanciate all other components instances
            for old_actor in actors:
                if old_actor == actor:
                    new_actor = merged_actor
                else:
                    new_actor = unreal.EditorLevelLibrary.spawn_actor_from_class(unreal.StaticMeshActor, unreal.Vector(0, 0, 0), unreal.Rotator(0, 0, 0))
                    new_actor.set_actor_transform(old_actor.get_actor_transform(), False, False)
                    new_actor.static_mesh_component.set_static_mesh(merged_mesh)
                new_actor.set_actor_label(old_actor.get_actor_label())
                new_actor.attach_to_actor(old_actor.get_attach_parent_actor(), unreal.Name(), unreal.AttachmentRule.KEEP_WORLD, unreal.AttachmentRule.KEEP_WORLD, unreal.AttachmentRule.KEEP_WORLD, False)
        
                print "  deleting hierarchy of " + old_actor.get_actor_label()
                actors_to_delete = [old_actor] + get_actor_hierarchy(old_actor)
                for delete_actor in actors_to_delete:
                    print "   deleting actor " + delete_actor.get_actor_label()
                    unreal.EditorLevelLibrary.destroy_actor(delete_actor)
        Pierre-Felix Breton

        Sr Technical Product Manager AEC, Unreal Engine Enterprise
        Epic Games - LinkedIn


        Unreal Studio Documentation
        Unreal Studio Technical Support
        Report Unreal Studio Bugs

        Comment


          #79
          Originally posted by jjhuang View Post
          I want a new feature: [right click on actor] -> [Reset to origional position]
          (Just like 3ds max filelink a dwg file)
          In 4.20 you right click on an actor and see a datasmith menu, then reset overrides. That will reset the actor to the original state from the datasmith scene.
          We don't separate position from other properties however.
          Pierre-Felix Breton

          Sr Technical Product Manager AEC, Unreal Engine Enterprise
          Epic Games - LinkedIn


          Unreal Studio Documentation
          Unreal Studio Technical Support
          Report Unreal Studio Bugs

          Comment


            #80
            Originally posted by pf_breton View Post
            The next version of the plugin will most likely improve on that. There are however details in how Sketchup stores data that we also respect that can change things a bit.
            In the above model, I have 2 components and 2 groups. In Unreal, the actor names will respect what has been set in the Sketchup outliner. Note that a user can customize names in Sketchup that don't get stored are the Group/Component definition level so we are taking account of that.
            For components, they will point to the same meshes instances so we have one asset for many actors: the asset will use the component definition name, while the actor will use the outliner name.
            My guess would be; if the modeller in SketchUp takes the effort to name an object (even if the component already has a name) - he/she must have a reason for that and it would be nice if the name would persist into US.

            Originally posted by pf_breton View Post
            That is by design. When several separate connected meshes sit inside the same level in the hierarchy, we preserve their separation. Grouping all faces as one mesh will create other issues, like gigantic lightmap uvs, improper culling etc. When working with unreal, we have to unlearn old habits from other renderers (like combining meshes by material or by layer) : this works against you in a realtime engine like Unreal.
            The real issue is "too many actors from sketchup" in general.
            In principal I agree or the next thing people will complain about is the slow performance of US.
            But maybe there could be a threshold before an object gets split up into multiple parts? No need to split up objects if the total face count of the group doesn't exceed 200 faces or so(or give people a way to control this setting)? For people who create clean and low poly models (the best way to keep SketchUp fast and responsive) this would be nice.

            Originally posted by pf_breton View Post
            In the future we will provide tools to regroup objects in a more smarter way to reduce drawcalls while respecting instancing. We have a prototype of that done in python that achieves this, I have attached it if you want to pay with it (no promises made to its usefulness). The downside of that method is that it will break re-import so we are thinking of a way to do it as a pre-import step.
            Code:
            ...
            Interesting code. I will have a look at it once I figure out how to run Python in UE 4.20. Last time I looked I couln't find any official documentation.

            Breaking re-import could be bad once you start to add interaction to your objects in the scene (a rotating door for instance) ?

            Kind regards,
            Max

            Comment


              #81
              Hey maxbrown, you can find the docs about Python in UE4 here:
              https://docs.unrealengine.com/en-us/...r-using-Python

              You'll also want to install the Editor Scripting Utilities plugin:
              https://docs.unrealengine.com/en-us/...ing-the-Editor

              The API reference is at:
              https://api.unrealengine.com/INT/PythonAPI/

              Comment


                #82
                Originally posted by Robb Surridge View Post
                Hey maxbrown, you can find the docs about Python in UE4 here:
                ...
                https://api.unrealengine.com/INT/PythonAPI/
                Thanks Robb Surridge !

                Comment


                  #83
                  Originally posted by pf_breton View Post
                  In the future we will provide tools to regroup objects in a more smarter way to reduce drawcalls while respecting instancing. We have a prototype of that done in python that achieves this..
                  Code:
                  ...
                  Hi pf_breton , I tested the Python code (also thanks to Robb Surridge for the links). It works very nicely - just what I hoped for!
                  Edit: although it only plays nice if you have all the objects in SketchUp in the root of the outliner. When they are nested in two containers for instance (Old & New to visually make a difference between old & new objects in a remodeling project) they are merged into just two objects. So maybe an extra option would be possible for people to match this to people's workflow?

                  Maybe the script could also generate lightmap UVs again? They seem to be merged and not generated again after the merge of the objects.
                  Also, the lightmap coordinate index is set to 0 instead of 2.

                  I'm curious why 3 channels used - I would expect 1 for the texture coordinates and 1 for the lightmaps..?

                  Will US objects / projects be compatible with UE projects / objects?
                  Edit: I just tried and there's something going wrong. The merged objects end up at different positions, dragging the datasmith scene into the viewport doesn't work in UE. Is it intended to be able to migrate projects (this way) to UE?

                  Last question - is there an easy way to re-link the materials to a custom master material while keeping the texture-settings? My target platform is the Oculus Rift / GO and more simple shaders are preferred. Its easy to edit the SketchUp master material but maybe there's another option as well.

                  Max
                  Last edited by maxbrown; 08-02-2018, 07:42 AM.

                  Comment


                    #84
                    Hi,

                    With regard to importing CAD using datasmith, the addition of Edit Mode to the Static Mesh Editor is great. Will further methods of selecting multiple faces be an option soon? Adding marquee selection is essential, but more advanced methods such as Ring, Grow/Shrink, etc would also be great.

                    Thanks!

                    Gav
                    Last edited by vauxhallviva; 08-14-2018, 09:26 AM.

                    Comment


                      #85
                      Hi, Datasmith support for Cinema 4D who be really useful, Thanks!!

                      Comment


                        #86
                        Originally posted by vauxhallviva View Post
                        Hi,

                        With regard to importing CAD using datasmith, the addition of Edit Mode to the Static Mesh Editor is great. Will further methods of selecting multiple faces be an option soon? Adding marquee selection is essential, but more advanced methods such as Ring, Grow/Shrink, etc would also be great.

                        Thanks!

                        Gav
                        yes. We’re adding select by smoothing group now and we will continue improving it to work well with complex shapes imported from cad models
                        Pierre-Felix Breton

                        Sr Technical Product Manager AEC, Unreal Engine Enterprise
                        Epic Games - LinkedIn


                        Unreal Studio Documentation
                        Unreal Studio Technical Support
                        Report Unreal Studio Bugs

                        Comment


                          #87
                          In the product viewer model, when play is activated, it would be nice to display the gizmo with the three axes on the selected objects, in which you can move the objects on the desired axis.
                          Without shifting the point of view each time.
                          Daniele Barone
                          Freelance 3D Linkedin

                          Comment


                            #88
                            Cinema 4D support please

                            Comment


                              #89
                              I work for 3D Archiviz , We need "Camera Vertical shift" for years.
                              Maybe a special still camera with "resolution", "Multipass" "Postprocess", "file-format" presets. That will be very convenience for us.
                              We don't need camera shifted for Animations.
                              That feature already exists in 3ds Max , Vray, Corona,..

                              Thank you !!
                              Attached Files
                              Last edited by jjhuang; 08-23-2018, 04:00 AM.

                              Comment


                                #90
                                Cinema 4D plugin, please!

                                Comment

                                Working...
                                X