Search Unity

Surforge 1.4.5 - 3D rendered PBR texturing in Unity

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

  1. twitchfactor

    twitchfactor

    Joined:
    Mar 8, 2009
    Posts:
    356
    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.
     
  2. jamesparksart

    jamesparksart

    Joined:
    Dec 1, 2017
    Posts:
    35
    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.
  3. lolclol

    lolclol

    Joined:
    Jan 24, 2013
    Posts:
    212
    looks cool man.
     
  4. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    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.
  5. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    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
  6. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    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.
     
  7. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    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
  8. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    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.
     
  9. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    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
     
  10. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    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
  11. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    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
  12. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    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
  13. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    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!
     
  14. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    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
  15. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    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.
     
  16. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    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.
     
  17. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    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
  18. 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?
     
  19. 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
     
  20. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    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.
  21. 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:

  22. 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
     
  23. anzerkree

    anzerkree

    Joined:
    Feb 16, 2017
    Posts:
    14
    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:

  24. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    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.
  25. 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.
  26. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    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.
     
  27. jamesparksart

    jamesparksart

    Joined:
    Dec 1, 2017
    Posts:
    35
    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!!
     
  28. jamesparksart

    jamesparksart

    Joined:
    Dec 1, 2017
    Posts:
    35
    Thank you!
     
  29. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    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.
     
  30. jamesparksart

    jamesparksart

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

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    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
  32. anzerkree

    anzerkree

    Joined:
    Feb 16, 2017
    Posts:
    14
    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:

  33. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    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
  34. anzerkree

    anzerkree

    Joined:
    Feb 16, 2017
    Posts:
    14
    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.
  35. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    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.
     
  36. rayBLAST-R

    rayBLAST-R

    Joined:
    Dec 17, 2005
    Posts:
    28
    Great work on this asset! It is a real time saver. :)
     
  37. jamesparksart

    jamesparksart

    Joined:
    Dec 1, 2017
    Posts:
    35
    @Sergeyv_3d : I have a scene that is ruining 2019.2.7f2. And, when I pull up surforge the preview window is all grey and not displaying any models. upload_2019-10-4_11-14-45.png
     

    Attached Files:

  38. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    I could see on the screenshot lightmaps are baking at the moment. This may be the reason that the preview did not update.

    Could you please check, if Surforge works in the new scene of your project?
    The complex scene is not a good starting point for Surforge, it is better to create a new scene for your texture work.

    There are a lot of assets in your project, and an error in the console, saying something went wrong with the shaders. Third-party assets could be the reason of the issue.
    Could you please reinstall Surforge into the fresh clean new project, to be sure there are no conflicts with third-party tools or project settings.
     
    Last edited: Oct 7, 2019
  39. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Hello, I have owned this for nearly 2 years now and am just getting around to using it. I had a question though, if I have some items that already have all their textures, how do I apply the textures and make it so that I can take the original and add some emissive texture to some specific parts of it instead of texturing just a blank model? Basically just replace some of the grooves in a weapon or shield with emission?
     
  40. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    Hello,

    Surforge is intended to create textures from scratch, rather than editing existing textures.
    This is due to the specifics of how Surforge works - all texture details are rendered meshes.

    But something can be done.
    You could enable "export masks - separate" option, and use exported masks of your details to combine details with your existing texture in your image editor.
    You could load existing ambient occlusion and normal map as a base layer for Surforge details.
    You could apply a material with your existing texture to Surforge working plane to use it as a reference image.
    You could try to just add your new exported emission texture to your existing material. As emission stored on its own separate texture, it should be not that hard to transfer emissive details between materials.
     
    MostHated likes this.
  41. ParadoxSolutions

    ParadoxSolutions

    Joined:
    Jul 27, 2015
    Posts:
    325
    @Sergeyv_3d Hello again,

    I have found that I needed to get UV islands in a project I am working on and knowing that Surforge does this I have been trying to use the static methods but to no avail. Could you explain how I can access each island in a mesh's UVs and get each edge so I can draw lines A -> B for visualization.

    I have tried using CreateUvIslands(mesh, BuildAllEdges(mesh)); but im getting stuck when iterating through the island's edges.

    In the Edge class what are the variables referring to when they say index, I would like to get the starting vertex in the edge and the ending vertex it connects to. I thought I could just look up vertexIndex[0] (A) and vertexIndex[1] (B) in the mesh's UV array and get the points in the island but this didn't seem to work. Is the vertexIndex in the Edge class referring to the triangle index or its points in the uv array?

    I want want to display just uv islands without interior triangles in a way I can use in Gizmos, LineRenderer or draw on a texture.

    Any help is appreciated since this would save me a lot of time over getting islands from scratch. :)

    edit: Do I need to create uvVectorPairs?
     
    Last edited: Oct 21, 2019
  42. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    Hello,

    When Unity imports model, there is no "uv island" data. Only the UVs of each vertex available, without the "border" of the island. There is no "mesh edges" data initially also.
    Surforge tries to create the islands from that Unity's UV data. You can find it in "PrepareUVs" method in SurforgeInterface.cs

    How it works: Find all edges of the mesh. Find which edges are border edges (share only one triangle). All UVs of island border belong to open edges. But not all open edges uvs are UV island border. This is because when imported in Unity, if the model has hard edges, that edges are open, as vertices of hard edge in Unity are unwelded. But not all hard edges of your model are also UV isand edges. So you need then to process through all your "UV island shards" to combine it into UV islands if they share edges.
    If you only need pairs thats all. If you need ordered shape, like Surforge need it for "double click fill" UV islands with Poly Lasso tool, you need to sort UV pairs to form a polygon.

    This method has some limitations. If your UV islands share edges, they will be combined. When creating ordered shape, not all sets of vertex pairs could be ordered, as for some data sets this task could be np-complete (if there are T-shaped cuts inside UV island border for example). Also holes inside UV islands are not processed yet.
    When working with Surforge this limitations not a big issue, as you could switch your UV display mode to "classic" to just draw all your UVs triangle by triangle.
     
  43. ParadoxSolutions

    ParadoxSolutions

    Joined:
    Jul 27, 2015
    Posts:
    325
    I was able to isolate the UV island code and call a modified version of prepareUVs and use that to get the order I wanted:

    Code (CSharp):
    1.              
    2. for (int n = 0; n < UVIslands.uvVectorPairs.Length; n++)
    3. {
    4.        Gizmos.DrawLine(UVIslands.uvVectorPairsBorder[n].a, UVIslands.uvVectorPairsBorder[n].b);
    5.  }
    Trying to use the raw edges didn't work, using uvVectorPairs gave me classic mode. I eventually found uvVectorPairsBorder worked for me. The holes in the UV islands might be an issue for me later on but at least I can visualize this now. Thanks.
     
  44. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    Great news! Two great news at once.

    Surforge is now on Black Friday Sale.
    If you do not own your copy of Surforge yet, do not miss this great opportunity. :)
    Get Surforge with 50% OFF

    Surforge 1.3.2 update is ready and live.
    The new feature of 1.3.2 is fast working and realistic set of 3d Moss prefabs for Add Detail tool, along with Add Detail tool performance improvements.

    Please check this sneak peek of new Moss feature.
    surforge132_moss.jpg
    surforge132_moss2.jpg
     
    Last edited: Nov 25, 2019
    rayBLAST-R, rrahim, castor76 and 3 others like this.
  45. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Wow... this is JUST when I needed it.. lol.. How did you read my mind. GET SURFORGE NOW!
     
  46. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    Does this work with the URP ?
     
  47. pantsdefender

    pantsdefender

    Joined:
    Oct 30, 2016
    Posts:
    5
    I don't believe it works with the Universal Render Pipeline yet. Unless there is something I need to do to update the materials? the automatic material update option in the unity menus doesn't seem to work for me (unity 2019.3.0b12 + surforge 1.3.2). Can't wait for this to work though. Keen to start my next project using URP.
     
  48. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    Surforge itself can't run in Universal Render Pipeline project.
    But, you could easily use result materials and maps in your URP project with Unity built-in material converter.

    Please install Surforge into separate "3d" template project in this case.
    Copy your result exported material and maps to URP project, select the material and in Unity press
    "Edit - Render Pipeline - Universal Render Pipeline - Upgrade Selected Materials to UniversalRP Materials"
    urp_convert.png
    This converts the material, setting all the textures in the right places.
     
    shikhrr and pantsdefender like this.
  49. lolaswift

    lolaswift

    Joined:
    Jan 10, 2019
    Posts:
    151
    @Sergeyv_3d Hi, I'm a absolute beginner. Can I use this asset to modify existing textures? I have lots of old models in my project and I want to replace the texture with 4k for example. Or just change the color,etc.
     

    Attached Files:

  50. Sergeyv_3d

    Sergeyv_3d

    Joined:
    Jan 27, 2017
    Posts:
    414
    Hello,

    Surforge is intended to create textures from scratch, rather than editing existing textures.
    This is due to the specifics of how Surforge works - all texture details are rendered meshes.

    You could load existing ambient occlusion and normal map as a base layer for Surforge details.
    This could be helpful if your models have "object-to-object" baked maps, and you want to add Surforge details on the top of it.

    However, the easiest approach, for which Surforge is designed, is to do everything from scratch.
    With UV island fill, UV snap, Add Detail tool, and ready to use materials, you could achieve a very productive workflow with little practice.