#Low Poly Little Penguin

1 messages · Page 1 of 1 (latest)

pulsar oriole
#

Hi all. My name is Joshua, I'm 35yo from Brisbane, Australia. I'm making this Unity 2022.3 URP project for the participants of my after-school tech club to collaborate on. I want to make working with Krita, Blender, Unity, Probuilder, Shader Graph (and maybe Bolt) as accessible as possible so I plan to record the many lessons I learn along the way. There's already been so many that I couldn't find outside of obscure, unsolved Unity forum posts.
I'm not sure how threads work within Discord but I'm willing to learn. I'm wondering where the best place for a game dev mega thread is, I know it's not reddit because you can't comment with videos and keep a post going. Is here the better bet? Thanks in advance for your feedback and props to the first person that picks the project's influence.

#

Another goal is to make a beautiful project that runs well on mobile hardware, so computing efficiency is always a focus. The project already features: vertex-painted-texture-blended shaders; tileable stylised water with crisp refraction, reflection, displacement and a whole lot of depth options fixed for orthographic projection; a cute Little Penguin (aka Fairy Penguin) with root-motion-based rigging; advanced, and performant foliage adapted from Minionsart's free compute shader on Patreon.

pulsar oriole
#

Here are some of my favourite tips from the last few weeks:

#

Shaders become much less performant the more texture look ups you do. My grass was a great learning experience because when it covers the screen its a lot of sampling! So if you want complex triplanar textures, you should use the position and a planar mask to sample only once per texture type.

#

The warping at the edges of the planar mask won't even be noticed on a blocky, low poly mesh. Unless of course a face is perfectly 45' on the Z.

#

Instead of doing this for your whole environment, write a cliff detection system early. I won't be sharing my C# here however but maybe when I figure out how to use the visual scripting tool that Unity bought.

#

Don't do this ^ unless you have to.

#

If using vertex colours to blend textures, give some starting colours in your 3d software.

#

Use this shape or similar on limb joints for skinned mesh.

#

Use 'Copy Rotation' constraints to simplify animation. Here the toes copy just the local X rotation of the driver.

#

When adjusting vertices in world space, remember to add adjustment to current world position before transforming to object position.

#

When using orthographic camera, depth is defined by near and far clipping planes. So here is the fix for scene depth and screen position.

#

Use colour to do things easily, but don't forget to check your colour and texture format options! URP formats are hard to read so it pays to double check. I wasted an hour because somehow I had changed a render texture from SNORM to UNORM accidently.

#

Save an Operator Presets file in Blender called "Unity Export".

#

Use the Blender Graph Editor when animating. Carefully consider if you should be animating in Global or Local space too! Hilarious stuff happens with IK rigs that just makes no sense sometimes.

#

Put your IKs/Drivers and Deformation bones on separate Bone Collections. I think they were formerly on a limited number of layers.

#

When using root motion on Generic rigs, set the root node in Rig import settings but set None on the Animations! Weird stuff happens otherwise. Again, just set the root node in the rig import settings.

#

Use different handle modes in Blender's Graph Editor to get animations looking the way you want. A foot shouldn't slow down just as it hits the floor the way an auto-curve would do it.

#

On that note ^ if you have appended your symettrical bone names properly, you can copy and paste a flipped keyframe for opposite limbs.

#

Bake Into Pose if you don't want root motion to apply to different axes or rotation per animation.

#

Thanks for reading so far, here's a feet pic.

pulsar oriole
#

The only difference to my performant triplanar shader is that there is a sidescale applied to the world position on the x and z planes so I can stretch the texture on faces that point that way. And of course we need a tiling and offset node to control offset independent of tiling.

pulsar oriole
#

Experimenting with a rigidbody controller, getting suprisingly happy with it. Solved wall sticking and stairs by using no friction/minimum capsule collider around the player with a small sphere collider at feet for friction on the ground.

sacred turtle
#

Looks great!

pulsar oriole
#

Thanks Alex B, I think that's the first bit of inspiration this app has got me

pulsar oriole
calm wagon
#

This

pulsar oriole
pulsar oriole
civic patrol
#

Thanks for sharing your progress and all of the tips. You've got a really cool style going. I like the newest waterfall best btw 👆

