Giter Site home page Giter Site logo

project4-cuda-rasterizer's People

Contributors

kainino0x avatar likangning93 avatar pjcozzi avatar shrekshao avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

project4-cuda-rasterizer's Issues

Bug in glTF model loading

FYI: If I remembered correctly, I copied buffer data to device memory per node when traversing the node graph (in 1.0, a tree in 2.0). Buffer data should be copied to device only once for each bufferView.

Ready for Review

Hi @pjcozzi , @likangning93
Basically what I did is bringing in the tiny gltf loader, and adapt the pipeline for it. A test implementation can be found in this branch. And below is a test rendered image.

Some Issues

  • tinygltfloader currently seems to have some issues loading glTF models with hierarchy.
  • glTF has a big set of features which gives benefits for GL and data transfer. Yet in our low level cuda implementation, we can only take advantage of a small part of it.
    • dynamic data type (SHORT, FLOAT, etc) can not be defined as device pointer. (AFAIK) So things like glm::vec3 dev_pos still needs to be pre-defined. Our rasterizer is still glTF model specific
    • material has a lot of shader related parameters, which we cannot make most of.
    • our base code used to have only a buffer for vertex. Now glTF brings in the whole complexity of multiple bufferView and accessor. I think some knowledge of glTF is needed to write the vertex processing and primitive assembly (partly left bank for assignments), which can greatly confuse students ( I myself spend some time figuring out how to handle it ). But it can also be treated as a learning process to glTF format.
    • The pathTracer, I think will benefit even less from using glTF. I will vote for not using it in path tracer. But for WebGL project, I do think it is very beneficial.

Some updates for the assignment requirements

  • I put the mouse interaction into the base code, cuz I think this is less related.

Compiling errors when using the command

HI dear author,
It's truly a honor to write a letter to you, I'm building your project nowadays and found the error when building as following, I wonder if there is a chance that you know the reason? :)

image

thank you
best regards to you
William

Post-mortem

  • Decrease weight of Texture (maybe required) since it is much simplified with the new base code
  • Base code: use constant for vertex attribute buffers and materials
  • Rasterize Algorithm: Suggest starting with AABB, then Austin's scanline https://fgiesen.wordpress.com/2013/02/10/optimizing-the-basic-rasterizer/. I used this but turns out bad so I didn't recommend this, turns out mine is dumb and lack performance analysis
  • Subdivide rasterize megakernel to rasterize (depth test) and interpolation
  • Camera setup array and shortcut for performance analysis
  • default model to something if none is specified (simplifies grading)
  • rescale the ec points to 100%

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.