Jump to content

Custom post processing


photo

Recommended Posts

Posted

Hi,

We would like to setup some custom post processing to model some specific sensor effect.

I started to check post sensors from sample project, very nice effect, nearly full-filing our needs.
For example what we would need in addition, this is a sensor cooling / warm-up effect visible in form of an centered halo progressively opening.

Then, I follow tutorial on custom shaders, pretty much plug & play
https://developer.unigine.com/en/docs/2.7.3/code/uusl/create_post

You propose the UUSL (Unified UNIGINE Shader Language) to stay API agnostic.
Nice to implement this way, even if a bunch of macro is not always easy to read ;)

Finally, the question: would it be possible to get access to source code of post_sensor material?
Would it be even in UUSL implemented?
This way, we can pick some features / parameters from "post sensors" material and add our ones.

Thanks in advance.
Kind regards,
Charles

sensor-cooling-effect.png

sensor-base.png

Posted

Hello Charles,

Thanks, if you have any thoughts on how to improve this article feel free to share :)

20 hours ago, Lales.Charles said:

would it be possible to get access to source code of post_sensor material?

Have you checked core folder in the SDK?

These files are here: sdks\sim_windows_2.7.3.1\data\core\materials\default\sensor and here: sdks\sim_windows_2.7.2.1\data\core\shaders\screen_space

And yes, our shaders are written in UUSL.

Best regards,
Vsevolod

 

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

Hi,

Nop, but everything is right there, excellent ;)

Any suggestion? A wysiwyg editor to get your shader code depending on effect / post treatment you select
But just nice to have / not so serious.

Kind regards,
Charles

Posted

Hi,

Making some progress on this topic, here is one of the sensor effect we attempt to setup / tune with shaders.

Output of MWIR, LWIR and Average to separate color channel (Combined):
- MWIR: wavelength 3 – 5 µm
- LWIR: wavelength 8 – 12 µm

image.png.13fe5403c9a0a1c68fbf6e63374309da.png

So, from this original image..

image.png.80422fd675f845b33ee9a19b6f9e4898.png

... we'd like to setup

- MWIR -> Blue channel, with a set of visible objects
- LWIR -> Red channel, with another set of visible objects
- Average -> Green channel

image.png.530c043b5c5bb73208bbe9dc3091a6bb.png

To proceed with rendering pipeline, we see at least 2 approaches.
NB: viewport maybe not correct wording, since same position and camera work with bitmask filtering..
image.thumb.png.6ec7657babaa586f05332731fd738e58.png

We currently think approach 2 is suitable from performance point of view.
Would you have any recommendation / sample / feature in the box?

Kind regards,
Charles

Posted

Hi Charles,

Thanks again for a good diagram. Our render guys say that 2nd option is preferable due to a lesser number of draw calls. In the first one, you're performing 3 draw calls, in the second one only two, which is faster.

By the way, here are good slides on draw calls and optimization: https://developer.unigine.com/forum/topic/4746-low-fps-need-to-bring-more-fps-in-project/?do=findComment&comment=28317

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

  • 2 weeks later...
Posted

Hi,

Just trying to update to SDK 2.8, but up to now never get back post sensor properly working.. is it normal?
I migrated project... started new project... same result.
Selecting one camera setup with post material (from samples or custom made) simply render scene without (visible) post treatment...

Doc as Samples seems to be still work on going.. is it right?
Is there any thing to reactivate?
Is there smthg new coming soon?

Kind regards,
Charles

Posted (edited)

Hi,

Sounds great but on my machine behavior is weird..

On below screen shoot of fresh empty created project, just new camera added with post materials green -> nothing on screen.. but surprisingly thumbnail is green :-o 
With 2.7.3.1 never had such issue. Recompile / reload shaders done.
FYI -> NVIDIA Quadro P5200 / drivers 411.63

image.thumb.png.7b18e38c29876e1761a817ed87c3c19b.png

Kind regards,
Charles

Edited by Lales.Charles
Posted

Hi Charles,

Now I can see the issue, thanks for the screenshots. We are preparing maintenance 2.8.0.1 release with minor fixes and will include this one as well (ETA: this week).

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

Hi,

Good that you can figure out the issue with so few info.
Do you reproduce it?
Next week, ok we will wait..
By the way, my fault as well, I already detected it with the alpha, not taking time to report it..

Kind regards,
Charles

×
×
  • Create New...