OH MY, YES!!!!
Andrea Interguglielmi
Creator of
Recent community posts
Hi all!
Version 0.8 is up on the Asset Store and it features new examples scenes, new shaders to do foliage and cell-shading, and a new way to customize performance to run Clayxels in game with limited impact.
The itch.io version feels mature enough to stay locked at V0.7 for the foreseeable future, the reason to lock this version is dictated by the time it takes for me to support and deploy on each platform, it's simply not sustainable for a single person with a main job, please understand.
This forum will also be closed soon, please head over to the the discord server where there's lots of nice folks already helping each other and sharing some cool ideas (and bugs ; ).
Thanks,
Andrea
Hi, I still can't find a way to replicate this issue but I'm keeping an eye on it.
I am going to close soon the itch.io support forum, please consider joining the discord server so that we can keep following this up.
Maybe other users are having the same issue and found a solution.
https://discord.gg/Uh3Yc43
Did it freeze without spline being set this time?
How do you unfreeze it when it happens?
It's unity 2019.4, right? which render pipeline are you using?
Negative and positive blends will only affect the clayObjects that come before in the hierarchy.
Example: the first clayObject will never effect any other solid, while the last clayObject in the hierarchy will affect all previous clayObjects.
Hi Ben,
You can now access it directly on the material:
yourClayContainer.material.SetFloat("_ClayxelSize", size);
This attribute was always just an interface to a material attribute, and because we now support custom materials this is no longer in the container : )
Same story for smoothness, emission and all that.
Hi! As I mentioned in the other thread, retopology is still very much a work in progress. It's fairly simple to use though, just check the option and run it.
You can bulk process meshes with clayxels and retopology by creating a script that runs in the editor.
As for the spline tool, so sorry we're still lacking tutorials on this new stuff, but it's again just a matter of enabling the spline option from a ClayObject inspector and then just moving and rotating the control objects.
You should see the control objects under the ClayObject in the hierarchy as soon as you change to spline.
Hi! sorry for the troubles, but the old normal smoothing code was not great so I removed it while I work on a better version.
Please use this handy script for now, it'll do just the same as before:
https://schemingdeveloper.com/2017/03/26/better-method-recalculate-normals-unity-part-2/
As for remeshing at runtime, it's not exposed for runtime use because it needs a human eye to check for errors, sometimes you get holes in the generated mesh and you need to run it again.
There is definitely more work to be done around meshing, it's a complex problem to solve, please bare with me while I keep working on it!
Hello Alex!
Mobile support: the thing that makes this tricky is the compute shader that sits at the core of clayxels. It's not mobile compatible yet and even if eventually it might get there, it will most likely be too slow for mobile chips.
Solution: you can work around this by baking the points generated by clayxels and simply using that as your model/anim format to display clayxels on mobile. It would be super lightweight.
If you don't feel like venturing into doing your own point-cache file format, I do plan on shipping one with clayxels eventually, I just can't give you a time frame yet.
Auto-retopo: It is a c++ library yes, it's not perfect yet and all it does is use similar systems like the one in blender to reduce the number of polygons and generate a nice topology. Using the provided retopology tool is totally optional, you can just export the FBX models and use any other retopology tool out there.
Hi! Thanks for trying out clayxels : )
Indeed once you freeze to mesh you are dealing with a plain standard unity mesh, so you can remove anything related to clayxels.
The material used to shade these meshes is just a standard unity material with vertex colors.
When you export your model as FBX that material will not be saved, (FBX doesn't know about unity shaders), but the FBX will store the vertex colors! This is very cool because it means you can visualize the same colors also in blender or maya without the need for a custom shader.
When you apply the clayxels-mesh shader to a model generated with clayxels, just remember to use the right shader for the render pipeline your are on: you have one for builtin, one for URP and one for HDRP.
If you still see pink I'll probably need some more info from your scene to understand why it doesn't show the vertex colors.
Thank you!
You can work directly with the list of solids held internally by clayxels and completely skip having gameObjects inside a container.
This was mostly done to control clayxels via particles, but I suppose you can update your solids via DOTS in separate threads too.
The api to call is ClayContainer.getSolids();
I will follow up on this with some examples.
For those that want to take their clayxeling a step further and mess with many more clayObjects, the Asset Store version is now up online:
https://assetstore.unity.com/packages/templates/systems/clayxels-165312
For anyone who has already donated here, I want to setup a private download with the same version as the one on the store, to thank you for the early support.
If you've donated, please reach me in private on the discord server and send me the email you used for your payment: https://discord.gg/Uh3Yc43
Clayxels has been a long year of painful/fun development, please consider purchasing from the Asset Store if you can, so that I can keep adding new stuff.
Here's the list of changes that you'll now find on the itch version too (still locked at 64 clayObjects):
v0.7
- added ClayObject Spline mode
- added ClayObject Offset mode
- HDRP and URP shaders are now customizable using Amplify Shader - added new solids: hexagon and prism
- auto retopology (asset store only, windows only)
- materials will now automatrically display their attributes in the inspector
- optimized: C# code and GPU-read bottlenecks for chunks
- optimized: built-in renderer shader
- clayxels can now work without GameObjects
v0.6
- bug fix: clayxels disappearing on certain editor events
- bug fix: mirrored objects disappearing
- bug fix: fail to parse attributes in claySDF.compute on certain localized windows systems
- bug fix: frozen mesh sometimes has missing triangles
Hi! Yes I noticed this bug and it's hopefully fixed in the upcoming version.
You could try this in your scene for now:
Make sure you run myClayContainer.init();
and then run myClayContainer.scanSolids();
Try and do that only one time, either from a Start method or when you spawn your ClayContainer object.
Calling those methods should make it safe to then call myClayContainer.generateMesh();
Hope this helps for now!
That was the fastest bug fix I ever (not) did : D
So, the idea is that only clayObjects within one container can interact with each other.
To do what you're after you could start with a simple version and a very big grid. You would need one negative clayObject following your hand, and then spawn/duplicate that same solid to escavate.
The advanced use would be to have many different containers, culled to be only active when visible in camera.
In this case, to make it look like the different containers interact one with another, you'd need one negative clayObject per container, each one following the hand. When digging, you'd spawn/duplicate that negative solid only in the clayContainers that are being currently interescted by the hand.
Hope it wasn't too confusing, feel free to ask if something is unclear still : )
Hi, normal smoothing is coming for sure.
Voxelizing meshes can be done by anyone willing to try with just a c# script, but it will be very slow to have all those triangles turned into SDF solids, so I don't plan on adding this feature myself for now.
The 3d texture sdf is interesting, what use case would you have for that? We don't have UVs so I don't think that's doable at the moment, but i'm curious : )
Hello Stephen, thanks for trying out clayxels!
Generating UVs interactively on a mesh that keeps changing shape is probably not going to be useful to many people, because you'd see your texture shifting and warping a lot. It's also rather heavy to compute at runtime.
I think you are already adopting the best solution available, which is to first sculpt, then freeze, then use another tool to finalize UVs and textures.
As for the smooth normals, yes they are coming.
The Asset Store version of clayxels has been submitted for approval, and there is an auto-retopology option that will come particularly in handy for your situation : )
This attract-repel looks interesting, do you have a visual example of what it does?
It looks like you could hack it inside claySDF.compute, look where it does the mirror at the beginning of the function. You can put these kinds of deformations in there.
The thing that is harder to do is stuff like domain repetition and custom blend operators. I need to expose more of the internal guts to do that, but due to some of the optimizations it might result pretty confusing to look at.
Hi, the answer is definitely a big yes, you can do plain standard unity physics with clayxels running on top.
Have a look at this:
https://twitter.com/phi6/status/1252344815502503937?ref_src=twsrc%5Etfw
The jitter you're seeing is down to the physics solver in unity, you can definitely remove it but I'm no unity-physics user, so I have no clue about the parameters. But you can think about physics as something completely uninfluenced by clayxels, google will show you plenty of resources on the matter.
The grid bounds is definitely the tricky part when it comes to objects bouncing around in clayxels.
You have plenty of solutions but they all require some planning, you can calculate the median point of all your rigid bodies and move the grid accordingly.
You can also extend the grid size from the container, and you can even create containers at runtime.
Hi, thanks for the report! I can't replicate this issue on my end, we'll need to do a bit of investigating on your side:
- are you on unity 2019?
- did you modify anything inside the files userClay.computer or claySDF.computer?
Reinstalling the package on the latest unity 2019 might be a good thing to try.
Just bare in mind a tight resolution with a big grid scaled on all axes will ask for much more compute power.
The best way to optimize clayxels is to use grids with size 1,1,1 and try and fit your assets in there when possible.
Using many containers is also a good idea, performance greatly benefits from that and you also have a clear separation between objects.
Hope this helps and it's not too confusing to start with it : )
Hi, the resolution here is the same you can achieve in your own scene : )
The dots are very noticeable if you zoom close to your objects, no way around that.
Thanks for the bugs report, when clayxels disappear just hit reload all in any of your containers.
I will soon write a tutorial for custom materials, they already work, but it involves writing them by code or using the Amplify shader editor.
got it, just to expand on the twitter thread a little here.
Clayxels has two stages:
Stage 1, when you move a clayObject (or when you load a scene), the compute shader kicks in and does a lot of work.
Stage2, the compute shader is done and we have a point cloud that can be transformed around by moving the ClayContainer.
At this point, it's a vertex shader reading the point cloud and expanding it into triangles that are shaded just like any other mesh.
The built-in render pipeline was doing some unnecessary extra work on the shading side of things, so expect almost a 2x bump on the built-in render pipe at the next update.
Another thing that is not in place yet is instances, of course that will make any instanced object super light.