All Projects → sinanislekdemir → payton

sinanislekdemir / payton

Licence: BSD-3-Clause license
Payton! Kickstart any 3D OpenGL + GTK Ideas in a few seconds!

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to payton

Hybridrenderingengine
Clustered Forward/Deferred renderer with Physically Based Shading, Image Based Lighting and a whole lot of OpenGL.
Stars: ✭ 563 (+1151.11%)
Mutual labels:  sdl2, graphics-programming, 3d-graphics
Softwarerenderer
Software rendering engine with PBR. Built from scratch on C++.
Stars: ✭ 323 (+617.78%)
Mutual labels:  sdl2, graphics-programming, 3d-graphics
PokeChat
UNIX compatible, Discord and Telegram inspired, Pokémon-themed instant messaging service.
Stars: ✭ 11 (-75.56%)
Mutual labels:  sdl2, gtk3
raycaster-sdl
A simple raycasting demonstration using SDL2
Stars: ✭ 24 (-46.67%)
Mutual labels:  sdl2, 3d-graphics
Embree viewer
Embree viewer is a simple implementation of a progressive renderer, based on Intel's Embree raytracing kernels. Its UI is written in SDL2, and it supports Alembic, OBJ file formats, with a JSON file to describe a scene.
Stars: ✭ 19 (-57.78%)
Mutual labels:  sdl2, 3d-graphics
Datoviz
⚡ High-performance GPU interactive scientific data visualization with Vulkan
Stars: ✭ 222 (+393.33%)
Mutual labels:  scientific-visualization, scientific-computing
Tomviz
Cross platform, open source application for the processing, visualization, and analysis of 3D tomography data
Stars: ✭ 230 (+411.11%)
Mutual labels:  scientific-visualization, 3d-graphics
Awesome Scientific Python
A curated list of awesome scientific Python resources
Stars: ✭ 127 (+182.22%)
Mutual labels:  scientific-visualization, scientific-computing
yt astro analysis
yt astrophysical analysis modules
Stars: ✭ 18 (-60%)
Mutual labels:  scientific-visualization, scientific-computing
Procedural-Terrain-Generator-OpenGL
Procedural terrain generator with tessellation | C++ OpenGL 4.1
Stars: ✭ 98 (+117.78%)
Mutual labels:  graphics-programming, 3d-graphics
3D interactive graphics rendering engine
Develop a 3D interactive graphics rendering engine
Stars: ✭ 31 (-31.11%)
Mutual labels:  graphics-programming, 3d-graphics
Computator.net
Computator.NET is a special kind of numerical software that is fast and easy to use but not worse than others feature-wise. It's features include: - Real and complex functions charts - Real and complex calculator - Real functions numerical calculations including different methods - Over 107 Elementary functions - Over 141 Special functions - Over 21 Matrix functions and operations - Scripting language with power to easy computations including matrices - You can declare your own custom functions with scripting language
Stars: ✭ 174 (+286.67%)
Mutual labels:  scientific-visualization, scientific-computing
Matplotplusplus
Matplot++: A C++ Graphics Library for Data Visualization 📊🗾
Stars: ✭ 2,433 (+5306.67%)
Mutual labels:  scientific-visualization, scientific-computing
Jkqtplotter
an extensive Qt5 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Stars: ✭ 246 (+446.67%)
Mutual labels:  scientific-visualization, graphics-programming
Visit
VisIt - Visualization and Data Analysis for Mesh-based Scientific Data
Stars: ✭ 140 (+211.11%)
Mutual labels:  scientific-visualization, scientific-computing
PyCORN
A script to extract data from ÄKTA/UNICORN result-files (.res)
Stars: ✭ 30 (-33.33%)
Mutual labels:  scientific-visualization, scientific-computing
Vedo
A python module for scientific analysis of 3D objects based on VTK and numpy
Stars: ✭ 741 (+1546.67%)
Mutual labels:  scientific-visualization, 3d-graphics
Gdl
GDL - GNU Data Language
Stars: ✭ 104 (+131.11%)
Mutual labels:  scientific-visualization, scientific-computing
spinmob
Rapid and flexible acquisition, analysis, fitting, and plotting in Python. Designed for scientific laboratories.
Stars: ✭ 34 (-24.44%)
Mutual labels:  scientific-visualization, scientific-computing
endbasic
BASIC environment with a REPL, a web interface, a graphical console, and RPi support written in Rust
Stars: ✭ 220 (+388.89%)
Mutual labels:  sdl2, graphics-programming

