[Solved] How to Compensate the Tonemap and Emissive Sprites

Hello!

People i have the following difficult, i using the standard new game scene in my project. For all 3d models the illumination is perfect, but when i put my hud sprites in there, de color of sprites is darken then original.
Is there any way for me to compensate the effects of Tonemap and Gamma Correction only for HUD?

It’s possible create sprites with emissive lighting?

Hey there,

have you tried setting your sprite batch to additive blend mode? Might give you the desired effect.
If you blurr your sprites somewhat (photoshop) you get a nice shiny halo effect (of course not projected onto the 3d objects).
Also if you leave the sprite graphics white, you can easily try out different colors and transparency by simply changing the color in the draw sprite call.

Relating to the brightness created with the blur’s aid effect, it works perfectly in 3D environment! The technique to create it is simple:

  1. Select the image background.
  2. Delete the background image, but keep the selection.
  3. Apply the blur. The image will maintain the effect of brightness, but on a transparent background that can be drawing on a 3D environment! But to keep everything running in Engine, it is important to save the image to DDS. An interesting tip for those who want to do this is to use Paint.NET program, it works natively with DDS, and in addition has a specific tool for creation of light effects!

Now returning to the problem of color compensation, I have tried to increase the clarity of the sprites in the image editor, and had no significant effect. Even white sprites end up becoming into grey! There may be any way to draw the sprites outside the area affected by the post processing effects?

You should be able to rearrange your rendering queue to do that.
For example, you could add your post effects just to the 3d render camera by adding the effects renderer to your Layer 0. Following that, you can just add your sprite batch.
Of course you need to remove the effect from the master queue to not have them applied twice on top of it all.

Adding your render effect:

I am not familiar enough with the studio, but you can then add a sprite batch in a script with an init like so:

var scene = SceneSystem.SceneInstance.Scene;
 var compositor = ((SceneGraphicsCompositorLayers)scene.Settings.GraphicsCompositor);
 compositor.Layers[0].Renderers.Insert(3, _delegateRenderer = new SceneDelegateRenderer(YourRenderMethod));

Change the insert index according to your layer queue.

You also need a sprite batch like so:

var virtualResolution = new Vector3(GraphicsDevice.BackBuffer.Width, GraphicsDevice.BackBuffer.Height, 1f);
 _spriteBatch = new SpriteBatch(GraphicsDevice) { VirtualResolution = virtualResolution };

And here you draw your hud sprite, change the batch and draw parameters according to your needs:

   public void YourRenderMethod(RenderContext context, RenderFrame frame)
    {
        var graphicsDevice = context.GraphicsDevice;
   _spriteBatch.Begin(SpriteSortMode.FrontToBack, graphicsDevice.BlendStates.Additive, graphicsDevice.SamplerStates.PointClamp, graphicsDevice.DepthStencilStates.None);
        _spriteBatch.Draw(yourTexture, location, color etc. ...);
        _spriteBatch.End();
    }

I am pretty sure there are simpler and other ways, I am in no way an expert, but this is just what works for me.

Thank you seven!!!

I have not used your solution, but I used your logic! If what I did was change the HUD entity for the Group 1, then I modified the culling of Render Camera not draw stuff in Group 1, and then created a new camera render in Master, above the render effect, and modified the culling ONLY to draw things in group 1!

Result! It worked!

1 Like

Did the same just a moment before visit forum. :blush:

1 Like

Although the great difficult, it’s also very exciting to be among the first people are using the Paradox engine! We are literally breaking the code, discovering things because they were even still in the documentation! One day when the Paradox make successful, it will be the most entres experienced and veteran in the use of eninge!