Zethzer / GIRadianceRegressionFunction

Real-time rendering by a regression function
11 stars 7 forks source link

Load .pbrt file error #1

Closed xin-xinhanggao closed 6 years ago

xin-xinhanggao commented 6 years ago

After build AtlasEngineGI, I type the command ./AtlasEngineGI ./scenes/scene-minimale.pbrt

But get the load error info OpenGL version: 3.3 (Core Profile) Mesa 17.0.7 GLSL version: 3.30 Vendor: X.Org Renderer: Gallium 0.4 on AMD CAICOS (DRM 2.49.0 / 4.10.0-42-generic, LLVM 4.0.0) Scene file: ./scenes/cornell.mtl PBRTLOADER::ADDMODELS::ERROR Probleme lors de la lecture du fichier .pbrt

Oredon42 commented 6 years ago

Hello xin-xinhanggao, have you tried using absolute path instead of relative? File loading uses std::ifstream, which is OS dependent.

xin-xinhanggao commented 6 years ago

Thanks for your reply, now it can load the .pbrt file successfully. But the compile process of neural_network.comp raises an error, is it caused by my OpenGL version 3.3?

Oredon42 commented 6 years ago

Well unfortunately ... yes. Compute Shaders only work with GPU supporting OpenGL >= 4.3

xin-xinhanggao commented 6 years ago

Thanks for your reply!

xin-xinhanggao commented 6 years ago

image I am sorry to bother you again, now I use another card amd firepro d700 and successfully run the program. But still can not get the right answer.

The log info is

OpenGL version: 3.3.13416 Core Profile context FireGL 15.302.2301 GLSL version: 4.40 Vendor: ATI Technologies Inc Renderer: AMD FirePro W9100

And when I click the choice Bloom I get the error info

Gtk-CRITICAL ** IAgtkwidget__get_direction: assertion 'GTK_IS_WIDGET (widget)' failed

Oredon42 commented 6 years ago

Is it the output that you get before enabling Bloom?

The output of the Indirect lighting pass could be responsible for that. I would advice you to bypass it, by only displaying Direct lighting pass output. This should be possible by modifying the line 121 of the file atlaswidget.cpp:

Instead of: default_pipeline->setLastProcess(hdr_render_process); You have to write: default_pipeline->setLastProcess(lighting_render_process);

If it works, you should have the 3D scene displayed with only direct lighting. Then the problem would come from Indirect lighting.

The error you mention seems to come from Ubuntu and GTK+, as written in this thread: https://stackoverflow.com/questions/14606396/gtk-critical-ia-gtk-widget-style-get-assertion-gtk-is-widget-widget-fa Maybe the solution they give works... Anyway, the Bloom is not vital for the purpose of the project.

Finally, I want to warn you that this is our graduation project and it is far from perfection... We ran out of time, and we weren't able to test every case. We even couldn't validate the result we got, because we ran out of time for the training of the neural network. Anyway, I hope you'll find your happiness in this!

xin-xinhanggao commented 6 years ago

Thanks for your reply, I am an Undergraduate student now and willing to major in computer graphics. I used to implement the offline render without using OpenGL, this time I want to learn from your project to find how to implement direct lighting and indirect lighting with OpenGL.

I have modified the line 121 of the file atlaswidget.cpp as:

default_pipeline->setLastProcess(lighting_render_process);

But it seems that it still gets something wrong

image

Thanks for your help :)

Oredon42 commented 6 years ago

If you want to learn how to use OpenGL, then I think that you should look at tutorials. For instance, our engine was developed by consulting LearnOpenGL, which is a great website that gives details about every step of the development of an realtime rendering OpenGL engine. It will be more useful than trying to understand our engine, with it's lack of documentation, and mistakes that we surely made.

For indirect lighting, the algorithm implemented in our project is taken from a recent paper. It is an experimental way of handling indirect lighting, and needs heavy precomputations to train the neural network. Such a scheme is not a good way to handle indirect lighting yet, it has a lot of issues. If you want to know good algorithms to implement indirect lighting for realtime rendering, you should look at techniques used in current engines like the ones used in Unreal Engine (link).

xin-xinhanggao commented 6 years ago

Thanks for your advice and warm heart!