draw 3D objects within Kivy

808 views
Skip to first unread message

object_R

unread,
Jul 25, 2016, 12:31:13 AM7/25/16
to Kivy users support
Hi, 
Is there a way of drawing 3D objects within kivy? simple shapes (spheres, cubes and beziers)

My goal is to move them around in the 3d space, very basic (think simple panda3d) but I need 'real' 3d. 


thank you!

Alexander Taylor

unread,
Jul 25, 2016, 4:16:11 AM7/25/16
to Kivy users support
Kivy is an OpenGL toolkit, so yes, you can do basically anything. However, Kivy itself doesn't provide an API for 3D drawing, so you need to either do things somewhat manually (using Kivy's Mesh instruction to define the shapes, and setting up your own shaders for 3D drawing) or very manually (using a lower-level OpenGL interface, this probably works) or possibly using a different library such as Vispy (which probably can work on a technical level but would need quite some work to interface between them neatly). The first option here isn't that hard for basic things, but you need to understand a little how OpenGL works.

You can find a 3D rendering example in Kivy's examples folder (a rotating monkey head), which does the core things you'd need to replicate. There are also a few examples around doing 3D things with Kivy, e.g. https://github.com/nskrypnik/kivy-rubik and https://github.com/kpiorno/kivy3dgui
Reply all
Reply to author
Forward
0 new messages