realtime fire and ice

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 20, 2012 at 06:32

blue ambient occlusion + red direct light + orangish material.

looks pretty cool to me, now ive just got to finish the modeller and get a whole fire+ice city happening. :)

shotx.png

60 Replies

Please log in or register to post a reply.

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 20, 2012 at 06:48

fps view
shot1u.png

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 20, 2012 at 07:25

changed the material colour to bright yellow
shot2v.png

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 20, 2012 at 09:51
88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 21, 2012 at 00:25

Looks really neat, but, it seems that there is something missing or not right, and I just can’t see what, and I’ve been looking at your screen shots for 30 mins! It’s driving me crazy :wacko:

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 21, 2012 at 01:37

thanks man.
hmm, maybe a texture - a bit more detail?

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 21, 2012 at 04:23

heres with a concrete texture.
shot8.png
shot9n.png

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 21, 2012 at 06:11

got the blue balance a little more correct…
shot10k.png

820ce9018b365a6aeba6e23847f17eda
0
geon 101 May 21, 2012 at 10:21

Yes, the white-balance is definitely helping.

Remember, that while the blue light of the sky makes the shadows blue, the effect can also be contributed to the eye/brain, which is doing it’s own white balancing. The result is that a perfectly gray surface will look blue next to an orange surface.

5000fdaaeeeb9f038be93cf67eb3b130
0
David_Gallagher 102 May 21, 2012 at 12:06

i really like the style of your environemnts, really interesting! i might get my feet stuck in those grates though :) looks great.

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 21, 2012 at 17:25

@rouncer

thanks man.
hmm, maybe a texture - a bit more detail?

No, I think it’s the sun, not bright enough. Looks like the sun is filtered through heavy smoke, but there is no smoke in the scene. Can you try with more intensity for the sun see what you get?

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 21, 2012 at 19:34

hmm… what could fix that is a radiosity implementation, where the light bounces on a wall and then back onto the direct light again, producing glow… im not sure how id do that just with this little ambient occlusion system.

54e97bcc4e4a2fc8f5f05594afd1683a
0
Gnarlyman 101 May 21, 2012 at 20:17

What software is being used here? Looks quite interesting.

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 21, 2012 at 20:20

3dcoat (modelling application) visual studio c++ (ide) direct x 11 (api)

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 21, 2012 at 21:46

@rouncer

hmm… what could fix that is a radiosity implementation, where the light bounces on a wall and then back onto the direct light again, producing glow… im not sure how id do that just with this little ambient occlusion system.

Darken your AO and then brighten the whole thing this should make the non-shadowed area stand out more.

Do you use some kind of tone mapping like the Reinhard’s tone mapping operator or something?

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 21, 2012 at 23:02

Here’s somehting I did. AO and Sun. Each AO samples gets more blueish and darker as the distance gets shorter. No bounces.

59340740.jpg

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 May 21, 2012 at 23:15

Very cool! Although I think the sun could still be brighter, and a blue sky would help “sell” the whole thing as well. :)

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 22, 2012 at 09:24

hey alienizer, nice work there, thanks for the input.
could you explain tone mapping to me? im not familiar with the term!

B5262118b588a5a420230bfbef4a2cdf
0
Stainless 151 May 22, 2012 at 09:33

Can you drop a backdrop in? A sky sphere or even a 2d bitmap.

It’s really difficult to get a feel for the lighting when floating in a void.

I really like the little details in the mesh, but the lighting just feels … I don’t know if there is a word for it … flat maybe, or woolly.

It’s nice, don’t get me wrong.

Games coding is half artistic expression and half science, so feel free to tell me to Foxtrot Oscar if it’s looking great to you, but to me it’s just not quite ‘right’.

A backdrop might help to get a better impression of what it would look like in a game.

820ce9018b365a6aeba6e23847f17eda
0
geon 101 May 22, 2012 at 13:52

@rouncer

hey alienizer, nice work there, thanks for the input.
could you explain tone mapping to me? im not familiar with the term!

http://freespace.virgin.net/hugo.elias/graphics/x_posure.htm

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 22, 2012 at 15:36

@rouncer

