Page 1 of 4 123 ... LastLast
Results 1 to 20 of 65
  1. #1
    Member martinsh's Avatar
    Join Date
    Oct 2006
    Location
    valence, france
    Posts
    761

    Box Projected Cube Environment Mapping demo (Shiny!)

    Hi,
    I already posted a YouTube video of this and it instantly got an awesome response from viewers, without even knowing what actually are they looking at.

    Regular Cube Environment Mapping is a very common technique of making fast fake reflections. It works best in outdoors, when reflecting distant skies and stuff that reaches to infinity, but looks very wrong in indoors, especially on flat surfaces, like walls and floor. It is caused by cube-map coordinates that reaches to infinity.

    What BPCEM basically does, it takes the cube-map coordinates and clamps them to the size of the room. The original thread about BPCEM is HERE. It is made by Bartosz Czuba http://devlog.behc.pl/ and thanks him for helping me get this to work in BGE.

    comparison stills (regular cube mapping vs BPCEM):
    regular cubemap still looks fine on spheres, but wrong on flat surfaces.


    video of shader in action


    and a blend file of course: bpcem_playground.blend
    it is for 2.49, but should run fine on 2.5

    Controls:
    mouselook: WASD + mouse (player can walk through walls )
    shoot a sphere: LMB
    shoot a lot of spheres: MMB
    zoom: RMB
    Q: SSAO
    1: Remove AA (Antialisaing)
    2: SSAA
    3: DLAA
    4: NFAA

    thread about AA filters listed above is here - http://blenderartists.org/forum/showthread.php?t=209574

    PS. I haven`t tested this on ATI cards.
    Last edited by martinsh; 24-Feb-11 at 15:29.



  2. #2
    Wow, man! You're just awesome. I'm very impressed. Thanks for sharing!



  3. #3
    Member DennisH2010's Avatar
    Join Date
    Feb 2010
    Location
    Germany Ilmenau
    Posts
    368
    just awesome
    Youtubelink , Deviantartlink , Twitterlink , Facebooklink
    my old blendergame project [Download]link




  4. #4
    Member
    Join Date
    Dec 2010
    Location
    Brazil, Londrina-PR
    Posts
    438
    great stuff!
    gratz,
    romy



  5. #5
    Member Dilopho DD's Avatar
    Join Date
    Nov 2008
    Location
    /home/thomas/Blender
    Posts
    555
    Very, very impressive.
    The color bleeding, is that true SSGI or has it to do with the BPCEM?



  6. #6
    Member Haker23's Avatar
    Join Date
    Jun 2010
    Location
    In my house.
    Posts
    384
    Works great on ATI cards, btw: I have an ATI HD4350 (not great at all) and I got 40 FPS with all shaders on...
    My youtube channel: My Youtube Channel
    A piece of advice, using the getVertexArrayLength() on the Universe won't end well...



  7. #7



  8. #8
    Member leonnn's Avatar
    Join Date
    Dec 2008
    Location
    Brazil - PR - Maringá
    Posts
    2,510
    Wow, impressive, wowowow, I m amased, thanks a lot!



  9. #9
    Member Teoda's Avatar
    Join Date
    Sep 2010
    Location
    Delton, MI
    Posts
    160
    That is amazing!
    The probability of being watched is directly proportional to the stupidity of your act.



  10. #10
    Member AD-Edge's Avatar
    Join Date
    Apr 2006
    Location
    South Australia, Adelaide Hills
    Posts
    2,307
    Looks quite stunning Martinsh, great work. Havent seen so much shiney in the BGE ever before

    Love the potential for this though, cant wait to see what you come up with next as well. Keep it up
    || Delta-Edge || BGE Subreddit ||
    YouTube || Vimeo || Twitter
    -Focus To Achieve-



  11. #11
    Member Captain Oblivion's Avatar
    Join Date
    Jan 2006
    Location
    MA (USA)
    Posts
    2,308
    I wonder how much lag dynamically generated cube maps would introduce. I haven't benchmarked the render to texture functions yet...
    You can see some of my art on my site, and some more on my blog or my tumblr!

    Right now I am working on this project.

    Balsa man and sulfur girl make a perfect match.



  12. #12
    This is amazing... solid 60 fps with AO on @1920x1080!



  13. #13
    Member
    Join Date
    Mar 2008
    Location
    Denmark
    Posts
    497
    Wow! Im speechless..

    I already posted a YouTube video of this and it instantly got an awesome response from viewers, without even knowing what actually are they looking at.
    Haha i get it though, will this feature reach blender as a 'built in' function soon?



  14. #14
    Member playboy088's Avatar
    Join Date
    Sep 2010
    Location
    Argentina
    Posts
    210
    really nice I think if you make a Horror Game with Those graphics... ill shit on my pants


    EDIT: Lol, I just realized Who you are!, your the creator Of the fantastic bathorm, That bathroom make me come here to blender You are a god of details, Exelent Work Very very impressive
    Last edited by playboy088; 25-Feb-11 at 17:52.



  15. #15
    Member AniCator's Avatar
    Join Date
    Jul 2005
    Location
    The Netherlands
    Posts
    2,718
    It's a great piece of technology although it seems to be rather static. For example, I moved one of the stacks of pallets back to the room you start in and noticed they didn't have this shader applied to them. I also noticed that the spheres contain three environment textures. When you'd have a game with a lot of rooms how are you going to handle the textures in that case? (if you transfer the cubemapped objects from the first room to say the last room that is room 50 for example?)

    Kind regards.
    Try not to become a man of success but rather a man of value.
    bGame | Modulo | tOrque



  16. #16
    Member hanzo's Avatar
    Join Date
    Feb 2003
    Location
    Vancouver, Canada
    Posts
    581
    WAHOOOw! DUDE this is sick, man your little demo looks so real, PS blender foundation should get you and a few other guys I know to make a blender games trailer and they should have the next offical blender project yet another game.... maybe this time we could get a shooter instead another furry adventure (yofrankie) :P though it was kinda fun after all....

    lovin it I want to examine every thing very closely



  17. #17
    Member martinsh's Avatar
    Join Date
    Oct 2006
    Location
    valence, france
    Posts
    761
    Thanks for the replies. seems like it is working well on different hardware.

    Originally Posted by AniCator View Post
    It's a great piece of technology although it seems to be rather static. For example, I moved one of the stacks of pallets back to the room you start in and noticed they didn't have this shader applied to them.
    yea well GLSL allows only 4 texture channels applied on them, not more, so boxes are using only single env-map.

    Originally Posted by AniCator View Post
    I also noticed that the spheres contain three environment textures. When you'd have a game with a lot of rooms how are you going to handle the textures in that case? (if you transfer the cubemapped objects from the first room to say the last room that is room 50 for example?)
    That is why I am thinking of something like texture swapping, for dynamic objects. Something similar of what Source engine does. So when you enter a room with specific property, the script changes the the texture in the envmap channel.



  18. #18
    Member Ace Dragon's Avatar
    Join Date
    Feb 2006
    Location
    Wichita Kansas (USA)
    Posts
    20,700
    This is nothing short of incredible stuff, and I personally find it a pleasant surprise that the BGE can actually do graphics like that.

    Now if we can just convince Ton to allow Moguri to merge the branch and patches he has related to the BGE into trunk for the 2.6 final release if not to just give the BGE a better feature set to show for the big announcement.

    Otherwise, we may still may only have to wait for a couple months or so because even Ton wrote in the Bmesh thread that the beta period has gone on for too long and anticipates seeing it conclude.
    Sweet Dragon dreams, lovely Dragon kisses, gorgeous Dragon hugs. How sweet would life be to romp with Dragons, teasing you with their fire and you being in their games, perhaps they can even turn you into one as well.
    Need Cycles materials / node setups: Get them here



  19. #19
    Member AniCator's Avatar
    Join Date
    Jul 2005
    Location
    The Netherlands
    Posts
    2,718
    Has anyone actually mailed Ton about the game engine updates? I mean all the bug fixing can get very distracting so maybe he kind of forgot about it.

    Kind regards.
    Try not to become a man of success but rather a man of value.
    bGame | Modulo | tOrque



  20. #20
    Here is a fix for the DLAA filter on AMD cards. Read the comments in my pseudo diff.
    Code:
    float height = bgl_RenderedTextureHeight; //texture height
    float oneThird = 1.0 / 3.0; //<--put this line below the one above.
    ... //<--snip
    float avg(const in vec3 value) //<--was wrong return type (vec3).
    {
      // static const float oneThird = 1.0 / 3.0; //<-- there is no 'static' in glsl. I declared oneThird in global scope which works as good as static. :)
       return dot(value.xyz, vec3(oneThird, oneThird, oneThird) );
    }

    This fixes the ssao compilation. Thought i still have black artifacts all over the screen if i turn ssao on. Maybe sampling outside 2DSampler boundaries causes this? Don't know, i didn't study the code, just fixed the reported errors.
    Code:
    	vec3 black = vec3(0.0,0.0,0.0);
    	vec3 treshold = vec3(0.2,0.2,0.2); //<-- glsl requires explicit type casting vec3.
    The demo as such is pretty impressive. I noticed the weird reflections of the white windows when standing at the end of the coridor, looking left and right you can still see the reflections of the windows. But the overall illusion is pretty good.
    Last edited by matd; 04-Mar-11 at 16:55.



Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •