Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Textures #8

Merged
merged 25 commits into from
Jul 8, 2019
Merged

Add support for Textures #8

merged 25 commits into from
Jul 8, 2019

Conversation

avik-pal
Copy link
Owner

@avik-pal avik-pal commented Jun 25, 2019

  • Removed the Surface Color based API for Materials. All necessary Information are now stored directly in the Material struct.
  • Removed Cylinder and Disc Objects.
  • The parser for the mtl and obj files are now much more robust. We try to handle inference directly here but it will fail in cases of mixed materials. This shall be handled in a future PR.

TODO

  • Performance check
  • Update Examples
  • Update Duckietown.jl to this new Material API
  • Update tests to the new API
  • Add documentation and a more verbose README

* Updated the Manifest files to use a particular commit of Zygote and
IRTools.
* All type inference issues for scenes containing only one type of
object has been fixed. Collection of different objects are not important
as we will use only triangle meshes in the future.
* Zygote backward pass is broken. Hence this branch needs to be
maintained separately until Zygote bugs are resolved.
@avik-pal
Copy link
Owner Author

tree2
With this PR we can render textures properly. Also, type inference has been improved but is not perfect.

@avik-pal avik-pal mentioned this pull request Jun 25, 2019
2 tasks
@codecov
Copy link

codecov bot commented Jun 25, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@6d6deb2). Click here to learn what that means.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master      #8   +/-   ##
========================================
  Coverage          ?   0.26%           
========================================
  Files             ?      18           
  Lines             ?     748           
  Branches          ?       0           
========================================
  Hits              ?       2           
  Misses            ?     746           
  Partials          ?       0
Impacted Files Coverage Δ
src/objects/sphere.jl 0% <ø> (ø)
src/optimize.jl 0% <ø> (ø)
src/RayTracer.jl 100% <ø> (ø)
src/imutils.jl 0% <0%> (ø)
src/objects/polygon_mesh.jl 0% <0%> (ø)
src/renderers/rasterizer.jl 0% <0%> (ø)
src/objects/triangle.jl 0% <0%> (ø)
src/materials.jl 0% <0%> (ø)
src/bvh.jl 0% <0%> (ø)
src/light.jl 0% <0%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d6deb2...bf87881. Read the comment docs.

@avik-pal
Copy link
Owner Author

avik-pal commented Jul 2, 2019

Rasterizer generates images which are far from realistic but is much faster. The below render takes 2.2s using raytracer but the rasterizer does it in 0.013s

raster

@avik-pal
Copy link
Owner Author

avik-pal commented Jul 8, 2019

I will go ahead and merge this once the CI passes. I will address the remaining issues in upcoming PRs because of the JuliaCon Paper submission and this PR in itself is quite big.

@avik-pal avik-pal marked this pull request as ready for review July 8, 2019 22:51
@avik-pal avik-pal merged commit 96f8ce3 into master Jul 8, 2019
@avik-pal avik-pal deleted the ap/texture branch August 9, 2019 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant