Fang Talks


That’s not supposed to be a Ghost in the Shell reference.

I think my computer is turning against me. Or more specific, my code is. I spent most of the day fucking around with procedural world generation (you know Minecraft-esque world stuff). I quickly got bored of the blocks and cellular automata though (and couldn’t get its 3D variant to work very well), so decided to move onto something a bit more interesting. Instead of the lego-style cube-based world, I’d generate a mesh on the fly, apply a semi-random heightmap to it, and have a vast explicably landscape.

So that’s cool and all, so I started on the basics. Generating a mesh with a specified X and Z. I’d just have to generate X*Z squares. But hey, can’t have squares, everything’s got to be triangles. And so I worked on that. Took me a while to figure out all the logic needed to put all the points in place and reference them correctly, but I figured it out in the end.

What I still haven’t figured out though, is why it doesn’t save the coordinates of the vertices. When I what a vertex’s position is literally right after I set its position, it always returns the default zero value. This has been bugging me for the larger part of the night now, especially since it seems to run fine with someone else. I’ve turned to the Unity Answers community for help, let’s hope I have an answer by tomorrow.

God I need to go to bed…
~ Fang

Update: Holy shit I solved it. Never have I been more happy to see the “missing texture” eyesore-pink on my screen. Staying up a little longer pays off, after all!

Post a comment

Your email will stay hidden, required field are marked with a *.

Experimental anti-spam. You only have to do this once. (Hint: it's "Fang")