CoderHusk
(CoderHusk)
July 24, 2021, 10:59pm
#1
I am not sure if this is a Roblox bug or not. It seems that if you create frame guis that are the size of a pixel some tend to be missing.
on the left is the Roblox version and on the right is the c++ version (.tga img glfw opengl ndc texture for viewer)
these are the exact obj model, the code is pretty much the same for both of them except one is written in Lua and one is written in c++ but they all follow the same pseudo code if you will. this could probably be an error on my end, maybe floating point errors (c++ one is based on an all int based model) but I am using math.round() to combat that and my bresenham one (this isn’t scanline) shows some of these artifacts too
1 Like
7yoz
(7yoz)
July 24, 2021, 11:05pm
#2
Roblox Studio tend to press pixels together because of the Explorer and ToolBox, maybe try closing them
CoderHusk
(CoderHusk)
July 24, 2021, 11:06pm
#3
I tested it in game and it showed the same thing. To add on, i scaled it up and it showed the same behaviour
7yoz
(7yoz)
July 24, 2021, 11:07pm
#4
Last thing I could imagine was your script skipping pixels because of errors, but highly doubt it
Jaycbee05
(Jaycbee)
July 24, 2021, 11:08pm
#5
I’m unsure if this is related, but when I was trying to triangulate with GUI a while ago, there were also some noticeable artifacts:
Hello Everyone, so i ran into a bit of a problem, after making a “simple” script to Triangulate a polygon using Delaunay Triangulation and using the method EgoMoose graciously provided to make a 2D triangle Here , The polygon generated sometimes would have some weird artifacts:
[rbxl - Roblox Studio 1_3_2020 2_22_24 PM (2)]
See Those lines showing, where the border of the triangles are, those are the artifacts i am talking about and i don’t want them to happen. The triangles shouldn’t have…
Again though, it might not be related.
CoderHusk
(CoderHusk)
July 24, 2021, 11:10pm
#6
The way I generate the triangles is different. Instead it gets a bounding box by doing min max checks like you would with region3 then i just use this algorithm i got from stack overflow algorithm - How to determine if a point is in a 2D triangle? - Stack Overflow
7yoz
(7yoz)
July 24, 2021, 11:10pm
#7
Have you tried using borders for pixels instead of the actual frames? Maybe it would work.
CoderHusk
(CoderHusk)
July 24, 2021, 11:10pm
#8
Doing that leads to you not being able to see nothing at all as the border pixel is on the perimeter of the gui so they just like overlap and you get no detail
7yoz
(7yoz)
July 24, 2021, 11:11pm
#9
You could try to multiply the position script then
CoderHusk
(CoderHusk)
July 24, 2021, 11:12pm
#10
I’m confused what do you mean by multiply the position script?
7yoz
(7yoz)
July 24, 2021, 11:13pm
#11
sepperate the pixels by 0.01 (If 1 pixel was 1,1,1,1 it would be 1.01, etc, etc, etc)
CoderHusk
(CoderHusk)
July 24, 2021, 11:15pm
#12
The pixels are already seperated by that tiny fraction and it varies depending on the dimensions. UIGridLayout does all that for me
7yoz
(7yoz)
July 24, 2021, 11:17pm
#13
Weird, have you ever wondered if it was GridLayout giving up?
CoderHusk
(CoderHusk)
July 24, 2021, 11:17pm
#14
I know for sure it isnt grid layout, it has worked for me in the past
7yoz
(7yoz)
July 24, 2021, 11:20pm
#15
Oh nice, maybe try look at the script then, since GridLayout works.
CoderHusk
(CoderHusk)
July 27, 2021, 8:57pm
#16
The problem was i was rounding the data before the math operation, should have been other way around