Fake Reflections/Global Illumination

It also seems to have trouble with small condensed amounts of parts so perhaps brightness should be tweaked based on part size

1 Like

Sadly, Pointlights is roblox’s problem, Since we don’t have lights that sizes according to the part’s size that happens.

for a joke i name that bridge the bridge to heaven

5 Likes

makes sense, but then if a part cant support a light size than could you just disable it?

1 Like

The code is very simple, Im not sure how to disable it using my script.

I do have some ideas of disabling it.

1 Like

It’s Really good with the lighting

1 Like

I tried to code it myself and I must say it looks pretty good


I coded it that the smaller parts cant have point lights to avoid stairways of heaven. i might use raycast to detect it after this

2 Likes

Nice to see that you are trying to code yourself!

The “engine” has been updated but not released yet. (i guess)

1 Like

I tried remaking my own
image

image

4 Likes

That are some nice stuff that you did! Its more smooth than this

2 Likes

I’m confused on how this works but I’m not confused on how good it looks! this should be a plugin!

im a coder and i really wanna make some thing like this :pleading_face: please explain a bit more this should be a plugin!

1 Like

loop workspace:GetDescendants and put a point light in each of them. make sure the point light is the same color as their parent, u can adjust the point light by idk dividing the y size whatever u want with it

2 Likes

so basically putting point lights in every part? that’s very simple

2 Likes

this is not a property of point light or at least it says on the Hub

1 Like

The way I made it a bit better is that is changes the brightness of the light depending on the part size. It gets the average of all the part sizes, then divides it by a high number and sets the light brightness to that. I keep range at one number.

2 Likes

what i meant by y size is, u could calculate the range of light by dividing the parts y size

2 Likes

where are these models from?

every part in the workspace?

1 Like

how did you make the spheres not look wierd?

1 Like

Glass houses map from roblox, its a classic

For each part it gets the x, y, z and then averages it

2 Likes

here’s the code

-- once u paste this in a script make an attribute on the script and name it "outlines"
for i, v in pairs(workspace:GetDescendants()) do
	if v:IsA("Part") then
		local light = Instance.new("PointLight")
		light.Parent = v
		light.Shadows = true
		light.Brightness = math.ceil((v.Size.X + v.Size.Y + v.Size.Z)*1.5)+1--math.round(((v.Size.X * v.Size.Y * v.Size.Z) * 1/3)) 
		light.Range = 3
		light.Color = v.Color
		if (light.Brightness * 3) >= 100 then
			light:Destroy()
		end
	end
end

you can customize what size parts get your point light

I tried it I think it came out pretty good it wasn’t very easy to get here also the thirds photo stairs are weird and idk on how to fix that also the last photo is with out the script.

10 Likes

I personally love it. Wonderful job! :smiley:

2 Likes