Sculpting Chat

which dev channel would that be
19 Replies
andybak
andybak4y ago
Not sure if really fits in any of them. Let's do a thread instead! Need to remember to use threads more often...
MrSpeedy
MrSpeedyOP4y ago
Didn't even know discord had this. But yeah I don't exactly have everything figured out yet but I have spoken to some experts on the topic that created their own unity plugin for sculpting. Rn what I'm doing is a simple ray cast and doing some math to detect closest vertex on the triangle that was hit then I can do some manipulation on that vertex bring it up or down now I'm working on a sphere cast to be able to detect multiple vertices within the sphere cast but the limitation of unity is that on a single thread it will start to lag down a bit past 8000 verts so I will have to write my own multithreaded process to be able handle more than 8k
andybak
andybak4y ago
How about a compute shader? Or an octree or similar? (especially something Burst compiled)
MrSpeedy
MrSpeedyOP4y ago
A compute shader could definetly work I'm not very familiar with shaders. But I would have to consider performance as the GPU still has to render the mesh on screen. Currently I'm storing the verts in an array just how u get it back from accessing a mesh in unity. But it has no structure there is no way to see adjacent verts or anything cause it's a 1D array. Something like an octree could help or a linked list of verts connected to eachother type of thing I have sculpting working on a single vert bases rn in unity so I get a highlight of the vertice I'm on and I can press mouse button to raise it or lower it The sphere cast will allow me to do it on multiple vertices and I'm storing the original mesh and the manipulated mesh Storing a mesh per move or manipulation would be useful to be able to ctrl z back on a move you made
MrSpeedy
MrSpeedyOP4y ago
took me a day to get something like this going
MrSpeedy
MrSpeedyOP4y ago
works on all types of mesh not just a plane as long as it has a mesh collider tried it on spheres cylinders and most probuilder meshes that you can make I think Pro builder will be a crucial part of it as I can use those functions to create new meshes and shape and subdivide them and so on
andybak
andybak4y ago
I've done a bunch of stuff with procedural generation. I used a Halfedge representation: https://en.wikipedia.org/wiki/Doubly_connected_edge_list
Doubly connected edge list
The doubly connected edge list (DCEL), also known as half-edge data structure, is a data structure to represent an embedding of a planar graph in the plane, and polytopes in 3D. This data structure provides efficient manipulation of the topological information associated with the objects in question (vertices, edges, faces). It is used in many a...
andybak
andybak4y ago
You can see the code here: https://github.com/IxxyXR/polyhydra-upm
GitHub
GitHub - IxxyXR/polyhydra-upm: Creative geometry for Unity
Creative geometry for Unity. Contribute to IxxyXR/polyhydra-upm development by creating an account on GitHub.
MrSpeedy
MrSpeedyOP4y ago
Wow! thats some really cool results you got from this Ive done loads on proc gen landscapes, But speaking to someone who developed their own sculpting app they told me sculpting in real time is just a massive beast to handle I talked to Matej
MrSpeedy
MrSpeedyOP4y ago
Sculpting Pro | Modeling | Unity Asset Store
Get the Sculpting Pro package from Matej Vanco and speed up your game development process. Find this & other Modeling options on the Unity Asset Store.
MrSpeedy
MrSpeedyOP4y ago
He made this asset for unity
andybak
andybak4y ago
i think low poly and organic modelling are completely different problems. you should tackle them one at a time (although subdiv allow you to model as low poly and get organic forms at the end of it)
MrSpeedy
MrSpeedyOP4y ago
Yeah I should probably focus on the low poly first. Once I get the radius effect on my sculpting brush working the next problem I need to tackle is that I believe unity can have multiple vertices for the same point. And when manipulating say the seam of a mesh like the edge of a cube it will tear the mesh apart and I need to find a way to fix this
andybak
andybak4y ago
Look what I just found while looking for something else: https://github.com/davidezhang/Meshly (EDIT - i realised I already tried this. It's pretty basic)
the next problem I need to tackle is that I believe unity can have multiple vertices for the same point.
This is where you probably want a different internal representation than the mesh itself. One that knows about connectivity separately from vertices. You can fudge it with normals but it's better to use a data structure where this stuff comes naturally The Probuilder API is a bit funky or else I'd just use that. There's a bunch of nice libraries on Github.
andybak
andybak4y ago
GitHub
GitHub - gradientspace/geometry3Sharp: C# library for 2D/3D geometr...
C# library for 2D/3D geometric computation, mesh algorithms, and so on. Boost license. - GitHub - gradientspace/geometry3Sharp: C# library for 2D/3D geometric computation, mesh algorithms, and so o...
andybak
andybak4y ago
GitHub
GitHub - meshmash/Plankton: A C# half-edge mesh data structure, and...
A C# half-edge mesh data structure, and components for using this in Grasshopper/Rhino - GitHub - meshmash/Plankton: A C# half-edge mesh data structure, and components for using this in Grasshopper...
MrSpeedy
MrSpeedyOP4y ago
Yeah I need to check this out how it works cause I have realised the probuilder API does things weirdly and its so finniky
andybak
andybak4y ago
the stuff i used was based on an earlier version of plankton. It's fast enough for most things. I used it for this: https://docs.openbrush.app/alternate-and-experimental-builds/experimental-builds/polyhedra-and-symmetry
MrSpeedy
MrSpeedyOP4y ago
Thats really cool! I've also found a sculpting library on github but the link is on my main machine.
Want results from more Discord servers?
Add your server