BASIC

Author Topic: 3D shading and environment test  (Read 15742 times)

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1539
    • View Profile
3D shading and environment test
« on: 2012-Jul-28 »
<a href="http://www.youtube.com/watch?v=5k2FRHlL5tI" target="_blank">http://www.youtube.com/watch?v=5k2FRHlL5tI</a>
 :good:

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4128
    • View Profile
    • Portfolio
Re: 3D shading and environment test
« Reply #1 on: 2012-Jul-28 »
hmmm, I think I have been to this place before...maybe it was on a dream? ;)

Looks good, the fog and the player light source+shadows.

I kind of see an attempt on a normal map too but it is not producing the supposed result.
Am I correct? Maybe adding some bump to the walls would help the felling of 3d.

Overall, it´s looking great! :good:


Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1539
    • View Profile
Re: 3D shading and environment test
« Reply #2 on: 2012-Jul-28 »
Oh yes, thanks erico... this is a multi-player test arena but only trailing the environment now, especially getting shadows to works correctly for multiple walls and multiple player spot lights (not shown), but more about players later. I'm still trying to get to a nice stage where you can server it on your server again. ;) There is currently a bump map but I don't know if I created it correctly (invert and grayscale from original) and I don't think that it does look right. Note the first half of the video is in Lo-res 30fps camera and the second half of video is hi-res 15fps screen caps. So now I'm waiting on mentalthink for that as he is kindly helping with some of the graphics. At the moment I am focused on map generation designs and algorithms rather than manually mapped arenas and fixed textures.

Generally, these sort of trials leads to ideas of games, such as the short distance dark areas reminds me of Doom 3, but that is not the aim for now because ultimately the lighting environment is just a visual enhancement rather than part of the main game-play but the graphics stuff give me a break from the comms stuff.  :whistle: Casually, I suppose this is a start to documenting this open project, which the source code is available on request. As it is a multi-player game, more that one is required to test and create for these types of projects.
« Last Edit: 2012-Jul-28 by matchy »

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3338
  • Integrated Brain
    • View Profile
Re: 3D shading and environment test
« Reply #3 on: 2012-Jul-28 »
Very Nice!!!, don´t worry about more stuff I do something more... About the BumpMapping... I think the best way it´s not use the black and white tones images... I think it´s better make another image diferent to diffuse map...

I love this lighting... it´s very very dark feeling... some extrange sounds... can be look nice nice!!!

Very good Job.. I like a lot!!!

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1539
    • View Profile
Re: 3D shading and environment test
« Reply #4 on: 2012-Jul-28 »
Yeah cool MT... background sounds would suit well and it would be easy to go for the spooky approach in theme. :good: :good:

Here's the texture and bump (size reduced) that is used.



[attachment deleted by admin]
« Last Edit: 2012-Jul-29 by matchy »

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4128
    • View Profile
    • Portfolio
Re: 3D shading and environment test
« Reply #5 on: 2012-Jul-29 »
But isen´t the black and white image the correct stuff for the bump?

I never tried bump map on glbasic, but on the demos it seemed to work fine on the black and white picture as it should.
Could it be that the shadow mode is cancelling the bump?

edit: oh, I see those bumps now, they should produce the effect.
Overall, really great textures and set of colors! :good:
Maybe level up those bumps to see if it makes any difference?

edit2: specular highlights could be key to show up on them, specially as they are metal and should have a high specular level.

edit3: are those black and white real bump images? or inverted desaturated images?
« Last Edit: 2012-Jul-29 by erico »

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3338
  • Integrated Brain
    • View Profile
Re: 3D shading and environment test
« Reply #6 on: 2012-Jul-29 »
@erico, about the bump... I do sometimes another texture not excatly the same, for put scractch and dust and all this details... About the specular, this can be great... I have to study how do it whit OpenGlES 1.0, in OpenGL standard, in a PC I think can´t be too much trouble...

@Matchy, about the sounds I send a couple of sound from a library adquired someweeks ago, very very impresive sounds, after you can chosse a program like Music Maker, for add amd make ambiental extrange sounds, it´s have a strange synthetizer automatizated and very easy to use...

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1539
    • View Profile
