Coder Social home page Coder Social logo

boikki / oglrenderer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from panicarada/opengl-renderer-project

0.0 0.0 0.0 22.12 MB

License: GNU General Public License v3.0

Ruby 0.02% C++ 78.11% C 17.10% Objective-C 0.87% MATLAB 0.01% CSS 0.03% HTML 3.35% CMake 0.26% GLSL 0.26%

oglrenderer's Introduction

OpenGL-Renderer-Project

####实现功能

  • 基本体素(立方体、球、圆柱、圆锥、多面棱柱、多面棱台)的建模表达能力
  • Obj文件的导出和导出
  • 基本材质、纹理的显示和编辑能力
  • 基本几何变换功能(旋转、平移、缩放等)
  • Blinn-Phong光照模型,对点光源的编辑(位置、衰减度、亮度、添加、删除等等)
  • 阴影映射,基于Poisson Map随机采样点的PCF软阴影模型
  • 相机的漫游,FPS模式的镜头移动
  • 多种相机观察模式,相机的Zoom In/Out,Zoom to Fit以及Orbit观察模式
  • 屏幕截图保存

####渲染图示例

示例0

示例1

示例2

快捷键说明

快捷键 功能
W、S、A、D 相机前后左右移动
Space(空格键) 进入/退出相机的FPS模式(漫游模式)
Shift + O 进入/退出Orbit模式
双指在触摸板上滑/下滑 Zoom In / Zoom Out
双指在触摸板左滑/右滑 Orbit模式下相机在圆周上左右转动
鼠标移动 FPS模式下相机镜头的移动
TAB 恢复默认的Zoom状态
Shift + A 导出截图,路径在Export/Screenshots
Backspace 删除选中几何物体
Shift + Backspace 删除选中光源

图形界面说明

进入界面后,首先选择Scene进入主场景

导言区

光源/阴影区

光源区

add light:添加光源,在下面的列表中可以选择当前选中的光源。至多支持三个光源。

Light Color:光源颜色。

Light Position:光源在世界坐标系下坐标。

Light Brightness:光源亮度。

Light Attenuation:光源的衰减系数。

Shadow Sample Number:阴影采样点数目,样本点越多,阴影边缘软化的效果越好,但是计算负担也更大。

Shadow Sample Area:PCF阴影映射采样的面积范围。

几何区

几何区

add sphere / cube / cone / cylinder / prism:添加几何物体,默认位置都在相机的正前方。在Geometries列表中可以选择选中的几何物体。

Translation:几何物体的位置。

Rotation:几何物体关于三个轴的旋转角度。

Color:物体的颜色。

Material:物体的材质;Ambient、Diffuse、Specular分别指物体对环境光、满射光、反射光的响应颜色,Highlight表示物体的反光度。

Scale:物体的缩放程度。

纹理区

纹理1

纹理2

选中图片,为当前选中物体添加纹理。图片大小和格式不限,但是需要放在目录resource/Textures下面。其中.detach Texture指的是删除当前物体的纹理。

Scene区

Scene区

场景的保存和加载。场景文件的后缀是.zephyr,都放在目录Export/Scenes下面(保存时文件名字不必写后缀)。

Obj区

Obj区

导入的obj模型放在路径resource/Obj下,导入以后就可以当作普通的几何物体在几何区中进行操作。

Export Obj:将当前选中的几何物体导出为Obj文件,放在路径Export/Objects下(文件名字不必写后缀)。

oglrenderer's People

Contributors

panicarada 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.