Giter VIP home page Giter VIP logo

image-renderer's People

Contributors

ngrlcu avatar teozec avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

tiberiog

image-renderer's Issues

`hdr-image.cpp:26:10: fatal error: 'gd.h' file not found` on OpenBSD 6.9

I'm trying to compile v0.1.0 on OpenBSD 6.9-current. libgd is installed on my system but I get this error invoking make:

/home/savo/Downloads/image-renderer-0.1.0/src/hdr-image.cpp:26:10: fatal error: 'gd.h' file not found
#include <gd.h>
         ^~~~~~
1 error generated.
*** Error 1 in . (CMakeFiles/trace.dir/build.make:95 'CMakeFiles/trace.dir/src/hdr-image.cpp.o': /usr/bin/c++  -I/home/savo/Downloads/image-...)
*** Error 2 in . (CMakeFiles/Makefile2:182 'CMakeFiles/trace.dir/all': make -s -f CMakeFiles/trace.dir/build.make CMakeFiles/trace.dir/build...)
*** Error 2 in /home/savo/Downloads/image-renderer-0.1.0/build (Makefile:114 'all': make -s -f CMakeFiles/Makefile2 all)

cmake output:

17:01:50 /home/savo/Downloads/image-renderer-0.1.0/build > cmake ..
-- The CXX compiler identification is Clang 10.0.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/savo/Downloads/image-renderer-0.1.0/build

You can see that cmake exits without errors. I can make things work invoking cmake in this way:

cmake -DCMAKE_CXX_FLAGS="-I /usr/local/include/" -DCMAKE_EXE_LINKER_FLAGS="-L /usr/local/lib/" ..

but I find strange that simply running cmake .. does not produce any errors and the make step fails.

Some information about my setup:

16:40:25 /home/savo/Downloads/image-renderer-0.1.0/build > uname -a
OpenBSD euler.localdomain 6.9 GENERIC.MP#475 amd64

16:55:16 /home/savo/Downloads/image-renderer-0.1.0/build > c++ --version
OpenBSD clang version 10.0.1
Target: amd64-unknown-openbsd6.9
Thread model: posix
InstalledDir: /usr/bin

16:55:50 /home/savo/Downloads/image-renderer-0.1.0/build > ld --version
LLD 10.0.1 (compatible with GNU linkers)

16:51:06 /home/savo/Downloads/image-renderer-0.1.0/build > cmake --version
cmake version 3.19.4
 
CMake suite maintained and supported by Kitware (kitware.com/cmake).

16:55:06 /home/savo/Downloads/image-renderer-0.1.0/build > pkg_info | grep gd-
gd-2.3.2            library for dynamic creation of images

16:57:48 /home/savo/Downloads/image-renderer-0.1.0/build > pkg_info -L gd
Information for inst:gd-2.3.2

Files:
/usr/local/bin/annotate
/usr/local/bin/bdftogd
/usr/local/bin/gd2copypal
/usr/local/bin/gd2togif
/usr/local/bin/gd2topng
/usr/local/bin/gdcmpgif
/usr/local/bin/gdparttopng
/usr/local/bin/gdtopng
/usr/local/bin/giftogd2
/usr/local/bin/pngtogd
/usr/local/bin/pngtogd2
/usr/local/bin/webpng
/usr/local/include/entities.h
/usr/local/include/gd.h
/usr/local/include/gd_color_map.h
/usr/local/include/gd_errors.h
/usr/local/include/gd_io.h
/usr/local/include/gdcache.h
/usr/local/include/gdfontg.h
/usr/local/include/gdfontl.h
/usr/local/include/gdfontmb.h
/usr/local/include/gdfonts.h
/usr/local/include/gdfontt.h
/usr/local/include/gdfx.h
/usr/local/include/gdpp.h
/usr/local/lib/libgd.a
/usr/local/lib/libgd.so.22.2
/usr/local/lib/pkgconfig/gdlib.pc
/usr/local/share/doc/gd/INSTALL
/usr/local/share/doc/gd/README.CMAKE
/usr/local/share/doc/gd/README.JPN
/usr/local/share/doc/gd/README.TESTING
/usr/local/share/doc/gd/README.TXT
/usr/local/share/doc/gd/arc.c
/usr/local/share/doc/gd/copyrotated.c
/usr/local/share/doc/gd/crop.c
/usr/local/share/doc/gd/flip.c
/usr/local/share/doc/gd/gif.c
/usr/local/share/doc/gd/nnquant.c
/usr/local/share/doc/gd/noIcon.pic
/usr/local/share/doc/gd/noIcon.sgi
/usr/local/share/doc/gd/noIcon.tga
/usr/local/share/doc/gd/noIconAlpha.tga
/usr/local/share/doc/gd/test_crop_threshold.png
/usr/local/share/doc/gd/tgaread.c
/usr/local/share/doc/gd/tiffread.c
/usr/local/share/doc/gd/windows.c

Thank you for your help!

Image is rendered weirdly when not using Russian roulette

When using a PathTracer with minDepth > maxDepth (i.e. without using the Russian roulette algorithm), all the materials seem to reflect instead of diffusing rays. I suspect this can be due to the BRDF::scatterRay() method, which we currently do not test.

Image with Russian roulette:
33

Image without Russian roulette:
34

Rotations in scenefile accept angles in radians instead of degrees

I think it is more intuitive to use degrees instead of radians for rotations in scenefiles, but right now it is not like this:

Box rotated by 45 (should be degrees, but are actually radians, equal to 58.31 deg)
renderDeg

Box rotated by 0,785398 (equivalent to 45 degrees)
renderRad

Weird behaviour of shapes

Shapes have some problems: planes seem to be placed in wrong positions, and spheres seem to return the wrong intersection t.

Wrong aspect ratio

Sometimes, the images are generated with the wrong aspect ratio: for example, this 300x200 render of a sphere.

demo

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.