GithubHelp home page GithubHelp logo

seeing3d's Introduction

seeing3d

Dependencies

Rendering models

The main script to render your models into 2D images is render.py. The usage syntax is:

render.py [-h] [--mode {rgb,depth,normals}] [--win-size WIN_SIZE]
                 [--focal-length-in FOCAL_LENGTH_IN] [--rho-in RHO_IN]
                 [--phi-deg PHI_DEG] [--theta-delta-deg THETA_DELTA_DEG]
                 [--mkdir] [--clear-cache] [--wrl]
                 MODEL_DIR OUTPUT_DIR

Render 3D models to images

positional arguments:
  MODEL_DIR             Base path of model
  OUTPUT_DIR            Model id/directory

optional arguments:
  -h, --help            show this help message and exit
  --mode {rgb,depth,normals}
  --win-size WIN_SIZE   output window size
  --focal-length-in FOCAL_LENGTH_IN
  --rho-in RHO_IN       rho (distance from camera) in inches
  --phi-deg PHI_DEG     phi/pitch in degrees
  --theta-delta-deg THETA_DELTA_DEG
                        theta/yaw increments in degrees
  --mkdir
  --clear-cache
  --wrl                 Use .wrl model. Note: this has no texture

For example,

~/render.py ~/chairs/1028b32dc1873c2afe26a3ac360dbd4 ~/tmp_renders

would use the default parameters to render 64 RGB views of the model in directory ~/chairs/1028b32dc1873c2afe26a3ac360dbd4 as a sequence of files in tmp_renders. Note that you will see an empty window pop up, which is a side-effect of the rendering process.

For a visualization of the phi, theta and rho parameters see the following figure:

Camera and model

How does rendering work?

Conceptually, we set up the scene (including camera, model and lighting), render the output into a buffer, and save this buffer into a .png file. In practice, this involves setting various obscure options in Panda and extreme care in the format of the Collada model. Unfortunately, libraries to load 3D models tend to not be very robust.

You are encouraged to examine and improve the code.

TODO

  • Warehouse 3D markup changed, breaking scraper.

seeing3d's People

Contributors

dimatura avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.