pulsar oriole
# pulsar oriole
poll_question_text

Which edge foam suits style of the rest of the scene?

victor_answer_votes

6

total_votes

9

victor_answer_id

2

victor_answer_text

Sharp/cartoony

#

I added a dithered-cutout effect for showing the player behind specific materials. Much better then wrestling with render orders to have a different material silhouette per player.

pulsar oriole
#

I got tired of Unity wind zones being complicated to setup and dependent on properties of unsupported relic shaders... So I made my own wind controller for my custom foliage. All foliage in scene uses the same branch and foliage material. Things like smoothness, noise, and colour are packed in the normal map and vertex colours on the individual mesh. Makes for a lot of performant variety so I'm trying HDRP.

pulsar oriole
#

I know we live in a time where we can be spoiled by current-gen console hardware but this is still effing amazing. The fact that I can bake complex, ultra-res, indirect lighting into a couple of megabytes of texture memory in a couple of seconds (or even automatically on scene load) blows my mind. This is how hardware like the Switch can look so good.

#

Basic floating setup. Bit of fine tuning required for the player interactions still.

pulsar oriole
hallow tinsel
#

This looks really neat!

pulsar oriole
#

If the platforms have more mass and float power they work great, can fine tune. If colliding with top of a platform, player will parent self to it to add its movement. Still some fiddling to do because I want player to take the idea of momentum from moving platforms so they can do things they wouldn't be able to do without.

pulsar oriole
#

Swimming and floating is gonna be a bit of work.

pulsar oriole
#

Had a big brain day working on player controller. Fixed at least most of any jittering while sliding by keeping the forward transform y component while rotating manually based on input. Moving and rotating a physics object will always have funny artifacts unless you only use forces but I'm getting happy with it. The player's upright movement ignores physics materials but sliding on the belly uses per-material friction and bounce. I even added some extra gravity while sliding down a slope. This means no-friction slopes go fast but any friction will fight the extra gravity. I also figured out how to cap the acceleration of something without clamping the velocity. Just get dot product of current velocity and take that away from the additional velocity. It feels so much better. This means that platforms and other physics objects can really knock the character around beyond the max speeds of their movement states.
Image

pulsar oriole
#

It almost cost my sanity, but I've minimised the refraction artifacts by re-writing at least half my water shader! This might be the best orthographic water refraction I've seen, very happy so far.

#

No more bright colours on the edges of the submersed object mesh.

pulsar oriole
green wasp
#

looks great only thing is that i'd make the rotation slower when it turns to feel more smooth

#

very good though

pulsar oriole
#

Are you talking about angular drag on the floater? Yes you could fine tune for a while but I'm on a feature kick right now.

#

