Recreating t3ssel8r's 3D pixel art

I recently stumbled across t3ssel8r’s 3D pixel art, and I’m obsessed!

I would love to try to recreate effect used on the grass and trees in Unity. I found that they shared a high level overview (Creating a Pixel Art Scene in Realtime 3D - Album on Imgur), but I’m getting tripped up on a couple things.

I know the particles need to be on the GPU, so I started with the built-in VFX graph system with URP. It was easy enough to get flipbook sprites spawning on a mesh using the experimental sample mesh nodes, but from there I hit a couple blocks:

  • Each grass sprite is colored with the same toon coloring as the terrain it sits on. How can I achieve this?
  • The sample mesh nodes weigh each triangle evenly, regardless of area. Is there a way to bias it so that particles spawn more uniformly?
  • Less important, but how do you think the sprites don’t occlude with the geometry of the mesh on which they’re spawned? Are they just offset by the normal at the point they’re on? Is that also achievable?

Curious if this is something I can pull off without writing a custom shader.

Thanks!

1 Like

Morning sir, while I won’t have the time to help you achieve the level of polish showed in t3ssel8r’s 3D pixel art, I’ll try to help you with your questions.

  • So, usually, to spawn particles on a Mesh with VFX Graph, you can use either a Set position (Mesh) block or a Sample Mesh Operator. In your case, I would suggest using the Sample Mesh operator. This allows you to get more information out of the sampled Mesh like the Uvs, Vertex Colors, Normals etc…
    So the question is how Terrain’s colored are being stored ? Is it thanks to textures, are the colors baked in Vertex colors ? Based on this, the sample Mesh operator allows you to get the UV’s of the terrain to samples the same color texture, or to get the Vertex Colors or other information needed.

An alternative to this node is to use a Point Cache.

  • To answer this question, I will invite you to take a look at this recent thread where I’ve been covering this notion of Uniform distribution when sampling a Mesh.

Also thinking about grass and particle distribution, I would propose that you take a look at this talk by graphic programmer Eric Wohllaib. While it’s technical and maybe isn’t totally relevant to what you are trying to achieve, you should find some nice information about grass, distribution, clumping or how to make the grass distribution visually interesting and natural/organic.

  • Regarding this, If I understand, you’re afraid that some grass might be long enough so that we can see them penetrating the Mesh ? I guess it can be an issue with Object that are very low, close to the terrain.
    If so, one solution would be to create a “Spawn Map”. A texture, or data (can be bake in one of the channel of vertex color) that will hold the “object” traces from a top-down view. This would allow you to prevent spawning particles under those Objects. This would also mean less particles spawn and better performances overall.9288538--1301932--houdini_36pBhMcp34.gif
  • A simple example prototype with a “Spawn Map” bake in a DCC to prevent grass to spawn in the Dark Area (Areas covered/intersect by objects)*

But, this might not be needed and depend on the height of your grass and your objects. Here’s I’ve made a very fast prototype with VFX Graph, but the issue isn’t that obvious.
9288538--1301977--Unity_vqupk8AGeO_0000-0037_1000x558.gif

Hope this post help, and don’t hesitate to post your results or new questions. Always happy to see what people are doing with VFX Graph. Have a great day.

9 Likes

Wow, thank you for the response! Was not expecting such a thorough answer :slight_smile: I’m excited to put your recommendations into action.

1 Like

Nice result! Did you use single quad facing the camera or crossed quads facing up?

Thanks. In this case,as I was assuming an Orthographic Camera with rotation only around the Up-Axis, I’ve just used single quads with the Orient Block set to Fixed Axis. This way, particles aligns with the World-Up axis while their front face is still following the Camera.

2 Likes

Did you get it to work?

Hello! after a long hiatus I decided it would be fun to revisit this.

Despite @OrsonFavrel’s wonderfully detailed explanation, I could still use some hand holding to achieve the effect depicted in their response.

I think the fundamental gap in my understanding is how to make particles emitted from a region match the color at the point on the mesh from which they are emitted.

I know how to make a toon shader, I know how to emit particles from a mesh, but I don’t know how to marry the two.

Sketch if what I’m saying is unclear:

Maybe I’m thinking about this in the wrong way and there’s a better approach?

Open to using any pipeline/tech stack.

Found this resource who has an implementation available on their patreon! https://www.youtube.com/watch?v=t9aHfFBxCqA

I subscribed to the patreon a while ago he did not provide the project files. Im not sure about now tho