Orthographic rendering should be pretty simple, you just plot a point (or many points) and just get rid of the Z value.
How do I make 3D that renders efficiently? Like, least-amount-of-lag efficient? Also, is it possible to make it render at 60fps every frame?
That’s some suuuuper complicated maths, I have no clue how that works. And I don’t think any polygon 3D things will hit 60fps from a first person view, it’s just too many objects running so many calculations.
Well, if THT release the deobfuscated HS code at any point, we can gain some insight into what makes HS tick and how to optimize our code in the right way to make it smooth 60fps.
It really depends on how many objects you have, like this pyramid looking thing (see link below) runs quite smoothly.
Good idea, why don’t you ask?
Perhaps it’ll make the code of blocks, like for example In string, replace something with something, when it is added, easier to understand, since “e” is not a very good name for parameters.
Annnnnd no new messages
Anything I can answer?
nope, apparently not
Could someone assist me in filling in my cube 3d rendering? Thanks
I can probably help you with that. The general idea is to stretch a triangle over 3 points of your cube using width, height, and rotation. You already have the points, so all that’s left is to stretch a triangle over them.
*there might be an easier way and I’m just doing everything the hard way
Here’s how I did it:
Step 1: Calculate the sides of the triangle
Step 2: Calculate the height of the triangle using Heron’s formula
Step 3: Find the longest side of the triangle
Step 4: Figure out whether or not the height is positive or negative
Step 5: Figure out wether or not the width is positive or negative
Step 6: Here’s the tricky part, using your knowledge of the longest side, you need to rearrange the point the calculations are based off of. So, you essentially have 2 sets of points. One of them, is the original, and the second set is the original, but the points are scrambled a bit depending on which side is longest. For example, if side 3 is longest, the points stay the same. If side 2 is longest, the first point of the triangle will connect to the second point, the second point of the triangle will connect to the first point, and the third point stays the same. (side note: the only calculations based off of the original points are the longest side ones)
Step 7: Pretty simple, calculate the angle of the triangle using arctan.
why can’t you just use a square for a cube?
if you look at https://c.gethopscotch.com/p/117uaqvued
you can see that the sides of the rectangle bend all over the place
I found a simpler way using triangles. I just published v2.1 (https://c.gethopscotch.com/p/118cautgry) and the only problem now is it doesn’t rotate 360°. If you (or anyone) knows a fix this issue, that would be great
That’s pretty good! (might want to fix the clone index).
Thanks! What do you mean?
Oops, I meant Z index, the sides are stacking a bit oddly. Like how you can always see the white side.
Yeah, that’s what the problem is right now. Any idea on how to fix that?
You can probably use the last touch X and last touch Y to figure it out? I’m not too sure