Jump to content

Breggs

Members
  • Content count

    30
  • Joined

  • Last visited

  • Days Won

    3

Breggs last won the day on April 1 2017

Breggs had the most liked content!

About Breggs

  • Rank
    Advanced Member
  1. Breggs

    Performance Question

    I am modeling a city with probuilder. The windows, walls, etc. are all made with probuilder and then made into unity prefabs to be used modularly. From my limited understanding, every probuilder object is unique (each mesh filter has a different id). So even though it is the same prefab being used, the model is "unique". Does this have any performance implications compared to using a third party modeling program and one "real" mesh for the prefab? Is there performance to be gained by using probuilder's export function to create these modular assets (assuming there is a performance hit)?
  2. Breggs

    Face translation and UV Positions

    @karl I got it to work the way I wanted with the following code. foreach (pb_Face face in this.selection.pb.faces) { face.uv.useWorldSpace = true; } Is this the best approach?
  3. Breggs

    Face translation and UV Positions

    @karl So should I call pb.Refresh after TranslateVertices, or should I call the individual refreshed (e.g. RefreshNormals, Tangents, etc.)?
  4. I'm working on a runtime level editor using ProBuilder. I have face translation working, but the pb_Object's uv's change when I move the face. I want them to maintain their position in world space (I think that's the best way to describe it). How I want the UV's to behave (using ProBuilder tools). https://gyazo.com/d8ee8d45a145b91a26769abe10d006cf How they currently behave (runtime editor). https://gyazo.com/91abbad97d74cb5c605983c2228ce6ff I'm using this line to translate the face. pb.TranslateVertices (this.selection.face.distinctIndices, this.selection.normal.normalized * dist.z); I would appreciate any help!
  5. Breggs

    Runtime Level Editor Thread

    @karl I was looking for ways to optimize the level editor geometry without forcing the user to delete faces (to keep the experience simple for players) and I found this thread http://www.procore3d.com/forum/topic/34-auto-no-draw/. Automatically no-drawing hidden faces sounds like a great solution for my particular use case. However, the initial script you linked in that thread is missing and I can't find it within ProBuilder like you mentioned (I realize that was back in 2013). Is that script still floating around somewhere? I would probably have to modify it for runtime, but it sounds like it would be a great starting point for reference.
  6. Breggs

    Runtime Level Editor Thread

    Added brush creation and movement. https://gyazo.com/bf673d0516fa4d511449879b24ceeebc
  7. Breggs

    Serialize pb_Object to JSON

    @karl Thanks for the information. Could you explain how I can make sure that pb_Object is being stored as a value rather than a reference, or try to point me in the correct direction? Thank you.
  8. Breggs

    Serialize pb_Object to JSON

    It's hack-ey, but for now I'm converting the pb_Object to Json and saving the string to the level editor object. I then convert the level editor object class to Json. When I load the object I deserialize the level editor object class, and then deserialize the pb_Object Json string. This feels dirty but it works, I would appreciate any information if there's a better approach I could take.
  9. I'm working on a runtime level editor using ProBuilder. Right now I'm trying to figure out how to save and load pb_Objects. Saving and loading pb_Objects with Unity's JsonUtility works fine, but it doesn't save the object's position or rotation. I created this class to serve as the base for all objects that need to be serialized in the level editor. [System.Serializable] public class LevelEditorObject : MonoBehaviour { public pb_Object pb; public Vector3 position; public Quaternion rotation; } When I serialize this class it outputs: {"pb":{"instanceID":16286},"position":{"x":6.0,"y":0.0,"z":-2.0},"rotation":{"x":0.0,"y":0.0,"z":0.0,"w":0.0}} When I serialize just a pb_Object it outputs: {"_quads":[{"_indices":[0,1,2,1,3,2],"_distinctIndices":[0,1,2,3],"_edges":[{"x":0,"y":1},{"x":2,"y":0},{"x":1,"y":3},{"x":3,"y":2}],"_smoothingGroup":0,"_uv":{"useWorldSpace":false,"flipU":false,"flipV":false,"swapUV":false,"fill":1,"scale":{"x":1.0,"y":1.0},"offset":{"x":0.0,"y":0.0},"rotation":0.0,"justify":0,"localPivot":{"x":1.75,"y":2.75},"localSize":{"x":0.0,"y":0.0},"anchor":9},"_mat":{"instanceID":13630},"manualUV":false,"elementGroup":-1,"textureGroup":-1},{"_indices":[4,5,6,5,7,6],"_distinctIndices":[4,5,6,7],"_edges":[{"x":4,"y":5},{"x":6,"y":4},{"x":5,"y":7},{"x":7,"y":6}],"_smoothingGroup":0,"_uv":{"useWorldSpace":false,"flipU":false,"flipV":false,"swapUV":false,"fill":1,"scale":{"x":1.0,"y":1.0},"offset":{"x":0.0,"y":0.0},"rotation":0.0,"justify":0,"localPivot":{"x":-2.5,"y":2.75},"localSize":{"x":0.0,"y":0.0},"anchor":9},"_mat":{"instanceID":13630},"manualUV":false,"elementGroup":-1,"textureGroup":-1},{"_indices":[8,9,10,9,11,10],"_distinctIndices":[8,9,10,11],"_edges":[{"x":8,"y":9},{"x":10,"y":8},{"x":9,"y":11},{"x":11,"y":10}],"_smoothingGroup":0,"_uv":{"useWorldSpace":false,"flipU":false,"flipV":false,"swapUV":false,"fill":1,"scale":{"x":1.0,"y":1.0},"offset":{"x":0.0,"y":0.0},"rotation":0.0,"justify":0,"localPivot":{"x":-1.75,"y":2.75},"localSize":{"x":0.0,"y":0.0},"anchor":9},"_mat":{"instanceID":13630},"manualUV":false,"elementGroup":-1,"textureGroup":-1},{"_indices":[12,13,14,13,15,14],"_distinctIndices":[12,13,14,15],"_edges":[{"x":12,"y":13},{"x":14,"y":12},{"x":13,"y":15},{"x":15,"y":14}],"_smoothingGroup":0,"_uv":{"useWorldSpace":false,"flipU":false,"flipV":false,"swapUV":false,"fill":1,"scale":{"x":1.0,"y":1.0},"offset":{"x":0.0,"y":0.0},"rotation":0.0,"justify":0,"localPivot":{"x":2.5,"y":2.75},"localSize":{"x":0.0,"y":0.0},"anchor":9},"_mat":{"instanceID":13630},"manualUV":false,"elementGroup":-1,"textureGroup":-1},{"_indices":[16,17,18,17,19,18],"_distinctIndices":[16,17,18,19],"_edges":[{"x":16,"y":17},{"x":18,"y":16},{"x":17,"y":19},{"x":19,"y":18}],"_smoothingGroup":0,"_uv":{"useWorldSpace":false,"flipU":false,"flipV":false,"swapUV":false,"fill":1,"scale":{"x":1.0,"y":1.0},"offset":{"x":0.0,"y":0.0},"rotation":0.0,"justify":0,"localPivot":{"x":-1.75,"y":-2.5},"localSize":{"x":0.0,"y":0.0},"anchor":9},"_mat":{"instanceID":13630},"manualUV":false,"elementGroup":-1,"textureGroup":-1},{"_indices":[20,21,22,21,23,22],"_distinctIndices":[20,21,22,23],"_edges":[{"x":20,"y":21},{"x":22,"y":20},{"x":21,"y":23},{"x":23,"y":22}],"_smoothingGroup":0,"_uv":{"useWorldSpace":false,"flipU":false,"flipV":false,"swapUV":false,"fill":1,"scale":{"x":1.0,"y":1.0},"offset":{"x":0.0,"y":0.0},"rotation":0.0,"justify":0,"localPivot":{"x":1.75,"y":-2.5},"localSize":{"x":0.0,"y":0.0},"anchor":9},"_mat":{"instanceID":13630},"manualUV":false,"elementGroup":-1,"textureGroup":-1}],"_sharedIndices":[{"array":[0,13,22]},{"array":[1,4,23]},{"array":[2,15,16]},{"array":[3,6,17]},{"array":[5,8,21]},{"array":[7,10,19]},{"array":[9,12,20]},{"array":[11,14,18]}],"_vertices":[{"x":-4.5,"y":0.0,"z":0.0},{"x":1.0,"y":0.0,"z":0.0},{"x":-4.5,"y":5.5,"z":0.0},{"x":1.0,"y":5.5,"z":0.0},{"x":1.0,"y":0.0,"z":0.0},{"x":1.0,"y":0.0,"z":-5.0},{"x":1.0,"y":5.5,"z":0.0},{"x":1.0,"y":5.5,"z":-5.0},{"x":1.0,"y":0.0,"z":-5.0},{"x":-4.5,"y":0.0,"z":-5.0},{"x":1.0,"y":5.5,"z":-5.0},{"x":-4.5,"y":5.5,"z":-5.0},{"x":-4.5,"y":0.0,"z":-5.0},{"x":-4.5,"y":0.0,"z":0.0},{"x":-4.5,"y":5.5,"z":-5.0},{"x":-4.5,"y":5.5,"z":0.0},{"x":-4.5,"y":5.5,"z":0.0},{"x":1.0,"y":5.5,"z":0.0},{"x":-4.5,"y":5.5,"z":-5.0},{"x":1.0,"y":5.5,"z":-5.0},{"x":-4.5,"y":0.0,"z":-5.0},{"x":1.0,"y":0.0,"z":-5.0},{"x":-4.5,"y":0.0,"z":0.0},{"x":1.0,"y":0.0,"z":0.0}],"_uv":[{"x":4.5,"y":0.0},{"x":-1.0,"y":0.0},{"x":4.5,"y":5.5},{"x":-1.0,"y":5.5},{"x":0.0,"y":0.0},{"x":-5.0,"y":0.0},{"x":0.0,"y":5.5},{"x":-5.0,"y":5.5},{"x":1.0,"y":0.0},{"x":-4.5,"y":0.0},{"x":1.0,"y":5.5},{"x":-4.5,"y":5.5},{"x":5.0,"y":0.0},{"x":0.0,"y":0.0},{"x":5.0,"y":5.5},{"x":0.0,"y":5.5},{"x":-4.5,"y":0.0},{"x":1.0,"y":0.0},{"x":-4.5,"y":-5.0},{"x":1.0,"y":-5.0},{"x":4.5,"y":-5.0},{"x":-1.0,"y":-5.0},{"x":4.5,"y":0.0},{"x":-1.0,"y":0.0}],"_uv3":[],"_uv4":[],"_tangents":[],"_sharedIndicesUV":[],"_colors":[{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0}],"userCollisions":false,"isSelectable":true,"unwrapParameters":{"hardAngle":88.0,"packMargin":4.0,"angleError":8.0,"areaError":15.0},"asset_guid":"","dontDestroyMeshOnDelete":false,"m_selectedFaces":[],"m_SelectedEdges":[],"m_selectedTriangles":[]} How can I make the LevelEditorObject class serialize its pb_Object in the same way? I would appreciate any help. I found a reference to pb_SerializableObject in another thread, but I can't figure out if that class has been removed and/or how to access it if it hasn't. http://www.procore3d.com/forum/topic/963-probuilder-runtime-editor/
  10. Breggs

    Runtime Level Editor Thread

    Some progress on my own level editor using ProBuilder. https://gyazo.com/e5fa4bf60a9609871dbda44e90a30823
  11. Breggs

    Runtime Level Editor Thread

    @bigd Any updates on releasing what you've been working on? I've been banging my head against the wall on something similar for the past week.
  12. I'm having serious issues with loading scenes. Loading any scene results in a significant hitch, to the point where it becomes unresponsive and will crash in builds. I'm loading the scenes asynchronously, however, there is no difference in this issue between SceneManager.LoadScene and SceneManager.LoadSceneAsync. The first time I load a scene it can take up to 60 seconds to load. However, anytime after the initial load (even after restarting the application) the scenes that have previously been loaded will only take 2-3 seconds to load, so something is being cached somewhere. Based on how ProBuilder's meshes aren't really accessible as assets I'm curious if this could be related, if they are loaded in when the scene is first loaded and cached for reference. It's a shot in the dark but I've been fighting with this issue for three weeks now. Any help would be great. Here are a few screenshots of the profiler spike if it's relevant. https://gyazo.com/7c7a26e2a91bae0e0dbd9164547004bd https://gyazo.com/f9f304db878fb4b516e70a9b99d67318 https://gyazo.com/483ba5c15d45ac6aad49eed0b2a261d1
  13. Breggs

    Precomputed Realtime GI Resolution

    I think I figured out the issue, all of the artifacts disappeared by changing the object's settings in the lighting tab to preserve the uv's https://gyazo.com/1a000148af7f2fbf51d4e7eb0e2212d7.
  14. Breggs

    Precomputed Realtime GI Resolution

    Sounds good, it's just a long rectangle, with one face removed.
  15. Breggs

    Precomputed Realtime GI Resolution

    Using the Make Asset action did fix the issue, does this mean that I will have to make all of my objects assets to avoid this issue?
×