Wolf3d Haven Forum

Please log in or register. Smile

Join the forum, it's quick and easy

Wolf3d Haven Forum

Please log in or register. Smile

Wolf3d Haven Forum

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Wolf3d Haven Forum

A friendly Wolfenstein 3D community, about Wolfenstein 3D, the game that gave birth to first person shooters...


+3
ronwolf1705
mar
Andy
7 posters

    Shading (fog) in Wolf4SDL

    mar
    mar
    Can I Play, Daddy?
    Can I Play, Daddy?


    Male
    Number of posts : 27
    Age : 45
    Location : Czech republic
    Job : Programmer
    Hobbie : Oldschool games
    Registration date : 2012-05-25

    Shading (fog) in Wolf4SDL Empty Shading (fog) in Wolf4SDL

    Post by mar Sun Jun 10, 2012 3:51 pm

    Hi guys, I've been hacking a bit with Wolf4SDL a bit (v1.7, is there a newer code base?).
    What bothers me is that in 256 color mode, you have to map colors to existing palette which
    makes shading look very ugly in some cases, which is a pity as I've seen it being used
    in lots of cool mods.
    So i decided to try to use 16 or 32-bit screenBuffer instead. There're still many problems,
    especially palette fades and so on. If time permits and if I find a solution I will upload
    the modified source somewhere. The rgb solution would allow to shade textures with animated
    palette (with some extra work of course) and i believe it would allow for new cool effects.
    Of course the drawback is extra memory and some performance penalty
    but Wolf4SDL is not intended for DOS anyway.

    original (8bpp, palette):
    Shading (fog) in Wolf4SDL Wolfpa10
    32bpp, rgb:
    Shading (fog) in Wolf4SDL Wolf3210

    I chose a bad area (and JPEG did its job - not my fault, the images i uploaded were jpegs with quality 100)
    but you sure noticed for example colorful textures going gray etc.
    So what do you think? Please let me know if something like that has been attempted before.
    I don't have much free time for this so no need to reinvent the wheel (btw. has someone tried mipmapping yet?)
    Andy
    Andy
    Seasoned Wolfer
    Seasoned Wolfer


    Number of posts : 280
    Registration date : 2007-12-22

    Shading (fog) in Wolf4SDL Empty Re: Shading (fog) in Wolf4SDL

    Post by Andy Mon Jun 11, 2012 4:00 am

    Very nice work, mar. I don't recall this ever being done before.

    Does it affect game performance at all?
    mar
    mar
    Can I Play, Daddy?
    Can I Play, Daddy?


    Male
    Number of posts : 27
    Age : 45
    Location : Czech republic
    Job : Programmer
    Hobbie : Oldschool games
    Registration date : 2012-05-25

    Shading (fog) in Wolf4SDL Empty Re: Shading (fog) in Wolf4SDL

    Post by mar Mon Jun 11, 2012 4:45 am

    Thanks Andy. Yes there will be some performance hit. I will quantify it as soon as I finish it.
    I already solved the palette problems, but have some minor things to fix yet.
    ronwolf1705
    ronwolf1705
    Hardcore Wolfer
    Hardcore Wolfer


    Male
    Number of posts : 1252
    Age : 33
    Registration date : 2007-03-26

    Shading (fog) in Wolf4SDL Empty Re: Shading (fog) in Wolf4SDL

    Post by ronwolf1705 Mon Jun 11, 2012 6:59 am

    With this way of shading, could you also make a level insanely dark? It's an effect I've always wanted to use but it doesn't look great with the old way of creating shading.



    Shading (fog) in Wolf4SDL MMCS0206
    mar
    mar
    Can I Play, Daddy?
    Can I Play, Daddy?


    Male
    Number of posts : 27
    Age : 45
    Location : Czech republic
    Job : Programmer
    Hobbie : Oldschool games
    Registration date : 2012-05-25

    Shading (fog) in Wolf4SDL Empty Re: Shading (fog) in Wolf4SDL

    Post by mar Mon Jun 11, 2012 12:50 pm

    Yes it should be possible. There's still some minor issues like ugly frame after get psyched and shading
    bypasses fade to red when killed (no easy way to fix).
    I also added nonlinear shade define to version.h, as well as 32-bpp mode define.
    The source along with precompiled windows binaries can be found here:
    http://www.mediafire.com/download.php?x4cpevlomlo7x7i

    Runs smooth in 640x400 on core2 duo/2 GHz.
    However, 1280x800 is not smooth even with original Wolf4SDL but still even with smooth shades well playable.
    I haven't tested floors/atmos effect as I don't know how Smile

    Here's final screenshot with nonlinear, 32bpp shades:
    Shading (fog) in Wolf4SDL Wolffi10
    ronwolf1705
    ronwolf1705
    Hardcore Wolfer
    Hardcore Wolfer


    Male
    Number of posts : 1252
    Age : 33
    Registration date : 2007-03-26

    Shading (fog) in Wolf4SDL Empty Re: Shading (fog) in Wolf4SDL

    Post by ronwolf1705 Mon Jun 11, 2012 2:46 pm

    You can make a good spooky mod with that kind of shading, looks great! Smile



    Shading (fog) in Wolf4SDL MMCS0206
    Dark_wizzie
    Dark_wizzie
    I am Death Incarnate!
    I am Death Incarnate!


    Female
    Number of posts : 5120
    Age : 30
    Location : California, USA
    Job : Investor
    Hobbie : Computers, chess, computer chess, fashion, and philosophy
    Message : I made this forum when I was 13 High on Drugs
    Registration date : 2007-03-24

    Shading (fog) in Wolf4SDL Empty Re: Shading (fog) in Wolf4SDL

    Post by Dark_wizzie Wed Nov 21, 2012 1:15 am

    Super late. Just discovered a thread in my own forum. Laughing
    Looks quite awesome. The shades of grey have been so standard in many mods, I got used to it. Hopefully newer mods won't have those bars of grey.



    Wolf3d Haven
    Minute Logic Blog
    avatar
    tsalop
    Wolf3d n00b
    Wolf3d n00b


    Male
    Number of posts : 8
    Age : 35
    Location : Loppi
    Job : Junior Softwaredeveloper
    Registration date : 2013-02-14

    Shading (fog) in Wolf4SDL Empty Re: Shading (fog) in Wolf4SDL

    Post by tsalop Thu Feb 14, 2013 11:17 pm

    Looks great, I think I will be trying this out.
    Richter Belmont
    Richter Belmont
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 231
    Age : 34
    Location : New Jersey, USA
    Job : Pushing Carts At Shop-rite
    Hobbie : Makeing Games, Playing Castlevania
    Message : Playing Lord of Shadows And I love it!!!
    Registration date : 2007-07-09

    Shading (fog) in Wolf4SDL Empty Re: Shading (fog) in Wolf4SDL

    Post by Richter Belmont Sat Oct 19, 2013 7:14 pm

    soo I did this thing

    Smooth Shading

    It works but I've found some kind of Bug...

    When the 32bit is off

    Shading (fog) in Wolf4SDL Desktop_10_19_2013_10_04_59_PM_990

    But with the 32bit on...This happens

    Shading (fog) in Wolf4SDL Desktop_10_19_2013_10_05_37_PM_877

    Shading (fog) in Wolf4SDL Desktop_10_19_2013_10_05_49_PM_993

    I'm Stumped for real...Someone give me a hand Please Sad
    avatar
    Guest
    Guest


    Shading (fog) in Wolf4SDL Empty Re: Shading (fog) in Wolf4SDL

    Post by Guest Sun Oct 20, 2013 12:07 pm

    Hi Ted!


    Last edited by Chokster37 on Sat Feb 08, 2014 1:01 pm; edited 1 time in total
    Richter Belmont
    Richter Belmont
    Bring em' On!
    Bring em' On!


    Male
    Number of posts : 231
    Age : 34
    Location : New Jersey, USA
    Job : Pushing Carts At Shop-rite
    Hobbie : Makeing Games, Playing Castlevania
    Message : Playing Lord of Shadows And I love it!!!
    Registration date : 2007-07-09

    Shading (fog) in Wolf4SDL Empty Re: Shading (fog) in Wolf4SDL

    Post by Richter Belmont Sun Oct 20, 2013 7:03 pm

    Chokster37 wrote:
    Richter Belmont wrote:Someone give me a hand Please Sad
    Here you go

    Shading (fog) in Wolf4SDL Fake-arm
    Lawl.....But Anyways Its already been fixed in the Other Fourm tho But still Wondering about the Blue Ladder....
    stathmk
    stathmk
    Veteran
    Veteran


    Male
    Number of posts : 1790
    Age : 44
    Location : Indiana, United States
    Job : fast food worker & wolfensteingoodies.com webmaster
    Hobbie : old games & young dames
    Registration date : 2008-04-08

    Shading (fog) in Wolf4SDL Empty Original Pictures?

    Post by stathmk Fri Dec 16, 2016 12:18 pm

    mar wrote:Hi guys, I've been hacking a bit with Wolf4SDL a bit (v1.7, is there a newer code base?).
    What bothers me is that in 256 color mode, you have to map colors to existing palette which
    makes shading look very ugly in some cases, which is a pity as I've seen it being used
    in lots of cool mods.
    So i decided to try to use 16 or 32-bit screenBuffer instead. There're still many problems,
    especially palette fades and so on. If time permits and if I find a solution I will upload
    the modified source somewhere. The rgb solution would allow to shade textures with animated
    palette (with some extra work of course) and i believe it would allow for new cool effects.
    Of course the drawback is extra memory and some performance penalty
    but Wolf4SDL is not intended for DOS anyway.

    original (8bpp, palette):
    Shading (fog) in Wolf4SDL Wolfpa10
    32bpp, rgb:
    Shading (fog) in Wolf4SDL Wolf3210

    I chose a bad area (and JPEG did its job - not my fault, the images i uploaded were jpegs with quality 100)
    but you sure noticed for example colorful textures going gray etc.
    So what do you think? Please let me know if something like that has been attempted before.
    I don't have much free time for this so no need to reinvent the wheel (btw. has someone tried mipmapping yet?)
    I'm wondering if Mar still has the original pictures of "original (8bpp, palette):" & "32bpp, rgb:" on here.  I think that we'd be interested.

    Sponsored content


    Shading (fog) in Wolf4SDL Empty Re: Shading (fog) in Wolf4SDL

    Post by Sponsored content


      Current date/time is Fri Nov 08, 2024 12:36 pm