Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Textured quad drawing
- DoomesPro93
-
14 posts
Textured quad drawing
I want to draw textured quads with four 2D coordinates. I am very confused about this and can't provide you with much details, and my idea is to draw from a list.
The list starts with the width and height, followed by a list of color values, with one color value for each pixel.
I at least need to know how positioning of each pixel would work (e.g math formulas), as that is the thing that I am the most confused about.
Note that my idea is that each pixel is a quad itself, not a point.
The list starts with the width and height, followed by a list of color values, with one color value for each pixel.
I at least need to know how positioning of each pixel would work (e.g math formulas), as that is the thing that I am the most confused about.
Note that my idea is that each pixel is a quad itself, not a point.
- DoomesPro93
-
14 posts
Textured quad drawing
I wanted to use the other texture drawers, but found out that they were either triangle-based or had pixels drawn as points.
- WeirdBoi12408
-
52 posts
Textured quad drawing
How to do it:
Convert your .png or .svg bitmap into a .tiff file, download the HxD hex editor, copy the hexadecimal on the left side, then use the tiff file that I have in order to modify it. after that, you have to use a bunch of math to calculate the rotation and position of 3 points, and then after that, you implement it into the .tiff reader. You will also need to decrease the resolution as it takes forever to draw. After that, you need to actually made a code for it with the width and height inside so it knows how wide it is. You also need to create a compressor that shortens the length of the hexadecimal, preferably by removing the FF hexadecimal every 4 numbers, and then converting the existing numbers into ASCII. After that, you need to add a warning to use turbo mode because it's going to take f o r e v e r to render unless it's in java.
Convert your .png or .svg bitmap into a .tiff file, download the HxD hex editor, copy the hexadecimal on the left side, then use the tiff file that I have in order to modify it. after that, you have to use a bunch of math to calculate the rotation and position of 3 points, and then after that, you implement it into the .tiff reader. You will also need to decrease the resolution as it takes forever to draw. After that, you need to actually made a code for it with the width and height inside so it knows how wide it is. You also need to create a compressor that shortens the length of the hexadecimal, preferably by removing the FF hexadecimal every 4 numbers, and then converting the existing numbers into ASCII. After that, you need to add a warning to use turbo mode because it's going to take f o r e v e r to render unless it's in java.
- WeirdBoi12408
-
52 posts
Textured quad drawing
And then after that,
Create a list containing all of the savecodes and modify the tiff reader so that it runs without screen refresh. You will also need to create a custom block containing all of the savecodes for the images. You also can go on stackoverflow if it helps you. Hexadecimal isn't that complicated, but you don't want to know how it works because it's weird and base 16. Remember that modifying the .tiff file reader may make it slow, so make sure that it works by decreasing the warping effect. Also, make sure you don't have too much of it, like if you are making textured walls for a 3d engine, it's not going to be fast. at all. (unless you have a supercomputer)
Create a list containing all of the savecodes and modify the tiff reader so that it runs without screen refresh. You will also need to create a custom block containing all of the savecodes for the images. You also can go on stackoverflow if it helps you. Hexadecimal isn't that complicated, but you don't want to know how it works because it's weird and base 16. Remember that modifying the .tiff file reader may make it slow, so make sure that it works by decreasing the warping effect. Also, make sure you don't have too much of it, like if you are making textured walls for a 3d engine, it's not going to be fast. at all. (unless you have a supercomputer)
- Discussion Forums
- » Help with Scripts
-
» Textured quad drawing