hey alienizer, nice work there, thanks for the input.
could you explain tone mapping to me? im not familiar with the term!

http://expf.wordpress.com/2010/05/04/reinhards_tone_mapping_operator/

The one from Geon is a must as well.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 May 22, 2012 at 16:26

IMO the best tonemapping algorithm for games currently is Jim Hejl’s curve, as reported in John Hable’s talk about Uncharted 2. The equation is on slide 140 of this presentation. It’s quite simple and has no adjustable parameters (you for sure want to incorporate an adjustable exposure and maybe contrast before applying this equation), but it looks very nice, especially once you have a proper HDR value range in your scenes. BTW, that whole presentation is well worth a read; it’s a very good general introduction to the issues of gamma correction, linear-color-space lighting, HDR and tonemapping…every graphics programmer should know these things. :)

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 23, 2012 at 15:34

hmmm, I used the code on page 137 and everything is light gray with a bit of shades!!?? looks like a bad ambient occlussion. Seems to simple the code, am I missing something?

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 May 23, 2012 at 18:12

I said page 140, not 137. :) The stuff from page 137 was an older version that used lookup textures that you have to initialize with some filmic curve. Just apply the equation from 140 (to each RGB channel independently). Again, that must be applied to linear HDR color values after scaling by exposure. And it incorporates the linear-to-gamma conversion, so it generates an sRGB output color.

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 24, 2012 at 02:53

Indeed you said 140, but stupid me I had to stop at the first equation page :blink:

I don’t understand the LinearColor-0.004 thing. I mean, does LinearColor is the actual color output from the render, or does it need to be LinearColor = Color/(Color+1) or something?

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 24, 2012 at 04:09

better? (note theres no tone mapping, just adjusted light levels.)
shot11.png

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 24, 2012 at 04:49

YES, much better! Now the sun starts to feel HOT :)
A little brighter maybe?

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 May 24, 2012 at 04:54

LinearColor is just the linear-color-space, HDR color value output from the renderer.

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 24, 2012 at 05:58

too bright?
shot12.png

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 24, 2012 at 07:13

this seems to be the happy medium.
shot13.png

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 24, 2012 at 09:26

more modelling…
shot15y.png
shot16.png

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 24, 2012 at 11:36

this areas done… :)
shot19.png
shot20.png

B5262118b588a5a420230bfbef4a2cdf
0
Stainless 151 May 24, 2012 at 13:23

That looks 100% right to me :)

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 24, 2012 at 13:48

thanks Stainless!
just to polish it off, tiny little bumps on the surface.
shot23d.png
shot24.png

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 24, 2012 at 14:08

Looks perfect to me now. Great job on the lighting! First one, yes, too bright.

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 24, 2012 at 14:12

@Reedbeta

LinearColor is just the linear-color-space, HDR color value output from the renderer.

ok, so the equation wants LinearColor, not the color from the render. So how does this work then??

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 24, 2012 at 14:29

thanks alienizer, getting the balance between the ambient light and the direct light seems to be the trick.

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 24, 2012 at 15:53

@rouncer

thanks alienizer, getting the balance between the ambient light and the direct light seems to be the trick.

It looks fantastic now. I can just imagine when you’ll put some monsters :lol: and stuff, and a background how nice it’ll look! Are you working on a game or just for pleasure?

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 May 24, 2012 at 16:47

@Alienizer

ok, so the equation wants LinearColor, not the color from the render. So how does this work then??

Read the rest of that presentation.

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 24, 2012 at 17:56

@Reedbeta

Read the rest of that presentation.

I did, but it still isn’t looking right, everything is dull. I just don’t understand it. I even tried the codes from http://filmicgames.com/archives/75 and still isn’t right. My render material colors are between o and 1, but lights hiting a surface will go way above 1, so the final render data is >= 0 <=(all lights power added up) Could that be the problem?

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 May 24, 2012 at 18:04

That’s HDR. The HDR color will have an arbitrary range, but after tonemapping it will be back in the 0-1 range.

820ce9018b365a6aeba6e23847f17eda
0
geon 101 May 24, 2012 at 18:47

Rouncer: Your latest shots look great!

Try experimenting with the angle of the direct light as well. For a lower angle (sun closer to the horizon) you need a stronger tint to the colors, and a less bright light. The long shadows, in combination with the orange light and bluish shadows can be very convincing.

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 24, 2012 at 19:14

@Reedbeta

That’s HDR. The HDR color will have an arbitrary range, but after tonemapping it will be back in the 0-1 range.

I figure that’s what will happen since I use Reinhard’s and it works fine.

Take this code from the link…

float A = 0.15;
float B = 0.50;
float C = 0.10;
float D = 0.20;
float E = 0.02;
float F = 0.30;
float W = 11.2;
float3 Uncharted2Tonemap(float3 x)
{
  return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;
}
float4 ps_main( float2 texCoord  : TEXCOORD0 ) : COLOR
{
  float3 texColor = tex2D(Texture0, texCoord );
  texColor *= 16;  // Hardcoded Exposure Adjustment
  float ExposureBias = 2.0f;
  float3 curr = Uncharted2Tonemap(ExposureBias*texColor);
  float3 whiteScale = 1.0f/Uncharted2Tonemap(W);
  float3 color = curr*whiteScale;
  float3 retColor = pow(color,1/2.2);
  return float4(retColor,1);
}

Is texColor the HDR color from the render? If so, then it doesn’t work for me!!!

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 25, 2012 at 02:07

thanks for the input Geon, yeh this turned out better than I expected, I guess I should add monsters now like Alienizer said… make a little fps thing with it :)

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 25, 2012 at 22:41

@rouncer

thanks for the input Geon, yeh this turned out better than I expected, I guess I should add monsters now like Alienizer said… make a little fps thing with it :)

Care to post a new screen shot?

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 May 26, 2012 at 02:24

Havent added monsters yet, its not a game at this stage, got a whole load of cleaning up to do.

but ive added a skybox.
shot29.png

ive got to improve the fps, ive been lazy up till now, its only running at about 15 fps, but i havent added vsd culling yet, im just doing that.

[EDIT] ive added vsd, but looks like ill have to put all the instances in an octree for maximum world size. [/EDIT]
what do you think I should do with it? what does it look like to you? :)

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 26, 2012 at 03:47

WOW, that looks awesome! Shadows could be just a little darker for better contrast (icy). But your sun (fire) is perfect to me. Love the sky too, it adds so much more realism.

ok, because of the sky and no visible ground, it looks like a flying machine, spaceship or something like that, where we see (somewhat) the exterior of the hull. Without the sky, then I wouldn’t have a clue of what it would be.

What’s the red stuff anyway? Blood?

You are doing a remarkable job!

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 May 26, 2012 at 03:51

oh, and to answer your first question, I think you should expand on it, get your imagination going and eventually, it’ll click, and you’ll get something out of this world. You seem very talented.

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 Jun 04, 2012 at 03:37

Rouncer, hows your project going? Any new screen shots for us :)

B20d81438814b6ba7da7ff8eb502d039
0
Vilem_Otte 117 Jun 05, 2012 at 00:31

Wow! Looks very good…

As for optimization - I don’t know what kind of renderer you’re actually using. I could try some BVH instead of Octree (it brings better results). Also if you’re using rasterizer - some Hierarchical Z-buffer occlusion culling might help a bit (or a lot - it really depends) - generally try frustum culling + occlusion culling.

Also if you’re drawing object instances - draw them as instances (not each one separately) - this can give you also some little boost. Then start profiling - see which parts are slow, which are fast - try to fasten slow ones (if possible). At last give option to turn off shadow, use less expensive lighting, etc.

And the light actually looks quite good - but it really miss some good global ambient occlusion (pre-computing it? dynamically computing it is quite heavy). But thanks for showing the work, it inspires me more and more to finish actual demo-version of our current project and release it for public :)

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 Jun 05, 2012 at 03:55

Here is a screen shot of what I’m working on right now. What do you guys think of how it looks?

germanbunker.png

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 Jun 05, 2012 at 05:58

Looking good alienizer, as for my project im probably going to discontinue it and move onto voxels maybe, im not sure.

That tank looks amazing, love it.

820ce9018b365a6aeba6e23847f17eda
0
geon 101 Jun 05, 2012 at 12:56

@Alienizer

Here is a screen shot of what I’m working on right now. What do you guys think of how it looks?

It looks great!

Other than the ground and the edge where the fortress meets the ground, it is near photo-realistic.

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 Jun 05, 2012 at 16:45

@rouncer

Looking good alienizer, as for my project im probably going to discontinue it and move onto voxels maybe, im not sure. That tank looks amazing, love it.

Here’s something you may like about voxels…

http://mrdoob.com/projects/voxels/

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 Jun 05, 2012 at 16:47

@geon

It looks great! Other than the ground and the edge where the fortress meets the ground, it is near photo-realistic.

Thanks! :) What do you think I should do about the edge where the fortress meets the ground??

820ce9018b365a6aeba6e23847f17eda
0
geon 101 Jun 05, 2012 at 20:57

@Alienizer

Thanks! :) What do you think I should do about the edge where the fortress meets the ground??

I’m guessing you use baked AO on the tank? The corner formed by the ground and wall should have some AO as well. Some grass growing out of the corned would help too.

About the ground itself, the texture looks weird. Is it dried an crackled clay? Maybe another texture with some pepples and rocks with parallax mapping, combined with some matching boulder models would help. A few dried trees, etc. would be nice too.

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 Jun 06, 2012 at 14:56

Yes, I use baked AO, and the gound is (suppose to be) as you said. I’ll try to add more as you said. Thank for your comment Geon.

B20d81438814b6ba7da7ff8eb502d039
0
Vilem_Otte 117 Jun 06, 2012 at 16:56

It actually doesn’t look that bad…

the tank is awesome :P - you did all the graphics, or hired a graphics guy?
the bunker looks very good.
the terrain looks like - “I needed some terrain to work with it, I’ll work on it later” - definitely not a problem at current stage ;)

And now my question - the shadows look good - does the app use some kind of PCSS or mip-maps, or? B)

Naaah :lol: - i’d love to show some current stuff right now (as shameless self-promotion :D), but I just don’t have graphics ready right now (don’t worry, graphics guys are hired (hooray … at least 3 times) :P and so far i’ll definitely have good stuff to show - not just from technical side)

820ce9018b365a6aeba6e23847f17eda
0
geon 101 Jun 06, 2012 at 17:22

@Vilem Otte

the terrain looks like - “I needed some terrain to work with it, I’ll work on it later” - definitely not a problem at current stage ;)

Spot on.

The ground texture is great, but doesn’t work well to cover 100% of the ground. (No texture would.) It would be perfect for place where dried, crackled clay would make sense, like a dried river bed.

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 Jun 06, 2012 at 18:05

@Vilem Otte

It actually doesn’t look that bad…

the tank is awesome :P - you did all the graphics, or hired a graphics guy?
the bunker looks very good.
the terrain looks like - “I needed some terrain to work with it, I’ll work on it later” - definitely not a problem at current stage ;)

And now my question - the shadows look good - does the app use some kind of PCSS or mip-maps, or? B)

Naaah :lol: - i’d love to show some current stuff right now (as shameless self-promotion :D), but I just don’t have graphics ready right now (don’t worry, graphics guys are hired (hooray … at least 3 times) :P and so far i’ll definitely have good stuff to show - not just from technical side)

Thanks! No, I didn’t make it. Someone else did :mellow:

The shadows, well, it’s kinda based on AO and PCF and something else I’ve been working on for a long time. Don’t know how to call it, but it’s not standard or anything from books. It’s my own creation. Works good, but slows thing down too much, and I’m trying to speed it up.

You must have something to show us don’t you \^_\^

88dc730f0f71e55be39de0ad103bd9ff
0
Alienizer 109 Jun 06, 2012 at 18:07

@geon

Spot on. The ground texture is great, but doesn’t work well to cover 100% of the ground. (No texture would.) It would be perfect for place where dried, crackled clay would make sense, like a dried river bed.

I see what you mean. I like the idea of the dried river, that would look great with that texture. But for the rest, what do you suggest? Sand? not grass right!