top of page
Search

[43] L'lasons de Aether ver Beinags #25

  • Writer: Conlan Walker
    Conlan Walker
  • Jul 29, 2022
  • 2 min read

Textures. They're important. I'm bad at them right now.

I had a power outage on Tuesday, and I was sad that I couldn't do anything of substance that day, and I was busy/falling behind on a few things on Wednesday, so I was angry that I couldn't do anything of substance. On Thursday, I had a very hard time grasping the concepts and procedures of UV mapping in blender, so I'm disappointed I couldn't get much done this week period. I don't remember what happened on Monday.


There was an attempt, however.

First, I took this image of marble so I could use it for the mirror:

ree

Then I tried mapping it:

ree

The texture is just barely there, but if I told you there wasn't one, you might've believed me.


It took 4 hours to get to this point alone, and by then I still had yet to even start writing this.

I won't be able to get to sleep tonight unless I am satisfied by the raw length of this post, so I'll show work not directly related to the main work.

On Tuesday, there was a period between the power coming back on and the internet coming back on, so in the meantime I made something in modded Minecraft.


There's this mod called Computercraft, in which you can make and program computers in-game. There's also a mod called Computronics, which is an addon to it, which adds devices and accessories. There's a device (real terminology is "peripheral") called "camera", which doesn't strictly take pictures, rather, it can just shoot a ray in a direction, giving you the distance from the camera to the first block the ray hit. That's it.

I wanted to make a sort of picture out of this, by firing a bunch of rays to make a row of grayscale pixels, and a bunch of pixel rows to make a full image.

First, I set up this turtle, which is basically just a robot.

ree

It took a long while, but I was able to make something that creates ".bmp"s, as well as taking the image. I could've used a normal computer for this, but unfortunately using the camera as a placed block rather than a turtle attachment caps the camera to one pixel per tick, which is 20 pixels per second. This is unacceptable. After jumping though a few hoops, I made this:

The best way to describe how this works is by comparing it to a DSLR camera. Specifically, its photosensor array.

ree

The grayscale denotes things the ray actually hit, which the blue denotes rays that went out of range.

ree

A 512x512 image rendered in 3.35 seconds.

If I invert the signal, instead of a fade to white as the ray hits farther and farther away, it fades to black (=255-value is the inverted signal one):

ree

I'm putting this last, because nobody pays attention to code, let alone bothers to read it, but this is what the entire program consists of. The .bmp exporter and the rest are 84 lines in total

(this is Lua, btw):

ree

And that's it. I'm not all that proud at the lack of work, but at least I can sleep comfortably now.

 
 
 

Comments


bottom of page