Pixelated Roblox Part 4!

Woah! That’s a crazy cool idea for this!

I never even thought of putting it in a viewport frame and making an alternate workspace to render it from.

2 Likes

Sorry for the bump, but this method could work really damn well. I reccomend you trying it because the full block character appears to leave almost no spaces/gaps in a text label.

I did a quick example with a textlabel with rich text enabled that uses the full block character > █ <

image

And as you can see there are almost no gaps in the text label.

You just might have to mess around with the sizing and fonts a bit.

I reckon you should make this a second option

also didn’t mean to reply to BlackShibe.

5 Likes

I know that UI Gradients can support up to 18 pixels, have you tried building support for that? I also would love to see you integrate Roblox’s new Parallel support to help reduce the burden of ray casts.

Hey @AJRuski last time I played with these UIGradients, it simply would error and discard any edits I made if I attempted to implement more than 10 segments, but if you say so I will 100% look into it.

Also, are you saying parallel support is now live? I hate to admit it but I really don’t keep up to date with these updates, but if it is omg I can’t wait to use it.

1 Like

this is very cool you do plan to give it out to the public right or just a personal project?

Hey @timothyco1!
The source for this is entirely free even right now!
It’s also all compact into a single ScreenGui that when placed into any game’s StarterGui will automatically work without any adjusting.

1 Like

Okay so I just looked into parallel lua again after a bit and testes out the beta. Their test ray tracer is very cool!

They obviously aren’t implementing the optimizations that we have all collectively worked toward and even still are getting the same fps. I can only imagine how much faster we can make this run, and how much closer we can get this project to be fully capable in real games in the future!

My main concern about using Text instead of frames is simply that it won’t solve our issue of 10 pixels per paxel and I haven’t been able to find a perfectly square block character.

I don’t believe it will increase performance, I actually think it might decrease performance.

1 Like

How would it be possible(if at all) to get kind of a diamond-shaped pixels?
Like certain 2d games.

1 Like

I’m not sure I understand, could you show me an example?

1 Like

Nobody asked for it, but I added reflection to this.

Despite the fact that we are casting an extra ray per pixel of a reflective part, this thing runs very well. I only seem to lose 4-10 FPS when using this setting.

Since I’ve just made this in like 10 minutes, there are a few things missing, such as transparency and skybox colour not being reflected. But all of those issues are relativity easy to fix.

Feel free to implement and improve this into the official version.


Original place but with the reflection setting already implemented:
Pixel test 4 but with reflection.rbxl (55.2 KB)


Main Reflection process function:

function ProcessReflection(Raycast, IntersectPos, Normal, Params, OriginalColor)
	if Raycast.Instance.Reflectance > 0 then -- No need to create an extra ray if the part isn't reflective
		
		local ReflectedNormal = Normal - (2 * Normal:Dot(Raycast.Normal) * Raycast.Normal) -- Relfect the direction.
		local Direction = ReflectedNormal * FC.RenderDist -- New reflected direction
		
		local NewRayCast = PerformRaycast(IntersectPos, Direction, Params) -- Create the reflected ray
		if NewRayCast then
			return NewRayCast.Instance.Color:Lerp(OriginalColor, 1 - (Raycast.Instance.Reflectance / 1))
		else
			return OriginalColor
		end
	else
		return OriginalColor
	end
end
8 Likes

Coolio! Might use this in the future!

This looks amazing. Is it possible to change this so it raycasts and renders from the front of a specific part or is it only possible for characters?

WEOAH!

So sorry I didn’t see this until recently!!
I will totally implement this into the official version!
That is awesome!!!

2 Likes

This is amazing! I made a system similar to this a few years ago and thought I would have to rewrite everything to make it work for newer projects
You saved me months of work!

2 Likes

are you just casting out into the world? try to project the triangles and then backface cull and frustum clip, I can get my Roblox character running at 300x300 at 10fps with it and at 100x100 and 26fps on a crappy 2.7 ghz laptop.

Do you happen to know why when I try and edit this project in studio some of the pixels just dont work?

It is most likely due to the name given to the paxels when they are made in line 43 in FrameCreator, Although I am not that well experienced with this code a fix I was able to come up with was by changing it from

Paxel.Name = tostring((i*SizeX) * FC.Resolution) .. "-" .. tostring(Y * FC.Resolution)

to

Paxel.Name = tostring(math.round((i*SizeX) * FC.Resolution)) .. "-" .. tostring(math.round(Y * FC.Resolution))

I assume it is due to the fact large numbers are being named to the paxel and can be solved with rounding them.

2 Likes

Woah, that looks incredible! How’d you do it?

im making, my own thing, like this. i do it with a lot of raycasts and math.
image


1 Like