Devious and I were talking and I decided to make a camera.
Buddy249950 looks so pretty with your camera!
Yeeah, unfortunately hats come up as grey blobs. xP
Are the angle illustrators not going away properly? They should disappear when you unequip.
Anything I should change/add?
If you’re using raycasting, I’m pretty sure FindPartOnRay returns the surface normal that it hit. Using that, you might be able to do a bit of “shading” to the image to make objects appear correct in 3D space. I don’t know much about how all of that works though, but it would be cool to try.
Good idea. Done.
I updated it a bit more - here are some screenshots of it with shading.
work with projection instead, and use triangles to mock up faces on the Parts, that way you won’t be pixel limited, and you won’t need to ray trace- even still, it’s a pretty neat project, what framerate are you getting?
Raytracing is what people do when they do complex lighting for movie renders and stuff.
I get a framerate of ~30 the entire time (even during rendering) except when taking the picture (which, even on the HD setting, is <10 seconds), where it drops to ~21.
I don’t understand how I would do what you’re suggesting, could you elaborate a bit more?
I get a framerate of ~30 the entire time (even during rendering) except when taking the picture (which, even on the HD setting, is <10 seconds), where it drops to ~21.
I don’t understand how I would do what you’re suggesting, could you elaborate a bit more?[/quote]
Don’t do that. You’d need to zbuffer and stuff. And you have to do that on a er pixel basis. So… yeah
Also I started working on something about 45 minutes ago:
So I figured out that you can just geometrically integrate the transparency from 0 to the distance the ray travles through the part (the solved geometric integral is just Transparency^Distance) and it will get you the true transparency of that point through the part. I’mma add that.
the whole point of projection is that it isn’t per pixel, and it would cut you render time way down, and it being roblox, per poly shading wouldn’t be bad
the method I’m suggesting would be to:
1-break the parts into faces
2-project the points of the faces into camera space
3-render the faces youself, or use someone else’s renderer, like zGl (if you rendered yourself, use two right angle triangles stretched to form a trig, and a quad is just two trigs)
That will cut a ton on how much rendering (and take the ‘taking the picture’ step down to less than 1/20th of a second) you’re doing, and don’t forget to backface cull, and re-use the triangles as much as you can
Another advantage is infinite resolution with no performance drop, where if you increased resolution in your current per pixel method, performance would be terrible.
No. It doesn’t matter what technique you do to get an image on the screen, you still have to display it on a screen which is made out of pixels. and if you take a shortcut and don’t cull the parts of triangles which are behind parts other triangles, you get terrible results with triangles overlapping other triangles where they shouldn’t be.
When you’re rendering a triangle, you have to run through each pixel that the triangle is on. Because it is highly possible that a triangle passes through another triangle, you check to see which triangle is closer when rendering. This is done on a per pixel basis when drawing the triangle.
Regardless of the technique, whether it’s triangle projection or raytracing, you will need to have pixels to do it right. It’s just that the raytracing method can return beautiful results.
[quote] No. It doesn’t matter what technique you do to get an image on the screen, you still have to display it on a screen which is made out of pixels. and if you take a shortcut and don’t cull the parts of triangles which are behind parts other triangles, you get terrible results with triangles overlapping other triangles where they shouldn’t be.
When you’re rendering a triangle, you have to run through each pixel that the triangle is on. Because it is highly possible that a triangle passes through another triangle, you check to see which triangle is closer when rendering. This is done on a per pixel basis when drawing the triangle.
Regardless of the technique, whether it’s triangle projection or raytracing, you will need to have pixels to do it right. It’s just that the raytracing method can return beautiful results. [/quote]
I said above “and don’t forget to backface cull”
If triangles are ImageLabels on a Surface Gui, the resolution will be higher than your viewport will pick up
For intersections, you could clip the triangle where it intersects, and render it as two separate polys
[quote] No. It doesn’t matter what technique you do to get an image on the screen, you still have to display it on a screen which is made out of pixels. and if you take a shortcut and don’t cull the parts of triangles which are behind parts other triangles, you get terrible results with triangles overlapping other triangles where they shouldn’t be.
When you’re rendering a triangle, you have to run through each pixel that the triangle is on. Because it is highly possible that a triangle passes through another triangle, you check to see which triangle is closer when rendering. This is done on a per pixel basis when drawing the triangle.
Regardless of the technique, whether it’s triangle projection or raytracing, you will need to have pixels to do it right. It’s just that the raytracing method can return beautiful results. [/quote]
I said above “and don’t forget to backface cull”
If triangles are ImageLabels on a Surface Gui, the resolution will be higher than your viewport will pick up
For intersections, you could clip the triangle where it intersects, and render it as two separate polys[/quote]
Let me draw you a few cases you have to handle.
This is a major pain in the butt to do.
ZIndex 10 isn’t the worst problem, but the cutting ones definitely are.
For ZIndex, you can simply have a bunch of GUIs stored in a table, and use them in what ever order you wanted.
Z-buffer isn’t a hard thing to do. You need to store the magnitude to you in the pixel data and when you try to update the same pixel data, you just compare the magnitudes and based on that you either update the pixel data or not. You’ll use tables to store the pixel data.
I’ll try my best to help you guys out.
And if you want, I can open-source my rendering to you people. It has shadow smoothing with object surface light reflecting but they’re done poorly. It can render any bump-maps and textures/decals from internet in PNG format including their transparency alpha… I was also thinking about anti-aliasing, bloom and those stuff. They’re easy to make but I need some time. Probably in the summer…
Without Surface light reflecting.
With Surface light reflecting.
With Surface light reflecting. All the materials have their bump maps. And you can see that decals are also being affected by the bump map also.
We can see how bump maps act on reflective objects.
Without debugging “mode”.
CLOSER!
Thanks for the tips, guys. I’m not sure I completely understand, though. Axis, what do you mean by the transparency of the object? I’m not familiar with this.
[quote] [quote=“AxisAngle” post=135937]No. It doesn’t matter what technique you do to get an image on the screen, you still have to display it on a screen which is made out of pixels. and if you take a shortcut and don’t cull the parts of triangles which are behind parts other triangles, you get terrible results with triangles overlapping other triangles where they shouldn’t be.
When you’re rendering a triangle, you have to run through each pixel that the triangle is on. Because it is highly possible that a triangle passes through another triangle, you check to see which triangle is closer when rendering. This is done on a per pixel basis when drawing the triangle.
Regardless of the technique, whether it’s triangle projection or raytracing, you will need to have pixels to do it right. It’s just that the raytracing method can return beautiful results. [/quote]
I said above “and don’t forget to backface cull”
If triangles are ImageLabels on a Surface Gui, the resolution will be higher than your viewport will pick up
For intersections, you could clip the triangle where it intersects, and render it as two separate polys[/quote]
Let me draw you a few cases you have to handle.
This is a major pain in the butt to do.[/quote]
You make it seem so hard, zindex is no problem, just add all the triangles in order, and forget zindex even exists
for all the intersection problems, just cut the triangle on the line where the two planes intersect, that solves 100% of you issues, I’m surprised you even wrote that reply
[quote] [quote=“Weeve” post=136031][quote=“AxisAngle” post=135937]No. It doesn’t matter what technique you do to get an image on the screen, you still have to display it on a screen which is made out of pixels. and if you take a shortcut and don’t cull the parts of triangles which are behind parts other triangles, you get terrible results with triangles overlapping other triangles where they shouldn’t be.
When you’re rendering a triangle, you have to run through each pixel that the triangle is on. Because it is highly possible that a triangle passes through another triangle, you check to see which triangle is closer when rendering. This is done on a per pixel basis when drawing the triangle.
Regardless of the technique, whether it’s triangle projection or raytracing, you will need to have pixels to do it right. It’s just that the raytracing method can return beautiful results. [/quote]
I said above “and don’t forget to backface cull”
If triangles are ImageLabels on a Surface Gui, the resolution will be higher than your viewport will pick up
For intersections, you could clip the triangle where it intersects, and render it as two separate polys[/quote]
Let me draw you a few cases you have to handle.
This is a major pain in the butt to do.[/quote]
You make it seem so hard, zindex is no problem, just add all the triangles in order, and forget zindex even exists
for all the intersection problems, just cut the triangle on the line where the two planes intersect, that solves 100% of you issues, I’m surprised you even wrote that reply[/quote]
Do you even know how to detect that line? And now you’re talking about cutting it. This’d make it very inefficient. That’s completely not how you do it.
plane/plane collision (super simple computation), and then cutting it is just rendering 2 extra trigs