r/ComputerCraft • u/9551-eletronics Computercraft graphics research • Oct 16 '22
Finally after third try got my 3D rendering library running. featuring full shader and texture support with standard rendering pipeline, would yall appreciate such a lib if it had all the useful tools for thiese things. would like to hear if any of you would find this useful, and what do you think.
3
u/lazer_aio Oct 16 '22
Impressive! Is the video spedup? if not then how is the fps so high and do you think it's possible to make this run doom?
4
u/9551-eletronics Computercraft graphics research Oct 16 '22
Nope this is realtime. But don't forget its renderings just 12 faces !
If you used CCs default screen aize you could probably render something larger/more detailed.
Basically sacrifice resolution for kore complex geometries
1
u/lazer_aio Oct 16 '22
Not sure what you mean by 12 faces, a cube has 6.
but do you think it might be possible to render inside the cube? Basically as if the camera was inside the cube, that way you could fake a room and perhaps fake doors. Then you would simply need to change cube once you passed a door and you would have a basic map!
9
u/9551-eletronics Computercraft graphics research Oct 16 '22
You can render inside the cube by just disabling the backface culling.
Yes cube has 6 faces bt each one is made out of 2 triangles
In total a cube has 12 triangles 8 vertices 6 faces
2
u/xeshP Oct 18 '22
This is really impressive!
Keep up the good work like to see more of that :)
1
u/9551-eletronics Computercraft graphics research Oct 18 '22
I was thinking of posting more but i don't want it to feel spammy
2
u/xeshP Oct 19 '22
no way its more interesting
i never seen in it in that way u do it and i think this can be very useful thx for sharing
2
u/9551-eletronics Computercraft graphics research Oct 19 '22
Thanksm i have just realized that i have not actually linked the thing ! I should probably add a comment with the link.
1
1
u/Harmed_Burglar You are the nil to my peripheral.wrap( ) Oct 17 '22
How'd you get the resolution so high?
3
u/9551-eletronics Computercraft graphics research Oct 17 '22
I used the CraftOS pc emulator to get a large window and i also use special mosaic characters to get 6x more pixels from that
2
1
u/herrkatze12 Oct 17 '22
Would it be possible to make a game using this?
2
u/fatboychummy Oct 17 '22
Yes but performance would be a question due to it running on Lua
2
u/Harmed_Burglar You are the nil to my peripheral.wrap( ) Oct 17 '22
Damn, isn't lua generally ok with performance though
2
u/fatboychummy Oct 17 '22
Lua is an interpreted language, not a compiled language. Because of this it is a lot slower.
Not to mention that the lua framework is running on Java in CC.
2
u/zarlo5899 Oct 17 '22
unless you are running in luaJIT
1
u/fatboychummy Oct 17 '22
LuaJIT is quite fast sure, but we are talking in the context of CC, which isn't LuaJIT.
1
1
10
u/9551-eletronics Computercraft graphics research Oct 16 '22