HDR Material saving and loading problem

Posted By: 3dworld

HDR Material saving and loading problem - 09/04/13 01:51

Hi there,

I have the following code in the main function of my project:
Code:
pp_add (mtl_hdr);



My problem is that every time I save and load the game the engine crashes.
I know that some PP Shaders don't survive the saving/loading process.
Can someone point me in the right direction on how to correctly disable this specific Shader during the saving process and load it back again after load the saved game.

Any help is greatly appreciated.
Thanks in advance.
Posted By: sivan

Re: HDR Material saving and loading problem - 09/04/13 07:14

it survives, use in this form:

Code:
mtl_hdr.skill1 = floatv(5);	// strength
					mtl_hdr.skill2 = floatv(35);	// treshold
					mtl_hdr.skill3 = floatv(0); 	// exposure compensation factor
					mtl_hdr.skill4 = floatv(1);	// time
					pp_set(camera,mtl_hdr);


I think pp_add only works if there was a pp_set before, but not sure...
Posted By: 3dworld

Re: HDR Material saving and loading problem - 09/04/13 16:27

Perfect. I'll try it as soon as I get home today and I'll let you know how it goes. Thank you.

PS: I tested pp_add without pp_set and it works fine laugh
Posted By: 3dworld

Re: HDR Material saving and loading problem - 09/04/13 22:28

Hi thanks,

Actually that works, the only issue that I'm having now is that when the game is loaded the screen goes white...I can see like if the hdr effect grows without stopping. Any ideas?
Posted By: sivan

Re: HDR Material saving and loading problem - 09/05/13 06:28

while it is loading, put up a loading panel, and hide it when level is fully ready.
Posted By: 3dworld

Re: HDR Material saving and loading problem - 09/05/13 23:08

Actually it happens after the level is loaded...no during the load process frown
Posted By: sivan

Re: HDR Material saving and loading problem - 09/06/13 06:46

probably you should tweak the hdr settings, or the level is too bright, I don't know...
Posted By: rayp

Re: HDR Material saving and loading problem - 09/06/13 06:51

You could edit the hdr effect directly in the mtlview.c ( or the file was called ). There must be a while. Maybe break this while before you save / load, so u can relaunch it after loading / saving.
Its not the best solution but i have done it this way and it seamed to work.

edit: And using -SV_INFO helped me too.
Posted By: 3dworld

Re: HDR Material saving and loading problem - 09/07/13 02:20

OK, I'll try and I'll let you know folks.

Thanks.
© 2024 lite-C Forums