Sure, you could edit the “Main Color” in Surforge0.shader - Surforge7.shader in “Surforge/GPURender” folder.
I want to add some variant files to the Add Detail Tool for easy right-click usage. However, I didn’t fully understand the description here. What exactly is the “corresponding list” mentioned? Also, when it refers to “variants,” does that mean Unity prefab variants? I’ve tried creating a Unity prefab variant and adding it to the placeMeshes list (which is the placeMeshes prefab), but the variant created a new detail on its own, and the right-click switching doesn’t work.
By the way, how do I restart Surforge? Do I have to restart Unity?
Open “Surforge\Editor\Interface\PlaceMeshEditor.cs” and comment everything in it, to reveal all fields of Place Mesh assets in Unity Inspector.
Check one of assets with variants, for example “cracks01” in "Surforge\AddDetailTool\PlaceMeshes", you could see ShuffleArray field and other settings. You could duplicate one of existing assets, rename, drag and drop desired prefabs to its ShuffleArray field in UnityInspector.
Drag and drop your new custom prefab to the end of PlaceMeshes list of “placeMeshes” asset in "Surforge\AddDetailTool", save project and restart Unity to restart Surforge and save all changes.
Please dont forget to revert lines of “PlaceMeshEditor.cs” back, as in some Unity versions there were issues (Unity side) connected to displaying all that fields in Inspector.
I tried it, and it works with the switching effect, but I have a few more questions:
- The switching seems to be one-way instead of cyclic, which feels a bit inconvenient.
- If I add a new Place Mesh (let’s call it cracks01_1) to the ShuffleArray inside cracks01, do I also need to add cracks01_1 to the outer
placeMeshes
list? (I tried it, and even without adding it, the switching effect still works. Personally, I feel it’s reasonable not to add it here, so that the new variant doesn’t have to be forced to show up in the detail interface, making it look more unified.)
The idea behind right click shuffle is to use for nature looking assets, like for example cracks, where you don’t want to find certain detail, just want variety. For selecting certain prefabs, it is better to add it to the list with icons in the usual way.
You dont need to link each asset with another, only list of first asset (which you select with icon) matters.
That’s fantastic! Thank you so much. By the way, if I want to modify the right-click shuffle functionality to enable cycling through the options instead of stopping at the last one, which part of the code should I adjust?
I manually adjusted the code, and it works now
I would like to ask a question related to Surforge detail resource creation. In the Surforge resources, I saw that the topology structure of a certain model looks like this.
I’m a bit curious and would like to know if this mesh was automatically generated from an image using some tool. If so, could you share what tool was used? Thank you very much.
All Surforge assets modeled by hand. This gives the best control over the outcome.
In this particular model, parts of polygon rings edited over reference image, using combination of normal symmetry and radial symmetry.