Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
|
| 03 Apr 2012 09:34 PM |
Okay, I have an idea that might work in the future. It uses the following possible features:
1) Rendering GUIs in the world on brick faces 2) Raycasting 3) Making pictures using tons of Frame objects
The idea is to make a portal in ROBLOX that you can see through. The picture would be generated by raycasting in the direction of the other portal (this can already be done on-screen).
A little birdy told me that we may be able to render GUIs in the ROBLOX world which are not BillboardGui objects. They would not face toward the camera, but render in a certain direction like decals.
Make a picture by raycasting out from the camera position in several directions, then render this on the in-world GUI.
Remember that the first thing mentioned in that list up there doesn't exist.
Wouldn't this be cool? |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 03 Apr 2012 09:41 PM |
| Instead of using guis to show the rendered image, we can use bricks :D? |
|
|
| Report Abuse |
|
|
|
| 03 Apr 2012 09:42 PM |
GUIs are a not a good way to do it.
I've already successfully prototyped a fairly slow (1fps) method of portal rendering using bricks. You simply have to cull out the surfaces which are not visible through the portal (raycasting) and cull out objects in the main world which _are_ visible through the portal (raycasting).
A voxelized world or other simplifications would mean you could cut out raycasting and make it work much, much faster, however.
Otherwise, the pixel-by-pixel approach will be hideous and ridiculously slow. |
|
|
| Report Abuse |
|
|
| |
|
Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
|
| 03 Apr 2012 09:44 PM |
The problem with bricks is if you wanted a basic 25x25 pixel image (which is very small), you'd use a ton of bricks.
The goal would be to avoid using bricks with meshes (meshes allow any color to be rendered in the game world). I bet it would be easy for the devs to add something like this in. |
|
|
| Report Abuse |
|
|
Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
|
| 03 Apr 2012 09:45 PM |
| This would be a lot easier if we had some kind of ImageData object... |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 03 Apr 2012 09:46 PM |
| But you can render just as nice of an image using bricks (with meshes)rather than guis. |
|
|
| Report Abuse |
|
|
|
| 03 Apr 2012 09:49 PM |
| By "using bricks" I meant 3D objects, not decals, in case that wasn't clear. |
|
|
| Report Abuse |
|
|
| |
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 03 Apr 2012 10:15 PM |
Yeah, I want this feature:
GUI's on bricks. I.E. basically render GUI's on a bricks' surface, using something like a decal as a holder....
Then, we can do all of this stuff, etc.
Also, billboardGUI's should have a property that's a table of parts that when it's suppose to be in front of a ton of bricks, it's not in front of those.
:P
But then again, I'm a GUI obsessed user. |
|
|
| Report Abuse |
|
|
aboy5643
|
  |
| Joined: 08 Oct 2010 |
| Total Posts: 5458 |
|
|
| 03 Apr 2012 10:16 PM |
@Quenty
Been suggesting that for 3 years. It wouldn't be hard with a decent rendering library... |
|
|
| Report Abuse |
|
|
miloguy
|
  |
| Joined: 19 Dec 2009 |
| Total Posts: 7702 |
|
|
| 03 Apr 2012 11:09 PM |
| Wouldn't it have to know where the camera is to render the portal correctly? |
|
|
| Report Abuse |
|
|
Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
|
| 04 Apr 2012 05:32 AM |
@milo You can just do that by looking at a grid of rays shot out from the focal point of the portal.
And lolz, decals and transparency have always hated each other. |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2012 10:53 AM |
You can do this currently.
Either rasterize the stuff on a grid or use raycasting, whichever is faster (raycast fast around moving objects, dont raycast at all if the objects aint moving?)
Then draw the image to a second grid that matches the size of the brick face ur rendering to (it wont cover the whole grid!)
Then the areas which were drawn on u transfer into frames, using some quadtree thing to use little frames for big same color areas. |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2012 11:28 AM |
| Yes, just continue ignoring my suggestion... |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2012 12:14 PM |
@blootaslem
but bricks cant be good since they also have physics and stoof. |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2012 12:42 PM |
| 3 Finnish people so far... |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 04 Apr 2012 02:47 PM |
"Wouldn't it have to know where the camera is to render the portal correctly?"
You would need to know the position of the camera and the position of the brick (assuming you'd do this by using bricks representing pixels).
local brickPos=brick.Position local camPos=camera.CoordinateFrame.p
local ray=Ray.new(brickPos,camPos*l) |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2012 02:52 PM |
| Anchored... bricks... You'll be able to render 3D bricks using the CFrame math waaaay faster than you can do it at a low resolution with pixel-by-pixel... There is absolutely nothing superior about that; it's slower, less accurate, more data to get over the network... |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 04 Apr 2012 03:02 PM |
"local ray=Ray.new(brickPos,camPos*l)"
Obviously you'd need to implement the grid used to design the portal into that so all rays aren't casted into one position, though. Should have mentioned that.
local cam=workspace.Camera local amnt=20
local pixels={}
for y=1,amnt do -- Grid, pixel creation for x=1,amnt do local pixel=Instance.new("Frame",script.Parent) pixel.Name=x..';'..y pixel.BorderSizePixel=0 pixel.Size=UDim2.new(1/amnt,0,1/amnt) pixel.Position=UDim2.new(1/amnt*x-1/amnt,0,1/amnt*y-1/amnt) table.insert(pixels,pixel) end end
while true do -- Magix local view=CFrame.new(cam.CoordinateFrame.p,cam.Focus.p) for y=amnt,1,-1 do -- amnt,1,-1 ? Can't remember why I did this for x=amnt,1,-1 do local cf=view*CFrame.new(amnt/2-y,amnt/2-x,0) local ray=Ray.new(cf.p,cf.lookVector*175) local hit=workspace:FindPartOnRay(ray) if hit and hit.Transparency<1 then pixels[x*amnt-y+1].BackgroundColor=hit.BrickColor else pixels[x*amnt-y+1].BackgroundColor=BrickColor.new(93/255,172/255,252/255) end end end wait() end |
|
|
| Report Abuse |
|
|
Emess
|
  |
| Joined: 01 Apr 2010 |
| Total Posts: 13331 |
|
|
| 04 Apr 2012 03:04 PM |
| What do pew pew lasers have to do with rendering portals? |
|
|
| Report Abuse |
|
|
| |
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 04 Apr 2012 03:39 PM |
| If we can do portals, mirrors would be just as simple. |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2012 03:46 PM |
| Hmmm... I wonder what kind of uses we could do this for in game creation... |
|
|
| Report Abuse |
|
|