r/ComputerCraft • Computercraft graphics research • Oct 17 '22

Today i pushed some more code and..

66 Upvotes

13 comments sorted by

5

u/9551-eletronics Computercraft graphics research Oct 17 '22

code used here

local sh

function c3d.load()
    sh = c3d.geometry.load_model("shrek.obj")
        :make_geometry(100)
        :add_param("texture",c3d.graphics.load_texture("s2.ppm",{quantize_amount=3}):get_out().quantized:apply_palette())
        :add_param("invert_culling",true)
        :push()
        :reposition(0,-0.5,1)
end

function c3d.update()
    sh:set_rotation(0,os.epoch("utc")/10,0)
end

4

u/[deleted] Oct 17 '22

Where does the Shrek. Obj come from

2

u/9551-eletronics Computercraft graphics research Oct 19 '22

https://github.com/9551-Dev/C3D Forgot o actually link the api :P

2

u/fatboychummy Oct 17 '22

I believe his head is :b:roke

2

u/9551-eletronics Computercraft graphics research Oct 17 '22

nah thats fine. the face and body use separate UV maps and i coulnt bother to merge them. so i just used one of the maps which kinda has shreks face missing.

2

u/fatboychummy Oct 17 '22

smh imagine not going all out for a showcase smh smh smh

1

u/9551-eletronics Computercraft graphics research Oct 17 '22

actually i dont even know how that would be possible.

2

u/fatboychummy Oct 17 '22

I will reiterate:

smh smh smh

2

u/[deleted] Oct 18 '22

Where did c3d come from?

2

u/9551-eletronics Computercraft graphics research Oct 18 '22

Nowhere. The lib puts it in the programs environment

https://github.com/9551-Dev/C3D

2

u/naab007 Oct 18 '22

Shrek is life, Shrek is love.

2

u/9551-eletronics Computercraft graphics research Oct 18 '22

Flashbacks