Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

123 #31

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

123 #31

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
39c9b79
Add Camera rotation
KeyWeeUsr Nov 26, 2016
31beb72
Add RUB vectors & viewport matrix to camera
KeyWeeUsr Dec 10, 2016
e7170a2
Merge branch 'material_expl' into root
KeyWeeUsr Dec 10, 2016
baf6c1b
Merge branch 'scale_mesh' into root
KeyWeeUsr Dec 10, 2016
ee0e7e4
Merge branch 'camera_rot' into root
KeyWeeUsr Dec 10, 2016
3760147
Merge branch 'cam_vect_viewport' into root
KeyWeeUsr Dec 10, 2016
0bb6059
Make correct RUB passive
KeyWeeUsr Dec 13, 2016
504b3bd
Merge branch 'cam_vect_viewport' into root
KeyWeeUsr Dec 13, 2016
5bbaf0e
Fix inverted camera position
KeyWeeUsr Dec 13, 2016
d59e58e
Merge branch 'inv_pos' into root
KeyWeeUsr Dec 13, 2016
c4c1a93
Add basic light api
KeyWeeUsr Dec 25, 2016
a6aa13e
Merge branch 'light' into root
KeyWeeUsr Dec 25, 2016
890a536
Fix after 'light' merge
KeyWeeUsr Dec 25, 2016
63be448
Add basic light api
KeyWeeUsr Dec 27, 2016
88d9fde
Make textures work with light
KeyWeeUsr Dec 27, 2016
2552033
Merge branch 'tex_w_light' into root
KeyWeeUsr Dec 27, 2016
5ff0834
Fix shininess for zeros
KeyWeeUsr Jan 18, 2017
198789a
Add packaging info
KeyWeeUsr Jan 18, 2017
39bce59
[PATCH] Division-fix for Python 3.* in geometries.BoxGeometry
rense Dec 26, 2016
fd43e97
[PATCH] Str-fix for Python 3.* in objects.mesh
rense Dec 26, 2016
8a45d65
[PATCH] Dict-fix for Python3.* in core.object3d
rense Dec 26, 2016
6343e01
Map to list
KeyWeeUsr Feb 11, 2017
8c664cc
PEP8 fixes
KeyWeeUsr Feb 11, 2017
d0b710b
Fix py2 math.floor error
KeyWeeUsr Jul 3, 2017
38ff4fa
ObjLoader: Square faces, not found texture; Mesh: mesh_mode, max indi…
rnixx Oct 20, 2018
2b70e50
Fix default vertex format for py3
KeyWeeUsr Oct 21, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*.pyd binary
*.pyo binary
*.obj binary
*.mtl binary

# Note: .db, .p, and .pkl files are associated
# with the python modules ``pickle``, ``dbm.*``,
Expand Down
32 changes: 24 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
# Kivy3 - 3d stuff framework for Kivy
# Kivy3 - 3D graphics framework for Kivy

Kivy3 is the framework which helps you to do some 3D elements and rendering within Kivy application. Basically with Kivy and Kivy3 you may create 3D application for any platform supported by Kivy like iOS, Android, Windows, OSX, Linux.
Kivy3 is the framework which helps people work with 3D elements and rendering
within Kivy application. Basically with Kivy and Kivy3 you may create a 3D
application for any platform Kivy supports, such as: iOS, Android, Windows,
OSX, Linux (including Raspberry Pi).

Kivy3 provides you a toolset and abstraction levels to work with 3D objects like Camera, Scene, Renderers, loaders you may use to load 3D object etc.
Kivy3 provides a toolset and abstraction levels to work with 3D objects like
Camera, Scene, Renderers, loaders you may use to load 3D objects.

# Installation

First make sure that you have **kivy** installed on your machine. You may find instructions for installing Kivy framework [here](https://kivy.org/docs/installation/installation.html). When Kivy is installed, just follow next instruction:
First make sure that you have `kivy` installed on your machine. Mostly
a simple:

```
$ pip install https://github.com/nskrypnik/kivy3/zipball/master
```
$ pip install kivy

should be sufficient, but stable version will not include the latest features.
For further info visit
[Kivy documentation](https://kivy.org/docs/installation/installation.html).
After successful Kivy installation install Kivy3 with this:

$ pip install https://github.com/KeyWeeUsr/kivy3/zipball/master

# Packaging kivy3

Comming soon...
Kivy3 is a pure python package, currently available only at GitHub, which
means that for packaging it e.g. for Android you need to clone the folder
to your application folder (the one with `main.py`). If you can run the app
on a desktop machine, it should work even on other platforms.

Don't forget to add an include exception for additional files, such as shader
(`*.glsl`) and other files you may find in the `kivy3` folder.
5 changes: 3 additions & 2 deletions examples/camera/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
obj_file = os.path.join(_this_path, "../textures/orion.obj")
mtl_file = os.path.join(_this_path, "../textures/orion.mtl")


class MainApp(App):

def build(self):
Expand Down Expand Up @@ -47,8 +48,8 @@ def _keyboard_closed(self):
self._keyboard.unbind(on_key_down=self._on_keyboard_down)
self._keyboard = None

def _on_keyboard_down(self, keyboard, keycode, text, modifiers):
if keycode[1] == 'w':
def _on_keyboard_down(self, keyboard, keycode, text, modifiers):
if keycode[1] == 'w':
self.camera.pos.z -= 0.2
elif keycode[1] == 's':
self.camera.pos.z += 0.2
Expand Down
2 changes: 1 addition & 1 deletion examples/example2.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def build(self):
camera = PerspectiveCamera(15, 1, 1, 1000)
# load obj file
loader = OBJLoader()
obj_path = os.path.join(os.path.dirname(__file__), "./testnurbs.obj")
obj_path = os.path.join(os.path.dirname(__file__), "./testnurbs-2.obj")
obj = loader.load(obj_path)

scene.add(*obj.children)
Expand Down
38 changes: 38 additions & 0 deletions examples/testnurbs-2.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Blender MTL File: 'None'
# Material Count: 4

newmtl wire_087224143
Ns 29.411765
Ka 0.000000 0.000000 0.000000
Kd 0.272960 0.702720 0.448640
Ks 0.350000 0.350000 0.350000
Ni 1.000000
d 1.000000
illum 2

newmtl wire_108008136
Ns 29.411765
Ka 0.000000 0.000000 0.000000
Kd 0.338800 0.025120 0.426640
Ks 0.350000 0.350000 0.350000
Ni 1.000000
d 1.000000
illum 2

newmtl wire_148177026
Ns 29.411765
Ka 0.000000 0.000000 0.000000
Kd 0.464320 0.555280 0.081600
Ks 0.350000 0.350000 0.350000
Ni 1.000000
d 1.000000
illum 2

newmtl wire_154154229
Ns 29.411765
Ka 0.000000 0.000000 0.000000
Kd 0.483120 0.483120 0.718400
Ks 0.350000 0.350000 0.350000
Ni 1.000000
d 1.000000
illum 2
Loading