Payton 3D SDK

example workflow Downloads Downloads

Payton is a general-purpose 3D Software Development Kit. Simply, a 3D Programming Playground!

  • Payton is a playground. Kickstart any idea fast and easy, grow it.
  • Create tools for the next step. Create map editors, small animations, small algorithms or artificial intelligence for your game. Whenever you need to try a new idea, don't bother to create a new application with all the details. Payton comes with all the necessary defaults and that is what makes it unique. Almost everything has a pre-set.
  • Game engines and other libraries are way too complex and it takes a long time to start the initial playground.
  • Payton never intends to take place as a game engine or a full-featured 3D environment. There is already plenty of stuff for that purpose.
  • Tools programming is easy.
  • Easy to visualize what you want to achieve or do what you want to do.
  • You can move forward from Payton to any other place if you like.

We draw 2D graphs and charts in reports and we generally understand much more easily when we visualize the data. But in some cases, visualizing exceeds 2 dimensions. We require to have third and even fourth dimensions. (And on top of those, the definition of the fourth dimension as time can get foggy in terms of relativity.)

Payton gives you the ability to extend your graphics into 4 dimensions. It is not software but a software development toolkit/library built with Python. This will give users the ability to read real-time data from sensors, cameras or any other data sources in realtime and visualize them in real-time. The data source can be a thermometer, a random number generator, a toy car connected to a speed sensor, a map, a vehicle port or anything that generates time-based 3D data. Furthermore, it can be a time-based formula. As this can get too complex, software with that complexity will probably be too hard to use and understand where Payton is designed to be as simple as it can be. So easy to program that a newbie can kick-start it just by following the tutorials.

Contents of this Document:

Features:

  • 3D Math Library
  • Various base geometries:
    • Cube
    • Cylinder
    • Triangular Mesh
    • Plane
    • Lines
    • Particle System
    • Sphere
    • Dynamic Grid
  • Clean default scene.
  • Pre-defined keyboard-mouse and camera controls
  • Pre-defined environment
  • Clock system for parallel tasks and time based operations
  • Simple collision detection
  • Optional Physics Engine
    • Basic support for Bullet Physics. to be extended
  • Extendable controllers
  • Pre-defined lighting with shadows.
  • Material support
  • Clickable objects and virtual planes
  • Shader support
  • Basic GUI Support
    • Window
    • Panel
    • Button
    • EditBox (Multi-line support)
  • 3D File formats:
    • AWP3D Animated High-Poly 3D Object
    • Wavefront OBJ
    • Quake 2 MD2 with Animations
  • Mesh Generation Tools
    • Extrude Line in 3D
    • Rotate Line around an axis in 3D
    • Fill between lines
  • Mesh modifiers:
    • Merge Mesh
    • Subdivide Mesh
  • Extensive examples for every feature

Install

Requirements:

  • LibSDL2 sudo apt install libsdl2-dev for debian/ubuntu based linux distros. For other platforms, you can see your favourite package manager.
  • imagemagick sudo apt install imagemagick for debian/ubuntu based linux distros. For other platforms, you can see your favourite package manager.
  • Python 3.7+
  • A Graphics card that supports OpenGL 3.3+

Install using Pip:

From a bash terminal:

pip3 install payton

This should install all dependencies. If you get any permission errors, you are probably installing the library to system-global so missing some permissions. If you do not want to use pipenv or virtualenv, then you might want to run above command as sudo pip3 install payton

Optional Bullet Physics Integration

Payton supports Bullet Physics at a basic level for solid geometries.

pip3 install pybullet

Once bullet physics is successfully installed in the same environment as Payton, it will automatically be activated and you will be able to use basic properties of it. Check out the relevant examples.

Optional GTK3 Integration

Instead of SDL2, you can use GTK3 (along with all nice GTK3 widgets) with Payton. https://raw.githubusercontent.com/sinanislekdemir/payton/assets/assets/gtk3.jpg

You need to install Python GTK3 Bindings.

AWP3D Format and Exporter

AWP3D is simply a ZIP file with every frame as Wavefront object. To export your animated Blender objects, you can use the exporter add-on here:

https://github.com/sinanislekdemir/payton/tree/master/plugins/Blender%202.8-2.9

Using Payton with Anaconda

