Home Creators Posts Import Register Favorites Logout

Content

Hellooo here we are again. It's been a learning filled week. I've followed about half of the first episode of a shader course that teaches the basics of shaders (for unity, but most skills translate pretty well). (go check it out if you feel like learning shaders: https://youtu.be/kfM-yu0iQBk?si=55VwNnq5_8pHxQmu )

I've been slooowly building up the shader code, trying to figure out how the hell to translate these damn sprites into stitches.

First step! Pretty easy: show the big background grid all over the mesh that the player will see. These textures are temporary of course, We'll probably make them higher resolution later, with normalmaps to give them depth etc... (but I don't know how to do that yet)

Then I spent a while figuring out how to get the viewport (= the node that shows the 2d point of view of our image) to show up on the main grid. That went pretty well. Here's where the trouble starts.

Here's crosses, as you can see there's a couple missing here and there, and it looks sort of strange. Here's also where the trouble started. I need to map the various greyscale values (last week they were colors, on another layer of the image), to the various stitches. And I do not know HOW. That's the bit I've been trying to figure out since friday.

When going into the weekend, the grid looked like this. Some might say it feels like a step back. But it's a learning curve, and I'm making sloooow progress. It felt like a step backwards, so after a bunch of explorations, I went back to the friday evening version.

I decided to split the shader in 2 parts, so that I don't have to calculate weird layer interaction stuff, and I can now color the background grid independently to the stitches.

In the above image, the game is still rendering the texture that contains all 8 variations of stitches at once, but the goal is to have it update dynamically to show the correct stitch in the correct spot. Right now I can show the greyscale values, OR the colors, but not both yet. I have NO idea how to do that (yet) (if you have suggestions, or know more shader code, please tell me!)

The goal is to have a functioning shader by the time I start my internship on june 1st, because I'll have to stop working on the game for a bit because I'll spend 45mins on a bike 2 times a day and that will cut into my smoldreamers time quite significantly.

If I cannot figure it out by the end of the week, I'll ask for help on reddit, they usually are pretty nice and helpful in the godot subreddit.

That's it for this week! See you soon!

Files

Comments

No comments found for this post.