Re: 3D shading and environment test
« Reply #7 on: 2012-Jul-29 »
erico, that bump map was hand made by me by guessing invert, grayscale, auto-contrast but I haven't really got back into bump and sphere mapping in GLB lately. So I'll experiment with those also but a shiny metallic painted wall effect I'll might try for.

mentalthink, the sounds effects would be great although I wish to use sfxr. Ultimately with all initial media, everything will be preferably produced by pure glb code in some form, like the textures.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4128
    • View Profile
    • Portfolio
Re: 3D shading and environment test
« Reply #8 on: 2012-Jul-29 »
erico, that bump map was hand made by me by guessing invert, grayscale, auto-contrast but I haven't really got back into bump and sphere mapping in GLB lately. So I'll experiment with those also but a shiny metallic painted wall effect I'll might try for.

Ok, are you using photoshop or gimp?
Try a HIGH PASS filter to neutralize things a bit after the invert and grayscale.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4128
    • View Profile
    • Portfolio
Re: 3D shading and environment test
« Reply #9 on: 2012-Jul-29 »
With a HIGH PASS filter you should be able to get rid of the majority of shades from the photo texture.
Then you work levels to your suit.

Something like this I´m appending over the photo images you uploaded.
But preferably darker on the levels.

edit: by using just BW versions of your texture images on your bump, it is hard to see anything because of the shade on the color texture. You understand that better by the first-left texture, mine dosen´t have that triangle white on the middle. Those are the shades you want to get rid when making bumps :)

[attachment deleted by admin]
« Last Edit: 2012-Jul-29 by erico »

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4128
    • View Profile
    • Portfolio
Re: 3D shading and environment test
« Reply #10 on: 2012-Jul-29 »
Mental, I agree, we must have control over specular and diffuse somehow. It is of the greatest importance.
Please excuse my intrude on the thread, I haven´t done much on 3d to ever come up with anything.

Understand I´m just trying to help things out whatever way I can. :-[

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3338
  • Integrated Brain
    • View Profile
Re: 3D shading and environment test
« Reply #11 on: 2012-Jul-29 »
intrude?¿...  :-* :-* your knowledges...
 :nw: :nw: :nw:

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1539
    • View Profile
Re: 3D shading and environment test
« Reply #12 on: 2012-Jul-29 »
Photoshop is what I use although this is just for testing. It would be better if I were to generate simpler but similar design texture and bump map in code and see how that looks.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4128
    • View Profile
    • Portfolio
Re: 3D shading and environment test
« Reply #13 on: 2012-Jul-29 »
Photoshop:

Filter > Other > High pass...

Then use levels to achieve strong black and white, it should be enough!

If you prefer to use in code, its ok of course, but give a go on external packages, it is always good!
Gimp can do the same.

I wonder why high pass is kind of hidden in photoshop while it is an important tool to create edges... I don´t like adobe :(
but ssshhh don´t tell everyone!:)

Edit again: I ´m doing photoshop work today on the grave shift, if you need me to give a go on creating bump for it, send me that file on ericomont@[gouoglestufff].com
« Last Edit: 2012-Jul-29 by erico »

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1142
    • View Profile
    • My GLBasic code archiv
Re: 3D shading and environment test
« Reply #14 on: 2012-Jul-29 »
Specular light is easy to do in OpenGL (dont know about |ES) and has been done (Diffuse is easy too). Ive send it to Gernot with other code ideas for bugfixes and feature adds. I dont want to publish it till I know if Gernot includes it in V11, but if you need it, write a PM. :P

@bumpmapping:
please notice that bumpmapping is broken/ does not work on Intel graphic cards. I tried it on 3 (or was it 4) different generations and it did not work on any of them (but it did on ATI and NVidia). Was reported long time ago...
Matchy are you still using my 3D lib? If yes, did you include bumpmapping, cuz i did not and its quite a bit work. If someone needs it, i can include it in a future version... :whistle:

BTW: your game does look way better since the last time i saw it, really nice work. Did you manage to get it working faster in internet games? Keep me updated. :whip: :nana:
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64