Skip to content

ruoshui-git/stuy-graphics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Final Project

Eternal Return of Fakemotion

Eternal Return of Fakemotion

  • Point light falloff

Eternal Return round 2

Eternal Return Round 2

  • 2 moving lights

Eternal Return round 3

Eternal Return Round 3

  • Weird Orbits

Also this

Eternal Return Bouncy

Changes

  1. Support customized specular hightlight (Ns). This is impl-ed as exponent in specular reflection calculation.
  2. Add more light attenuation functions (inv_sq, inv_linear)

Work 11 - Animation

3rd return of fakemotion

3rd return of fakemotion

Note on file name: "d" is for delay, "s" is for step

Changes

  1. add a default writer to Drawer to simplify drawing (maybe stdout?)
  2. add animation commands

Notes

  1. For me, the following command does not produce the correct result:
$ magick simple_100*.png -delay 1.7 img.gif

This seems to be the issue.

Solution: put -delay 1.7 before the src files:

$ magick -delay 1.7 simple_100-*.png img.gif

And the result image animates as expected.

My version of magick:

$ magick --version
Version: ImageMagick 7.0.10-28 Q16 x64 2020-08-16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 192628806
Features: Cipher DPC HDRI Modules OpenCL OpenMP(2.0)
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr lzma openexr pangocairo png ps raw rsvg tiff webp xml zlib
  1. Common material light parameters here

Todos

  1. possibly, refactor Matrix code into regular matrix and a Mat4 class

Work 10 - MDL

creepy donut

        location: Vec3(250., 400., 0.),

Light locations:

  • (250., 400., 0.) - bright yellow
  • (250., 100., 0.) - bright green
  • (250., 250., 0.) - bright blue

Uses nom (a parser combinator) to parse mdl file. Each line is parsed individually.

Changes

  • Add dependency on nom and thiserror crates
  • Refactor lights module
    • rename to "light"
    • separates original config into Light and LightProps (light properties of an object)
    • implement point lights

About

My graphics engine for mks66

Topics

Resources

Stars

Watchers

Forks

Languages