Giter VIP home page Giter VIP logo

42cursus_04_minirt's Introduction

42cursus_04_miniRT

image

study about ray tracing

rt file format

common ground

Type mean
A ambient light - ratio color
L light position ratio color
C camera position normal vector fov
# comment - - -

mandatory

Figure position normal vector radius height color
pl βœ… βœ… - - 🎨
sp βœ… - βœ… - 🎨
cy βœ… βœ… βœ… βœ… 🎨

bonus

Type mean
R resolution width height -
tx texture texture id image map file path normal map file path
Figure position normal vector radius / theta height specular power checkerboard w,h color texture
pl βœ… βœ… - - πŸͺž β™Ÿ 🎨 tx id
sp βœ… - R - πŸͺž β™Ÿ 🎨 tx id
cy βœ… βœ… R βœ… πŸͺž β™Ÿ 🎨 tx id
con βœ… βœ… Th βœ… πŸͺž β™Ÿ 🎨 tx id

example

A  0.5   255,255,255
L  10,1,5   0.4   255,255,255
C  19.5,0,10   0,1,-1   40
# C  19.4,10,10   0,0,-1   40

# | position | normal vector | radius | height | color |
pl 0,0,0         0,0,1                           255,255,255
sp 18.8,10,0.6                  1.2              255,125,0
sp 20,10,0.6                    1.2              123,200,93
sp 21.2,10,0.6                  1.2              238,250,110
cy 17.6,10,1.3   0,0,-1         1.2      1.3     255,150,200
# bonus ex
R  800 800
A  0.5   255,255,255
L  10,1,5   0.4   255,255,255
C  20,0,10   0,1,-1   40
C  20,10,5   0,0,-1   80

tx	earth	scenes/textures/earth_no_clouds_8k.xpm		scenes/textures/earth_normal.xpm
tx	rock	scenes/textures/rock.xpm		scenes/textures/rock_normal.xpm

# |   position  | normal vector | r / th | height | spec power | checker w,h |    color     | texture |
pl   0,0,0          0,0,1                             100           0,0        255,255,255
sp   18.8,10,0.6                   1.2                100           0,0        255,125,0
sp   20,10,0.6                     1.2                100           0,0        123,200,93
sp   21.2,10,0.6                   1.2                100           0,0        238,250,110
cy   17.6,10,1.3    0,0,-1         1.2      1.3       100           0,0        255,150,200
con  22.3,10,1.3    0,0,-1         30       1.3       100           0,0        0,176,240

42cursus_04_minirt's People

Contributors

maindishes avatar zhy2on avatar

Watchers

 avatar

Forkers

maindishes

42cursus_04_minirt's Issues

Bonus

  • phong model
  • checkerboard
  • colored multi spot light
  • 2nd degree object: ex) cone
  • bump map(normal map) texture

error

  • cylinder 높이 λ†’μ•„μ§ˆ λ•Œ μ²΄μ»€λ³΄λ“œ λ…Έμ΄μ¦ˆ ν˜„μƒ
  • error 9.rtμ—μ„œ 카메라 λ³€κ²½ν•˜λ©΄ 싀린더, 콘 μœ„μΉ˜κ°€ 이상해짐
  • error 9.rtμ—μ„œ 콘 μœ„μ—μ„œ 보면 λ°”λ‹₯이 보여버림

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.