• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By Alexander Stopher
      Trying to get ideas here on how I could do this:
      I have created a game for a university coursework assignment using a custom game engine (internal to my university, but it's based on OpenGL).
      The game loads levels and menus from a file, this happens at initialization to increase performance while playing the game. At the moment the game loading time is 4.1s, but the loading time without the levels and menus is 0.961s- that's over 3s. As more levels are added the loading time will become longer and I want to add a loading screen.
      I've tried to add one, but loading the levels and menus is blocking everything else, including rendering the loading screen. This means that the loading screen doesn't appear until the game has loaded and is overridden by the main menu. The game loading is done via its update function and via calling initialization functions of the various game classes, and the loading screen is rendered within the game's render function (the rendering is done on a separate thread, according to the game engine's documentation).
      Any suggestions on how I can show the loading screen without the other loading activity blocking it from being shown?
      I know that I can use threading but am unsure how thread-safe the operation would be to init the game on another thread.
    • By AndyCo
      I`m looking for some project to boost up my portfolio, I`m not a pro but I`m not bad at all.
      Feel free to contact me.
    • By zfvesoljc
      I have a particle system with the following layout:
       system / emitter / particle
      particle is driven by particle data, which contains a range of over lifetime properties, where some can be random between two values or even two curves. to maintain a smooth evaluation between two ranges, i randomize a "lerp offset" on particle init and use that value when evaluating curves. the issue is that i'm using that same offset value for all properties (10ish) and as a result i'm seeing some patterns, which i'd like to remove. The obvious way is to just add more storage for floats, but i'd like to avoid that. The other way is to generate a seed of some sort and a random table, and use that to generate 10 values, ie: start with short/integer, mask it, then renormalize to float 0-1.
      any other ideas?
    • By lucky6969b
      I want to calculate the position of the camera, but I always get a vector of zeros.

      D3DXMATRIX viewMat; pDev->GetTransform(D3DTS_VIEW, &viewMat); D3DXMatrixInverse(&viewMat, NULL, &viewMat); D3DXVECTOR3 camPos(viewMat._41, viewMat._42, viewMat._43); log->Write( L"Camera Position: %f %f %f\n", camPos.x, camPos.y, camPos.z);

      Could anyone please shed some lights on this?
    • By bsudheer
      Leap Leap Leap! is a fast-paced, endless running game where you leap from rooftop to rooftop in a computer simulated world.

      This is a free run game and get excited by this fabulous computer simulated world of skyscrapers and surreal colors in parallax effect. On your way, collect cubes and revival points as many as you can to make a long run.

      Features of Leap Leap Leap:
      -Option of two themes: Black or White.
      -Simple one touch gameplay.
      -Attractive art.
      -Effective use of parallax.
      To Download the game:
      Playstore: https://play.google.com/store/apps/details?id=com.avakaigames.leap
      Appstore: https://itunes.apple.com/us/app/leap-leap-leap/id683764406?mt=8

  • Advertisement
  • Advertisement

3D How to find an article to make HDR ?

Recommended Posts

Hi !

Do you know a good article which explains how to make HDR ? ( on internet or in a book )

Especially, how have to be the colors values in the pass before the tone mapping pass.


Share this post

Link to post
Share on other sites
16 minutes ago, theScore said:

Hi !

Do you know a good article which explains how to make HDR ? ( on internet or in a book )

Especially, how have to be the colors values in the pass before the tone mapping pass.


What do you mean make HDR ? This does not make much sense as a question :)

Are you talking about turning on the HDR capability of modern UHD TVs ( and available with windows 10 creator update )

Are you talking about implementing a PBR  pipeline ?

The color before the tone mapping can be whatever you want, it is past the tone mapping, when you map the content to what the output expect that is important.

Before the Tonemapping, you usually store linear colors in an unclamp float format (like R11G11B10_FLOAT ), the color space primaries are either REC709/SRGB traditionally or REC2020 for the new HDR TVs with value from 0 to whatever you accumulate their.

After the tone mapping, you need to scale down things to the range the monitor accept, either it be [0..1] or [0..10000nits], with the proper encoding, SRGB or ST2084 for the display to be correct.

Share this post

Link to post
Share on other sites

By HDR, I mean the technique used with directx or opengl to enhance colors beauty for 3D rendering.

I heard that HDR stores colors much higher values than a 256 range, so you know can I get these values which at the origin are between 0.0 and 1.0 or 0 and 255 ?

Edited by theScore

Share this post

Link to post
Share on other sites

Yes, so does not make sense afterall :)

There is only two things to get the basics.


One, render to a surface that can represent values above one, like r11g11b11_float or r16g16b16a16_float.

Second, Apply tonemapping to compress the range back to 1 the simplest be "rgb/(rgb+1)"


That is all ! Then to looks good is all in details, pbr materials to looks good under various lighting condition and plausible, the choice of a brdf (usually ggx in game)and to be energy conservative, and do not screw up colorspace( albedo are srgb to be linearize, lighting in linear space, display go back to gammaspace srgb)

Share this post

Link to post
Share on other sites

Thanks for your advices :)

But I have few questions :

What do you mean by srgb to linearize ?

What do you mean by linear space for lighting ?

The third part between the parenthesises  : "display go back to gammaspace srgb"

And can you explain me what is the "rgb/rgb+1" in the phrase : "Apply tonemapping to compress the range back to 1 the simplest be "rgb/(rgb+1)"

What is it used for ? ( for the prvious question)

Share this post

Link to post
Share on other sites

Human eyes are more sensitive to low luminance, because of that, images are stored in gamma space or sRGB to give them enough bits in the dark area ( a 50% gray at 128 in your texture is in fact only 18% luminance in linear space). It means that when you read your albedo, you first need to convert it back to linear space, it is as simple as using a format for your texture view : DXGI_FORMAT_BC7_UNORM_SRGB versus DXGI_FORMAT_BC7_UNORM. The GPU will do the conversion for you, this is step one.

Step two, you are in linear space, and it is the correct one to accumulate lighting information ( also the proper space to do alpha blending ).

Step three if you were in a LDR pipeline ( so not our case ), the rendertarget is also a sRGB variant and the GPU do the opposite conversion for you. BUT, you want to do HDR, it means you do not have a sRGB variant format and that step is of your responsibility later !

Last step, now it is time to display your final image, you have linear space values in the range [0..infinity] and they need to map to [0..1] in gamma space, it is what your display understand. This is in two sub steps, first, the tone mapping pass, the formula rgb/(rgb+1) is called a tonemap operator. if you plot the curve, you will see the result is a compressed range of [0..infinity] scaled back to [0..1], it is what we need. Second substep, take the [0..1] range that is still in linear space to gamma space, either by applying the sRGB formula yourself or using a sRGB format variant to let the GPU do it fort you.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement