Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

Andrea Interguglielmi

A member registered Sep 07, 2016 · View creator page →

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 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 ; ).


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 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.

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! thanks for reporting the bug, if I understand corectly, you add a clay object, you set it to spline and then if you select an other clay object the inspector is stuck?
I can't seem to reproduce this on my end, are these steps I mentioned how you replicate the issue? 

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:

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:

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:

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):
- 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

- 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, you're not doing anything wrong, the compute shader's performance goes down non-linearly.
I will continue to investigate this, in the hope that is something I can improve on, but right now it doesn't look like it : /

Hi, at this point I have no pending bugs related to picking, but I never tried scaling the UI! will give this a shot and check if it causes troubles.

This might not be enough, but have your tried rotating the container to obtain a mirror on the Y axis? 

Hi, sorry it didn't help : /
Yes a new itch version will be released along with the asset store version.

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, it's definitely not a GPU issue, which render pipeline are you using?
If you are on built-in you might have more luck switching to URP. I will look into this, I think it's just a matter of setting up the shader to be stereo-compatible.

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 : )

(1 edit)

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 : )

Hi, sadly no, WebGL does not support compute shaders.

This is so cool  8 )
I think it can be added to claySDF or userClay.compute as if this was a new type of solid.
The actual transform of the clayObject would act as the anchor point and would be used to pull or rotate.  

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, thanks for reporting this, for some reason the shader fails to draw from inside the prefab. 
I'll keep on investigating this.

Hi! Just to add on the update, there is actually a way to forcefully trigger an update, it might come in handy if you move both clayObjects and clayContainer at the same time. To force the update just do this: yourClayContainer.forceUpdate = true;
Needs to be set for every frame.

Hi, at the moment it doesn't run and I haven't investigated why, technically it should be possible. But, considering how demanding this kind of technology is, I doubt we can expect usable performance on the mobile devices of current generation.

Hi! your hack is the only way to do it I'm afraid, carving without color would end up slowing the whole thing down (voxels are a pain and a blessing!).
This is a lovely burger btw : D

Hi, I won't be able to support mobile and consoles for now, but it's interesting if you really only get an error on the shader and not on the compute shader.
On a side note, if you are building an HDRP project for mobile, you might want to switch to URP first.

So far we haven't got much luck on integrated chips, I doubt clayxels will run on anything lower spec than at least a nintendo switch.

You'd have to code this yourself, just pin the objects in space and move the parent container from c# : )

It's something I'm considering, I will need to check if 2018 doesn't put any hard stop on what clayxels needs. 
My hope is that it will be just a minor change, in which case it will be supported fully from the next release.

(1 edit)

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:

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 or

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.

Hi, indeed it's best to not rely on meshes stored in scene.
Have you tried exporting to fbx yet? I should probably expose that as a button on the container.

Hi yes, it's supposed to be fully URP compatible, is it showing any error?

interesting, was it a rather big container with coarse resolution (big dots) and lots of solids all in one place?
Clayxels does indeed have a hidden limit of 128 solids per voxel, but the global list can be as big as you have video memory.