As of version 0.0.10, Payton is installable on Anaconda. From Anaconda Prompt:

pip install payton

Is sufficient to install Payton and it's dependencies on Anaconda.

Payton will be available to use with Spyder or JupyterLab on local.

Upgrade to the latest version:

Payton is under active maintenance. This means I am spending some time to fix the bugs or make it better. So you might want to upgrade it occasionally.

pip3 install payton --upgrade

should do the trick!

Getting Started

Your first code

from payton.scene import Scene

scene = Scene()
scene.run()

This will create your first empty scene and show it inside an SDL window.

Controls

Key / Action Description
Mouse Wheel Zoom In - Zoom Out
Right Mouse Button Drag Rotate Scene
Middle Mouse Button Drag Pan Scene
Escape Quit Simulation
C Change Camera Mode (Perspective / Orthographic)
Space UnPause / Pause Scene Clocks
G Show / Hide Grid
W Change Display Mode (Solid / Wireframe / Points)
F2 Previous Camera
F3 Next Camera
H Open / Close Help Window

Environment variables

Some options can be configured from the environment variables.

  • SDL_WINDOW_WIDTH: Set window width.
  • SDL_WINDOW_HEIGHT: Set window height.
  • GL_MULTISAMPLEBUFFERES: Set OpenGL multisample buffer count for antialiasing. (usually 1 or 2)
  • GL_MULTISAMPLESAMPLES: Set OpenGL multisample sampling count for antialiasing. (usually 1-16)

Without GL_MULTISAMPLEBUFFERS AND GL_MULTISAMPLESAMPLES, you may notice pixelated graphics. There is no default set for those values because they can vary between graphic cards.

Examples

Personally, I don’t really read the long descriptive documentation unless necessary. I like things simple and self-explaining. Therefore, instead of writing long documentations, I write simple examples to use each feature of Payton without digging much into the internals.

Examples can be downloaded from Payton Github Page.

You can either download the whole repository as a zip file or you can just git clone it.

Tested in Windows 10 Paperspace, seems to be working as expected https://user-images.githubusercontent.com/1842484/84317888-38767780-ab76-11ea-8337-a102d7c59275.png

Supports pyBullet solid geometry physics https://www.youtube.com/watch?v=Zt2vnUMLYVs

Example Index

Contribution

  • Please keep using type hints in the main library.
  • Type hinting can be ignored for examples.
  • Example codes should be plain and simple.
  • Every new features should include sensible defaults.
    • Nothing should be too verbose to use.
  • Make sure that make check is clear before pushing your code.
  • Running isort . is not mandatory but highly encouraged.
  • Ever new feature should have an example code.
  • There is a reason why some methods are longer than they should and complex.
    • To reduce code jumps and stack switches.
    • To run faster.

Screenshots and Videos

Examples Showcase:

https://github.com/sinanislekdemir/payton/blob/assets/assets/02.jpg?raw=true https://github.com/sinanislekdemir/payton/blob/assets/assets/04.jpg?raw=true https://github.com/sinanislekdemir/payton/blob/assets/assets/05.jpg?raw=true https://github.com/sinanislekdemir/payton/blob/assets/assets/11.jpg?raw=true https://github.com/sinanislekdemir/payton/blob/assets/assets/awp3d.jpg?raw=true https://github.com/sinanislekdemir/payton/blob/assets/assets/bullet.jpg?raw=true https://github.com/sinanislekdemir/payton/blob/assets/assets/day.jpg?raw=true https://github.com/sinanislekdemir/payton/blob/assets/assets/engrave.jpg?raw=true https://github.com/sinanislekdemir/payton/blob/assets/assets/explosion.jpg?raw=true https://github.com/sinanislekdemir/payton/blob/assets/assets/gui.jpg?raw=true https://github.com/sinanislekdemir/payton/blob/assets/assets/quake.jpg?raw=true https://github.com/sinanislekdemir/payton/blob/assets/assets/ripple.jpg?raw=true https://github.com/sinanislekdemir/payton/blob/assets/assets/spot.jpg?raw=true

Some free-thoughts and decisions:

I've choosen to use List[float] type for Vectors because:

  • I needed something mutable. Otherwise, the number of memory copy and swaps would be too much. So, I've crossed out Tuple and NamedTuple.
  • dataclass has an overhead to convert to C-type floats and arrays in memory.

So, to gain some performance, I have created the main library with a risk of non-strict vector lengths.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].