Improved the heck out of the water. Adjusted normals, lower displacement near shore (that doesn't work on infinite water yet).

green wasp
#

I mean the actually penguins movement

#

if you walk forwards and then backwards it does a sharp 180 degree turn instantly

#

unless you've changed it in my opinion it takes away from the calm relaxed feel of the game a little

pulsar oriole
#

The player controller is halfway through a remake. It will have much less vertical drag and more dynamic friction based on collisions below player capsule

#

The turn speed is being reworked so it feels more responsive while still not looking too snappy

pulsar oriole
#

You forget copilot is there sometimes because it only chimes in after a pause or when it knows fs what u want, but it can be a bit scary.

pulsar oriole
mystic cargo
#

yooo I dont know bout programming but one thing sure keep working it loks fire

pulsar oriole
#

Working with Unity terrain I had to do a slightly-custom terrain pass in HLSL. First time really using script for shaders but I'm happy with it.

#

Unity terrain does funny things but its probably all in the name of efficiency. Like I had to flip the derived flat normals.

pulsar oriole
green wasp
pulsar oriole
#

Ha, its a top-view fixed cam. But the planar reflections will see skybox. Will swap for an effecient procedural skybox eventually. I bought enviro a long time ago so I'll look into that again.

#

Oh the grass looks good with their adjusted normals and masked smoothness when the light is at a low angle.

#

Terrain optimisations and player controller are going ok. Ripped my hair out for hours trying different slope handling methods when snap to ground turned out to fix so many things. Can tweak how steepness feels or limits movement by a snapping speed.

proper escarp
#

And thats why you should never give a penguin weapons

pulsar oriole
pulsar oriole
#

Here we see a particle system emitting for every pixel changed in the terrain detail map. Considering detail density, a per-pixel particle count can be calculated (or counted).

polar flume
#

Love the graphic theme you have. Its beautiful even though its basic

pulsar oriole
#

Thanks, that's what I'm going for. If I didn't mention previously, this is for the kids at my after-school tech club to collab on. They will learn to model low-poly assets and basic texturing.

#

Pretty happy with my grass but afraid it doesn't look low-poly enough. Easy to model though and doesn't even dent render time.

pulsar oriole
# pulsar oriole

What if grass slows your belly-slide and you've got to cut it to slide down a hill for timed puzzles...

pulsar oriole
#

Trying a simpler low-poly style, tweaked foliage wind, swapping main light between sun and moon for performant direct shadows day and night. Everything is just a colour curve. Even more potato-PC-friendly.

mortal raven
#

Hey man, I really appreciate the art style of your game. I'm trying to do something kind of related, would you be up for a quick interview? I'm very new to it all and would like some guidance on best practices and how to achieve some stuff, spent less than 4 hours doing a game but looks promising to me at least.
(I mean, it will also be paid of course, not expecting free tips)

ebon cedar
# pulsar oriole Experimenting with a rigidbody controller, getting suprisingly happy with it. So...

Love your little penguin guy. 🙂 Not sure if you've thought about it, but one way to have a character move exactly how you like is to have it hover above ground. That way it won't stick to small obstacles and runs nicely over low rocks etc. Here's a full video about it, worth checking out: https://www.youtube.com/watch?v=qdskE8PJy6Q

A detailed look at how we built our physics-based character controller in Unity for our game Very Very Valet - available for Nintendo Switch, PS5, and Steam
BUY NOW!! https://toyful.games/vvv-buy

~ More from Toyful Games ~

▶ Play video
ebon cedar
#

Your water shader looks awesome

pulsar oriole
pulsar oriole
pulsar oriole
#

After a lot of feedback from my group participants I have moved the art direction to look more 'Albion Online'. Here's Unity's boat-attack water setup with waves that adjust normals and foam for a smooth effect.

pulsar oriole
#

boat-attack has some great free water, but Crest is better. Also, made a solid start on swimming. Soon to be rising up and surfing down waves or even launching off them like a ramp.

pulsar oriole
#

This isn't parenting. This is two dynamic rigidbodies in different scenes. The player can move on the platform, respecting its new max movement speeds relative to platform movement.

#

This took a total of 7 hours to figure out over the weekend. There's a reason I can't find a youtube tutorial for rigidbody players on rigidbody platforms. The only thing to tidy up is player charater drag is still being applied, hence the slight movement/slidyness on the platform.

neat galleon
pulsar oriole
#

You get velocity from rigidbodies only afaik

fading yoke
#

Nice work, really like the art style

neat galleon
pulsar oriole
#

Yea 7Ska, a physics event is used to cache the rigidbody. I am then adding the difference in velocity and angular drag to the player. Turns out, freezing constraints and not using the rigidbody funcitons like moveposition and moverotation were to blame for some weirdness buuuut....

#

This is the best I can get with this method: observe what seems to be centrifical force slowly sliding the player off the platform DESPITE having no mass, and no friction. So its not inertia or the weirdness that comes from friction. Like the physics system just does some centripical force. There's not much I can do that doesn't introduce jittering, and creating fixed physics joints looks bad when the joint is connected. It will either seem to snap or wobble into place every time its connected.

tranquil wing
pulsar oriole
#

I solved the sliding of platforms: needed to use the velocity the platform will be next update, not the one it is already.

pulsar oriole
#

Trying out new art styles and i've redone the swimming controller so many times. Was strongly considering 2.5d but all the swim improvements I made looked great in isometric too.

#

The crest4 water gpu height sampler gets you the normal so you can surf down the waves. It feels so good.

placid ermine
#

that water physics with the lil penguin floating along looks absolutely superb! well done

late elk
#

Looks great, much more readable. I'd love to see some surfing

pulsar oriole
#

I'm so happy to have internal water render volume swapping setup. I love how the dynamic weather and lighting persists. I'm even ducking the weather sounds and adding reverb to interior areas for great effect. I'm not swapping the camera, just the culling masks btw.

pulsar oriole
#

I've cloned the project and taken out any code that's not my own so that it keen be kinda open-source for lab participants. Using new shadergraph features and samples like simple shading and custom terrains. I didn't want to have to write shader code for all the new URP features of terrains anyway so this suits. The simple height blend custom terrain mats recieve decals by default so here is a cute penguin footstep with AO and normals only.

pulsar oriole
#

Happy with my water shader and very happy with swimming. I am now applying water drag forces based on the depth. It feels more bouncy when diving in and out but it really gives the feeling of water when skimming about. Also when dropping heavy, large buoyant objects in.

pulsar oriole
#

Added a little world-based vertex noise to terrain and water, well stoked.

pulsar oriole
#

I had to redo normal shading for the shadergraph version of my terrain shader but I was struggling overriding the smoothed terrain mesh normals and TerrainLit doesn't seem to let me output vertex normals sooooo. You just need to calculate normals for worldspace. Not sure if its much more expensive this way but it sure is crisp.

#

and now we have seemingly-correct depth normals for things like SSAO

pulsar oriole
#

Added vertex flow for easy, performant rivers and falls using the same ocean material 🙂

pulsar oriole
pulsar oriole
#

Had to redo UVs for most of the effects on the water. Waterfall foam is back, but I can't remember how I got masked, planar UVs to squish properly on the Y axis only so that flow can look consistent. If anyone knows, please link me.

pulsar oriole
#

Because I'll be making shore waves with particles etc. I thought I'd share how to make directionless or 'open ocean' gerstner waves with only three calculations. Basically, balance them. The smallest/fastest wave seems to dicate the wind direction.

pulsar oriole
#

Water is not exactly 'low poly' but its fine for a top-down-only game where the angle and zoom will barely change. Using water tiles and camera occlusion or having the water follow the player will solve the problem of animating too many verts at once.

#

It would also be a lot more performant if i didn't have the +45' iso camera. That way I would only ever need max of four water tiles at a time.

#

I WISH I FOUND THIS TUTORIAL A YEAR AGO! https://ameye.dev/notes/stylized-water-shader/

pulsar oriole
#

Now that the code is mostly done, I can make particle textures that interact nicely. Red is height of ripples (normals and foam) and green is height of the vertex offset.

pulsar oriole
#

Its easy to setup, but i don't think it looks good, the vertex flow.

pulsar oriole
#

Did you know? You can use a mesh or even a mesh renderer to emit particles now. Which means you can edit the polyshape (Probuilder) in the scene and the emitter updates immediately. If you have particles spawn at the verts, align to direction, spherize direction and have a negative speed, you can get shore wave partices spawning all around an island shape. You may have to centre the probuilder polyshape's pivot. My polyshape was just traced around the island from above and put on the transparent fx layer so camera ignores it (culling).

pulsar oriole
#

Got water interactions offsetting pos and neg. Particle shader just needs to remap from 0>1 to -1>1. Render camera needs to disable postfx and Render texture needs 16bit SFLOAT (URP).

#

I have darkened the green (vertical offset) in front of each wave and in the middle of the penguin ripple particle so that water is pushed down there while waves are able to lift.

pulsar oriole
#

Does this low-poly water look ok? i think it could be too spikey

pulsar oriole
#

Making a perspective (non-orthographic) version of the water shader required almost a complete remake. Here it finaly is. It looks much better with a smooth edge and depth-based refraction strength. Notice the underwater scene is more refracted the deeper the object is.

pulsar oriole
#

Gosh. If it jitters, it should probably go in LateUpdate. Sigh, how could I forget.

pulsar oriole
#

I stayed up too late but I revisited more low-poly style chunky grass and i'm very happy with the result. Thought I'd add the same bouncy character from Tunic.

pulsar oriole
pulsar oriole
#

If you want to use vertex colours for something, and you want them to make sense (eg. 128 is half) you may need this shadergraph node:

#

'colourspace conversion'

pulsar oriole
#

The latest probuilder doesn't seem to use RGB (shadergraph wants this) but polybrush (1.2 deprecated) DOES.

#

Buuuuut Polybrush sometimes crashes in 6.3

#

I suspect probuilder might use the colour space set in project but cbf testing this.

#

nice to use the fill (face) mode with polybrush tho

pulsar oriole
pulsar oriole
#

I don't know how long I've been missing this PSA but you can add simple events to your imported read-only animation clips in the fbx object's animation import settings tab. I am spawning footstep decals with the Footstep function passing in an Xpos offset for each foot.

pulsar oriole
#

Now that I'm happy with buoyancy and the player controller, time to test how the most complex scenes might run. I figure no animator or script will be more complex than the player's.

pulsar oriole
pulsar oriole
#

Instead of a bunch of particles, I'm now using a single, expensive particle for the splash. It looks so much more retro/low poly. The particle shader just masks by vertical UV (one minus) by some gradient noise that scrolls on the XZ object space.

little hollow
#

i loved your start, but I wouldn't say the textures fit, in yor recent project

echo river
#

I love the Tunic reference bro, you're goated

pulsar oriole
#

@little hollow still very-much in-progress

#

I think sharper toon textures worked better.

pulsar oriole
#

PSA for animated models from Blender to Unity: If you don't like where your mesh origin is but you've already rigged and weighted, you just need to adjust your delta transform in Blender. When my penguin was laying upside down, it couldn't get a ground check because the origin was at its belly (up in the air). Instead of increasing the check distance and having other problems, I can just move the delta Z location down half his height when laying. Now he can stand up when landing on his back instead of flopping around like a flipped turtle.

pulsar oriole
#

I've been foolishly trying to make my rigidbody controller into a kinematic one because I'm tired of physics bugs and errors.

pulsar oriole
#

Shout-out to Kinematic Character Controller which might seem complicated, but is very simple and powerful when you embrace the system. Just put rotation and velocity calculations in the callbacks that belong to the Kinematic system and your Kinematic motor will handle everything. Well-worth learning and using over the default Unity character controller (which doesn't even handle slopes/stable grounding out the box). https://assetstore.unity.com/packages/tools/physics/kinematic-character-controller-99131?srsltid=AfmBOopiSyuz5WneBmmfTAatukHieFBS0Ss3mRkJcAoXqekcqtqflqyn

Get the Kinematic Character Controller package from Philippe St-Amand and speed up your game development process. Find this & other Physics options on the Unity Asset Store.

#

Most importantly, NO MORE PHYSICS BUGGINESS.

#

Seriously, every damn velocity addition and tweak was checking for NaNs/zero on my physics controller and they would still pop up. Mostly when swimming up onto the shore where velocities would become small gradually. I thought this penguin would be absolutely using a physics/rigidbody controller, but I really don't think a player controller should ever rely on the Unity physics system unless its a goofy game with some kind of scene reset switch in the gameplay.

#

More on the Kinematic Character Controller. Because it helps to calculate and set rot/vel just in the callback functions, all the Scene-Linked State Machine Behaviours (SLSMB) do now is adjust move properties at start. Could probably smooth the change in their update/transistion-to functions but I figure that's needless when you want the charcter to respond the way you expect the first frame you see an animation change.

pulsar oriole
#

Kinematic Character Controller feels so solid. I have most things working I think. Need to remember that, by default, the kinematic motor wants to snap to ground. So some states should Unground() the motor at start (like swimming). The sliding works by lowering the stepping height and the max stable slope. Swimming works like being arial but my floater component adds some velocity for buoyancy. Moving rigidbodies add to the player velocity and can be pushed by the player in-turn with simulated velocities. I don't know why I ever made a rigidbody controller when this exists.

pulsar oriole
pulsar oriole
pulsar oriole
pulsar oriole
#

I solved swimming at different heights (using gerstner waves for water height) by using a list of water volumes and getting the heighest volume the floater is overlapping.

pulsar oriole
#

Now I can swim up and down streams, not just the ocean height. Without needing GPU height sampling. All precomputed.