generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Reflection Script

Previous Thread :: Next Thread 
wubbzy301 is not online. wubbzy301
Joined: 15 May 2010
Total Posts: 1188
11 Feb 2014 02:40 AM
DONT ask me a "reflection = 1"

I need thats reflect any parts and skybox, not only just reflect the skybox.
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
11 Feb 2014 02:43 AM
Not the place to post this, and thats impossible unless roblox adds a mirror.

The only mirrors made are very crude and laggy.
Report Abuse
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
11 Feb 2014 04:31 AM
"Not the place to post this, and thats impossible unless roblox adds a mirror."

"impossible" - "The only mirrors made are very crude and laggy."

"made"

Make up your mind.

EOS db 0x00 ;End of String Marker
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
11 Feb 2014 11:05 AM
Ignore what dogwarrior24 said for the moment.

You can make them in two ways:

Have a separate room behind the mirror which reflects all parts in a region in front of it behind it, moving and deleting them in real-time (Can be improved)

OR

Raycast repeatedly outwards, coloring intersections with parts on pixels on a screen made of parts/GUI elements.

Both are laggy.

Both are bad.

Mostly use them for experimentation.

And no. You cant have any code.
Report Abuse
Dicentium is not online. Dicentium
Joined: 28 Aug 2011
Total Posts: 18560
15 Feb 2014 01:19 PM
^ i did the raycasting bit and it sucked

it lagged really bad
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
15 Feb 2014 01:37 PM
As i said, the only mirrors are very crude and laggy.
Report Abuse
Looah is not online. Looah
Joined: 22 Feb 2013
Total Posts: 922
15 Feb 2014 02:44 PM
surfacegui mirrors
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
15 Feb 2014 02:46 PM
Oysi made it in gui form, well not exactly a mirror, but a camera which even had raytracing and it showed the map on a gui.

This could be used in a surfacegui
Report Abuse
jetta765214Epic is not online. jetta765214Epic
Joined: 23 Feb 2011
Total Posts: 228
15 Feb 2014 03:33 PM
@stealth, a lot of people made them. Crazyman32, oisy, even me(Who isn't as good as them).

Any way, since it's not that hard to make:

--cam = game.Workspace.Cam
cam = game.Workspace.CurrentCamera--uses the camera as the camera's position

x_res = 100
y_res = 100

gui = Instance.new("ScreenGui")
gui.Name = "Picture"
gui.Parent = game.StarterGui

Shading = {
FrontSurface = .9,
BackSurface = .9,
RightSurface = .85,
LeftSurface = .85,
TopSurface = 1.05,
BottomSurface = .8
}

function MultiplyColor3(color,num)
return Color3.new(color.r*num,color.g*num,color.b*num)
end

function GetSide(part,pos)
pos = part.CFrame:inverse() * pos * 2 / part.Size
if pos.x < -.999 then
return 'LeftSurface'
elseif pos.x > .999 then
return 'RightSurface'
elseif pos.y < -.999 then
return 'BottomSurface'
elseif pos.y > .999 then
return 'TopSurface'
elseif pos.z < -.999 then
return 'FrontSurface'
elseif pos.z > .999 then
return 'BackSurface'
end
end

while true do--it loops, you can change it to only make on hd image.
wait()
start = tick()
for x = 1,x_res do
for y = 1,y_res do
local rot = CFrame.Angles(-math.pi/4/y_res*(y-y_res/2),-math.pi/4/x_res*(x-x_res/2),0)
local ray = Ray.new(cam.CoordinateFrame.p,
(cam.CoordinateFrame*rot).lookVector*200)
hit, position = Workspace:FindPartOnRay(ray)
local frame = gui:FindFirstChild(tostring(x)..":"..tostring(y))
if hit then
if not frame then
frame = Instance.new("Frame")
frame.Name = tostring(x)..":"..tostring(y)
frame.Position = UDim2.new(0.5,x-x_res/2,0.5,y-y_res/2)
frame.BorderSizePixel = 0
frame.Size = UDim2.new(0,2,0,2)
frame.Parent = gui
else
frame.BackgroundTransparency = 0
frame.BackgroundColor3 = MultiplyColor3(hit.BrickColor.Color,Shading[GetSide(hit,position)])
end
else
if frame then frame.BackgroundTransparency = 1 end
end
end
end
print(tick()-start)--prints the amount of time it takes to make a frame, usually about .4ish for me.
end

Alt. of Jetta765214s
Report Abuse
Looah is not online. Looah
Joined: 22 Feb 2013
Total Posts: 922
15 Feb 2014 04:36 PM
for good reflections, it will lag alot.
prntscr/2stu4u < lowers fps dramatically. and that's 300x300 or something
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
15 Feb 2014 04:39 PM
What I love is how Oysi's camera has better shadows than Roblox itself ._.
Report Abuse
oseday is not online. oseday
Joined: 27 Aug 2008
Total Posts: 1308
15 Feb 2014 04:47 PM
Notun, just some dot product for surfaces and raycasting to sun for shadows.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
15 Feb 2014 04:47 PM
@oseday: That's not the point.

The point is that it is better than ROBLOX's shadows.
Report Abuse
oseday is not online. oseday
Joined: 27 Aug 2008
Total Posts: 1308
15 Feb 2014 06:57 PM
Notun, not really, its the same thing.
Report Abuse
wubbzy301 is not online. wubbzy301
Joined: 15 May 2010
Total Posts: 1188
17 Feb 2014 03:58 AM
bump
Report Abuse
wubbzy301 is not online. wubbzy301
Joined: 15 May 2010
Total Posts: 1188
17 Feb 2014 04:35 AM
bump
Report Abuse
wubbzy301 is not online. wubbzy301
Joined: 15 May 2010
Total Posts: 1188
17 Feb 2014 01:49 PM
bump
Report Abuse
oseday is not online. oseday
Joined: 27 Aug 2008
Total Posts: 1308
17 Feb 2014 02:06 PM
Stop bumping this thread, there is no need!

http://www.roblox.com/Lighting-Tests-place?id=146612744
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image