Search Unity

[Updated] Surforge 1.3.1 - 3D rendered PBR texturing in Unity

Discussion in 'Assets and Asset Store' started by Sergeyv_3d, Jan 27, 2017.

  1. Quique-Martinez

    Quique-Martinez

    Joined:
    Oct 1, 2013
    Posts:
    105
    Saw there is an update, cannot wait for having some time to test it out!
     
  2. twitchfactor

    twitchfactor

    Joined:
    Mar 8, 2009
    Posts:
    351
    I grabbed it... was super-enthused, but doesn't seem to want to play nicely with anything above 2018.2.2f (still) and all the cool rocks aren't really available through the Detail browser. For instance, selecting the stoneblock doesn't give you any variations, merely flips when you right click. But going into the directories, there are tons of "chippedblock" and "freeformStone" meshes.
     
  3. jamesparksart

    jamesparksart

    Joined:
    Dec 1, 2017
    Posts:
    10
    You can achieve a cloth or leather like look though. See image_0004 from a package I am working on. But, I made the brown leather mostly in Surforge, I just added another leather normal and some folds/wrinkles, in Photoshop. I also used quixel's converter to convert those into normal maps. But you can use any converter you want and any image editor.
     

    Attached Files:

    hopeful likes this.
  4. lolclol

    lolclol

    Joined:
    Jan 24, 2013
    Posts:
    177
    looks cool man.
     
  5. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    300
    I'm afraid in your case there are still issues with the installation.
    Unity 2019 compatibility was repeatedly checked by me, users, and version approved by Unity.
    Please email me and i will try to do my best to solve it.
    Here is a little tutorial on how this works.
    surforge130_blocks.png
    On the left, icons you select in Surforge Add Detail tool list, for stone sets. On the right side, models included in the selected set (screenshot from .fbx file).

    Assume you creating texture consist of stone blocks.
    The main idea, is to save time, by let user avoid selecting separate block each time from the list, because you need a variety, not a specific selected model from the set.

    Select the set, and add stamps to the Scene View, while shuffle included models with Right mouse button.
    While it shuffles, it not only changes the model, but also rotates it, flips, and shuffles one of several detail Normal+AO map variants on the top of model.
    Finally, you can apply different Surforge IDs/materials, by hand or with "Assign random material masks to selection" button, on Surforge Materials tab.
    This will give a lot of variety for the stone block composition feel realistic, including large walls. This works for new board models the same way.

    Looks awesome! Great work :)
     
    Akshara likes this.
  6. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    558
    Hi. Just purchased the asset. Doesn't work in Unity 2019. I tried in three versions.Current is stable 1.1f1
    upload_2019-7-23_0-54-5.png
    I'm trying to use it with HDRP if that matters.

    Edit: Solved it.. Asset makers, please never do it. Don't make your assets path-dependent. I moved Surforge into my Packages folder inside the Assets folder and it broke it. I wonder if it would work if I would install it into Packages right away. But either way it should work when moved.

    Kinda to be expected, but it doesnt work with HDRP. The materials don't render. Making my Surforge setup a separate project would be even better, except the model exporting and syncing will get more difficult.

    Actually I will setup a standard renderer project for surforge and sync the output textures and models with Synkron.
     
    Last edited: Jul 23, 2019
  7. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    300
    Hello,
    Thank you very much for your purchase and feedback.
    I am sorry for the hardcoded paths, it is already in todo list and will be fixed in the next update.

    Surforge can't be imported and run in HDRP project.
    Surforge shaders and render was written before HDRP released. There are limited amount of texture samplers in the shaders, and Surforge already uses all that spare samplers of Standard shader. The problem is that HDRP shaders has less spare samplers left. Therefore, the only option to add support for HDRP, it to reject some of Surforge material texture channels, all of which are useful and have been added by users requests.

    Surforge exported results can be entirely used in HDRP project.
    It is proven approach to install Surforge into separate new project, which will be your "texturing factory".
    Surforge itself is not needed when using its exported results.

    HDRP has a different layout of the channels of the textures, although texture information itself is the same.
    You could use Unity built-in converter to update Surforge exported Standard materials and maps for HDRP.
    You could also use your image editor to move needed channels within the textures.
     
  8. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    558
    Thank you for the quick reply. I will probably just create a custom HDRP shader in shader graph that would take standard's texture channels.

    I have problems with tools now. Poly lasso doesn't work. The tool highlights as active but the button doesn't look pressed like it does in a tutorial (might be different GUI style with this new GUI). And when I click around or on the "board" in the scene view nothing happens. It just selects objects in the scene.

    Other tools don't work as well. Detail object just appears in the middle while detail tool is active and doesn't react to input.

    2019.3.0a10

    upload_2019-7-23_19-42-43.png
     
    Last edited: Jul 23, 2019
  9. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    135
    This is a great update. Congratulations!

    I am using Unity 2019.1.7f1 and also had some problem with the lasso tool when doing some tests during the weekend. My shortcut window was confirming that I was splitting but no splitting was happening . Even when my map was filled.
     
  10. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    300
    Unity 2019.3.0a10 not yet supported, as it is a pre-release.
    I am working on Surforge update to support new Unity GUI.

    Please use one of official releases, latest for now is Unity 2019.1.11f1.
    I carefully tested Unity 2019.1.11f1 works, as well as Unity 2019.1.7f1 and previous.

    I am investigating some unexpected installation issue reports now.
    Going to make a detailed step-by-step installation guide.

    I discovered one peculiarity of Unity Hub, which could be important to mention.
    When several Unity versions installed, pressing the "New" button in Unity Hub to create new project, going to create it for last Unity version used, not the version of desktop shortcut clicked (which just runs the Hub for me).
    This could possibly lead to confusion.
    Please do not forget to switch Unity version with drop down menu near the "New" button.
    UnityHub_select_version.png
     
  11. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    558
    Yes thanks. I installed the 1.11 right away. I do have feedback on the tools though.

    Slapping together some awesome materials have never been easier, but when I want some control, Surforge becomes very frustrating.
    1. The biggest surprise for me is that objects when selected don't have basic interactive parameters. The current inspector is unusable, the profile preset selection is not enough. When object is selected there should be interactive sliders and flags for: offset(!), Y scale, y position, xz scale, general scale, bevel, profile curve selection. The selected object parameters should probably appear in the same place where material parameters are currently which you don't need constantly opened.
    2. The profiles should have dynamic subdivision. Currently when I increase scale to get the shape I want i see very low poly corners
    3. The placed objects should remain editable as curves. I'm surprised that it isn't the case since objects don't become baked and remain parametric, but for some reason not editable except the cuts that can be made and non-interactive messy inspector.
    4. Full profile/panel/object editor based on user curves, and all other parameters with intuitive UI
    5. OR a bigger customizable (with ability to remove, move, and add) library of profiles. Library is lacking very basic and necessary shapes, like the most simple wide indents.
    Basically Surforge needs some flexibility of Archimatix or at least wider easily customizable library of presets.

    Nice-to-haves and minor complaints:
    1. Whatever right mouse button is doing (repeating last operation?) it shouldn't do that. It should be RMB+SomeModifier instead. The pure RMB is used for camera rotation in Unity and I use it constantly.
    2. Shapes (objects) should stay on top of each other by default, there is no use for them being underneath older shapes
    3. Shape objects should have descriptive names based on profile or shape name

    Also, what are those??
    upload_2019-7-24_14-39-50.png

    No need to respond to every point, just please tell me if you think some of those additions/changes would be reasonable.
     
    Last edited: Jul 24, 2019
  12. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    558
    I made a cut... and the panels are completely merged into each other going way beyond the lasso curves. That's why offset parameter is necessary. But also why by default it doesn't look like advertised on the profile(preset) picture?
    upload_2019-7-24_14-51-17.png

    Did I edit offset parameter somewhere accidentally?? All panels I create are now like this.

    EDIT: found it. it's bevel amount. When I changed it I didn't expect that it will change for all objects or will become the default for all new objects. ( or whatever happened..)

    EDIT: I still have that problem without bevel the cuts are almost invisible
    upload_2019-7-24_15-23-18.png

    EDIT: this might be an effect of unnamed parameter that represents profile scale. that's why offset parameter is necessary, and probably by default offset should be such that the edges of the panel adhere strictly to the edges of the curve. otherwise it is unusable as I can't make any cuts because objects go into each other if that scale is too far from the default default.
     
    Last edited: Jul 24, 2019
  13. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    300
    Thank you very much for the feedback. Useful and reasonable.
    Please let me clarify some points.
    Poly Lasso object workflow is not yet Inspector oriented.
    This will be added at some point. Overall Surforge workflow is organized around tools and hotkeys, which could be more productive, when a little used to.
    Plese try "[", "]" hotkeys when PolyLasso objects selected, while PolyLasso tool is off, for profile scale decrease/increase
    "Shift + [", "Shift + ]" for selected object's shapes offset in/out.
    Profile of selected objects could be switched any time with clicking the profile icon from the list, while PolyLasso tool is off.
    The PolyLasso library could be customized. No intuitive tools for it yet. (check "PolyLassoProfile.cs" and the user guide).
    All presets are based on regular Unity prefabs, and could be duplicated/customized by user. Not on the fly for now though.
    This is in todo list, as well as Inspector tweaks, constantly shifted by requests related to render/material part. Will definitely be added in the future.
    It mirrors last shape action (create shape or cut) against solid symmetry line.
    Please check more hotkeys while hovering PolyLasso tool button, or "SurforgeHotkeys.pdf" in Surforge folder.
    Got it. Mouse hotkeys was designed around Alt+LMB viewport rotation. A kind of standard for working with 3D editors. Never thought that someone rotates the viewport with the right button.
    There is a Construction Plane, movable up and down with triangle buttons near the PolyLasso tool button. It sets the Y position of new PolyLasso shapes you create.
    You could also move/rotate/uniform scale any objects with regular Unity transform tools. Poly Lasso objects still remain splitable after it. You could also move it on Y axis. Add Detail tool respects poly lasso objects colliders.
    Probably you created more than one object with "Fill UV island" with double click hotkey.
     
    Last edited: Jul 24, 2019
  14. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    558
    Thank you for help. Sorry if I'm jumping to conclusions before taking my time to learn things.

    No, it was not the case. I really keep track of my objects in the inspector. I tweaked inspector parameters and that caused it I think. Or it was lasso scale alone that caused it.

    EDIT: By offset I mean inside and outside the curves, not vertical!
     
  15. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    300
    Inspector tweak caused it. Sorry for that. For now Poly Lasso objects is not intended to be tweaked in the inspector. As you could see no Inspector GUI there yet, and i am not a fan of hiding stuff. I will fix it to prevent this from happening.
    Please save the scene, restart Unity and load the scene to fix it.

    I see. Please try "[", "]", "Shift + [", "Shift + ]" hotkeys with some Poly Lasso objects selected in the Scene View and PolyLasso tool is off.
    profileScale.gif
     
    Last edited: Jul 24, 2019
  16. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    558
    I'm sorry, this isn't offset this is scale. It scales the edges on all axes. I mean an offset that would preserve the profile curves and Y positions, and will only change horizontal distance between the outer edge and the lasso curve. This is exactly the point, what if I want a wide profile but I don't want to loose the gap in my cuts. Or I want the wide profile and I don't want my panel to become too big and go over the edges that i drawn. Currently since this offset is unpredictable (unintuitive) To get the size of a panel right I have to redo it because I cant tell how much over the edges it will go. And with the cuts, it seems impossible to get a proper cut gap with the scale that I chose, I have to decrease it for the gap to appear.
     
  17. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    300
    I see, you want the shape remain untouched, and let only the profile (inner curves) offset.
    But there is a technical limitation, illustrated by this picture:

    As you can see, it is not possible to offset the shape after some point, while keep the same shape topology. Mesh with wide profiles can't be fast and reliable auto-generated for non-convex shapes, not only in Surforge but using polygons in general. Thats why Surforge pre-build profiles are not very wide. Surforge shapes can be offsetted this way, when you offset the whole shape (like on gifs), keeping profile in possible limits.
    I can add some fine-tweaking options to the profile of course, but this could lead to some counterintuitive behaviour. Like when user changed the profile and it works for simple shape, and stop working after shape was cutted and become more complex.
     
  18. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    558
    If you can detect in code that the shape topology have changed or some self-intersection have occured, I think you can display that to a user intuitively, even make the shape appear red in Scene view or simply not allow to push it that far and display a UI warning.
     
    Last edited: Jul 24, 2019
  19. GLagolick

    GLagolick

    Joined:
    Jun 27, 2017
    Posts:
    7
    upload_2019-8-7_1-47-40.png
    Have this strange dark bug after update to 1.3.0. Reinstall of Surfoge did't help( Any suggestions?
     
  20. GLagolick

    GLagolick

    Joined:
    Jun 27, 2017
    Posts:
    7
    upload_2019-8-7_1-53-13.png
    UPD: If i hide render preview then bug disappears
     
  21. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    300
    Hello,

    Please check in Unity in Window - Rendering - Lighting Settings - Scene tab, "Auto generate" check mark (at the bottom) is enabled in your scene.
    This is needed for skybox in the scene to have effect. Unity sometimes turns it off when creating new scene with Surforge.
    unity_lighting_autoGenerate.png

    Could you please also try to reinstall Surforge into the fresh clean new project for the test run, to be sure no conflicts with third-party tools or project settings.

    There is also on your first screenshot Unity setting "Use scene lighting" is turned off.
    useSceneLighting.png
     
    Last edited: Aug 7, 2019
    illinar likes this.
  22. GLagolick

    GLagolick

    Joined:
    Jun 27, 2017
    Posts:
    7
    Okey, that didn't help me. So i used my second unity project (with same version) to create textures, but now i have this strange bug again, i just don't know why it broke :/ Can't find solution for it, i deleted every third-party tool, reinstalled surforge, turned on autogenerate.. Idk what is that :c Inetresting note:
    surforge title screen become more lighter

    upload_2019-8-9_3-36-8.png upload_2019-8-9_3-40-28.png
     

    Attached Files:

  23. GLagolick

    GLagolick

    Joined:
    Jun 27, 2017
    Posts:
    7
    Wow, something interesting here. I switched color space from linear to gamma and now this strange dark bug disappear!
    But linear color space worked with surforge fine on earlier version. Please, check this :c
    upload_2019-8-9_3-44-40.png
     
  24. anzerkree

    anzerkree

    Joined:
    Feb 16, 2017
    Posts:
    11
    Hello,

    I have 3 problems in importing my textures into my project.

    This is my environment:
    - A project for my game
    - Another project with Surforge. (To avoid mixing, but is it wise?)


    Problem 1 :
    - I have a message that says "Creating asset at path Assets/Ressources/Materials/Floor/Textures/Cockpit_Floor.mat failed.
    Surforge.CreateMaterialForExportedMaps (System.String path, System.Boolean isLinearColorSpace) (at Assets/Surforge/Editor/Surforge.cs:4739)"

    and another one:
    "Parent directory must exist before creating asset at Assets/Ressources/Materials/Floor/Textures/Cockpit_Floor.mat.
    UnityEditor.AssetDatabase:CreateAsset(Object, String)"


    Problem 2 :
    - The NormalMap texture generates square artifacts on my surfaces when imported into my game. This only does it to me on Unity 2019.1.7 (Not on 2018*)
    See Blue Square in the screenshot
    If I increase the resolution (8k) it decreases, but it's still there.
    What are the best practices?

    Problem 3 :
    The rendering in my game is not as sharp and beautiful as in the Surforge window.
    See Red Square in the screenshot
    I have no particular settings in my "Game" project.
    Do I have to set / define particular values?
    What do you recommend to have made the rendering as close as possible to the one in Surfoge?

    Thank you for your help, and your fabulous work!
     

    Attached Files:

  25. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    300
    Reproduced. Thank you very much for finding this.
    The issue derives from the way Unity versions of 2018 and higher handles GUI textures in Linear mode. The "Linear" settings for the Unity Editor GUI textures inverted in 2018 and higher, in comparison with older versions. As Surforge is focused to support multiple versions of Unity this drive to issues.

    I will fix this in the next update.
    For now, please use this fast and simple solution for Linear workflow:
    in "Surforge\Editor\Interface\SurforgeInterface.cs" please find strings "#if UNITY_2018" and replace for "#if UNITY_2018 || UNITY_2019" (4 strings total).

    This will fix the GUI issues for Surforge texture preview, and Surforge material editor icons for Linear mode. But tool icons will be brighter after it.
    I am sorry for the inconvenience. These just GUI issues, rendering/shaders part not involved. Export, materials should work fine, regardless of this fix.
     
    hopeful and GLagolick like this.
  26. GLagolick

    GLagolick

    Joined:
    Jun 27, 2017
    Posts:
    7
    Thank you very much! Replaced this 4 strings, now everything is fine. Love this tool, waiting for next updates :)
     
    hopeful likes this.
  27. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    300
    Hello,
    This is probably because you exporting results outside the Surforge project's Assets folder.
    Export of Unity material, with textures linked to the corresponding fields, can only be made using Unity native Asset Databese methods.
    And it can't access the files outside the project Asset folder, because its outside and not in asset database. Like all models and textures have to be in project folder for Unity to access it. It is just how Unity works.
    This is a result of Unity texture compression of normal map. This could happen to any detailed normal map, not only created with Surforge. The Surforge exported normal map is fine and uncompressed, you could easily check it in your image editor.
    You could try higher quality settings in Unity Inspector for normal map texture compression. You could also edit your materials in Surforge to remove the microdetails of normal map, this will make texture less detailed and easier compressible.
    There is SMAA applyed to Surforge texture preview. It also renders preview window to 1024 RenderTexture regardless of preview size and project quality settings.
    This could looks better then in Unity Editor Scene View, or game application, depends on your settings and tweaks to your project's final image.
    You could find SMAA in Surforge folder. It is made by different developer, free, and easy to use.
    There are a lot of image post processing tricks around, usually anti-aliasing filter and high resolutions do the job.
    You also usually want to make surfaces less shiny if you plan the player to look at them at high angles to the camera.
     
  28. jamesparksart

    jamesparksart

    Joined:
    Dec 1, 2017
    Posts:
    10
    First off. I really love this asset and have been using it for a while. So here is what I need help with.

    1.) How do I get my menu back (see right half of the screen shot). It just disappeared on me when I had to restart my project and I have re-started it several times and deleted and re-“installed” surforge. The options for the materials are still not there.

    2.) The two “walls” in the scene view (see left side) are the same model just duplicated and stuck next to each other. Is there a way to make sure that the tiling matches for a continuous texture? Like an option to make a it a 1 to 1 scale that would make it tileable/seamless for just that part or for that particular piece of the uv or splined mesh that was created? Maybe something that says keep the tileable/seamless texture in the middle as your scale it to make sure each side matches your seamless texture on the opposite side?

    Anyways. Thank you for any help you can provide!!
     
  29. jamesparksart

    jamesparksart

    Joined:
    Dec 1, 2017
    Posts:
    10
    Thank you!
     
  30. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    300
    Hello,

    This may be due to the Surforge window was open before Surforge loaded. Could you please try to close the Surforge window before creating new scene or loading your scene.

    Seamless mode is one of Surforge strengths. But it works for the whole texture space, not separate UV island.
    You could achieave seamless for the certain island by creating your seamless texture in Surforge separately, and then use your image editor to fit it to the island. There is an option "export masks - separate". It creates a mask for each of your materials, making it easy to select the needed areas of the texture in your image editor.

    You could also try to plan your UV layout such way, the needed island matches the UV space. This is usually done for comfort work with seamless textures. Don't forget you could stack UV islands one over another, to save the UV space and make things share texture.
     
  31. jamesparksart

    jamesparksart

    Joined:
    Dec 1, 2017
    Posts:
    10
    - True.. but then you loose the ability for face individuality. Like placing some words or a logo on just one side.
     
  32. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    300
    Thank you very much for finding this.
    Unity 2019.2 is fully supported now in Surforge 1.3.1

    I am afraid using of Surforge "Seamless" feature per UV island is not possible. This would require individual render pass for each UV island, which is more than GPU limited resources could handle.
    But, you could tweak the tiling/offset for each Surforge material ID's maps separately with Surforge material editor. This could help with seamless UV islands in some cases.
     
    Last edited: Sep 2, 2019
  33. anzerkree

    anzerkree

    Joined:
    Feb 16, 2017
    Posts:
    11
    Hello Sergeyv_3d,

    I have an UV problem when i'm exporting object from blender to Surforge.

    Some times, some faces are missing.
    The UV face is OK in Blender or UWMapper. But not show in Surforge.

    I don't know why. Is-it a problem with surforge ? Or with my Object ?

    Thanks for your help.
     

    Attached Files:

  34. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    300
    You could switch the UV display mode to classic.
    uv_classic.png
    You can't auto-fill it with double click, but you can easily create the needed shapes point-by-point using Surforge's "snap to UVs" feature.

    When Unity imports the model, there is no such concept, as "uv island". Only the UVs of each triangle available located near each other, without the "border" of the island.
    Surforge tries to create the islands with countours from that Unity's raw UV data. This works well for the most cases (for simple islands). But in some cases, such as islands with holes and with cuts, is just not possible.
    The classic UV mode works with any type of UVs.
     
    Last edited: Aug 29, 2019
  35. anzerkree

    anzerkree

    Joined:
    Feb 16, 2017
    Posts:
    11
    That's it !!!!! Sergeyv_3d, you're awesome !

    Surforge is a great tool and you ensure an incredible follow-up!
    Quick answers, always relevant and with infinite patience !

    Thanks to you, here is what I was able to achieve :












    Thank you again, it's all thanks to you !!!!
     
    Sergeyv_3d, AthrunVLokiz and hopeful like this.
  36. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    300
    Great work, anzerkree! Very polished and professional.

    Good news.
    Surforge 1.3.1 update is ready and live.

    Unity 2019.2 compatibility.

    added: Surforge path autofind. You can now move and rename Surforge folder in project.
    added: Enables Unity scene setting "Lighting - Auto Generate" when creating a new texture, to display skybox correctly.

    fixed: Linear workflow in Unity 2019.
    fixed: Incorrect GUI brightness in Linear mode.