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