Skip to content

Add normal maps #34901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

notquitehadouken
Copy link
Contributor

@notquitehadouken notquitehadouken commented Feb 5, 2025

About the PR

Bump maps by notquitehadouken for SS14.

Requires Engine PR

You can PR to 25-02-05-bumps on my repo if you want to add bump map (or normal map) sprites, which will speed this up significantly because There's A Lot Of Stuff & Things. Most of them are covered by the normal generator in the engine PR, but some things might need extra spriting (like all the non-main-body species sprites) that I am too inexperienced or time constrained to do. If you do make a PR, comment a link to it here because I will not find it otherwise. I will add you to the CL authors if you do this.

How to add a bump map
  1. Pick a sprite (e.g. protolathe)

If you're just making it shaded flatly (like tables), skip all these steps and go straight to adding it to the RSI:

  1. Create a new image with the same dimensions as the sprite in your preferred image editor (I use paint.net because layers are easy but you do you)
  • Add a completely black background
    • If it helps (and it will), add the regular sprite and draw over it. Remember to remove it after you're done, or else your sprite will look fungly.
  • Draw the bump map COMPLETELY in black and white. White is closer, black is farther.
    • Bump maps are linear. Black is considered the farthest, white is the closest, and 50% is halfway between.
  • Follow generally the same color scheme as the rest of the bump maps I've already made. If you need a reference, use Human/parts.rsi/bump.png.
  • It is not recommended to use pure white for the main body of the sprite, as other parts may be further towards the camera (like the hands on the left and right sprites for people)
  • The bump map is masked to the sprite it's associated with, so you shouldn't add any transparency to it. For sprites typically used in parts (like the lizard tail), make sure the bump map extends slightly beyond the actual sprite if it would be necessary.
    • If you have no idea what I'm talking about, take one of the lizard tail or snout sprites and overlay it with its bump map. Notice how the bump map is bigger than the actual sprite!
  • If your bump map is right up against the edge, note that anything beyond the bounds of the image is considered to be completely black.
    • This includes boundaries between different parts of the image, like species sprites, which have 4 directions. If something was against the edge of one of those 32 x 32 blocks, then anything beyond that block would be considered completely black, even if there was actually something there in the bump map.
  • Put "bump" in the name of the sprite. This isn't required, it just makes it easier to sort.

Once your finish making your bump map, follow these steps to add it to the RSI:

  1. Find the sprite you want to add a bump map to
  • If you just want to make it flatly shaded, add "flatNormal": true, in the state associated with the sprite
  • If you want to make the ENTIRE RSI flatly shaded, add that same text outside of the states (like any of the table RSIs)
  • Bump and normal maps take precedence over flat shading, so if you include flatNormal alongside a bump or normal map, then the flatNormal will be ignored completely.
  1. To add a bump map, go to the state you want to add a bump map to and add "bump": followed by the name of the image in quotes, just like you would do to add a regular sprite with "name":.
  2. To add a normal map, do the same thing, but use the key "normal" instead of the key "bump".

Need to make bump maps for (In order of priority):

  • Main species body
  • Species markings
    • Lizard tail
    • Lizard snout
    • Arachnid appendages
    • Moth wings
  • Common space suits
    • Engi suits
      • Engineering
      • Atmospherics
      • Atmos firesuit
      • CE hardsuit
    • Sec suits
      • Basic hardsuit
      • Warden hardsuit
      • HoS hardsuit
    • EVAs
      • Basic EVA
      • EVA
      • Emergency EVA
      • Syndie EVA
    • Syndie suits
      • Syndie EVA
      • Bloodred
      • Agent
      • Elite
      • Commander
      • Cybersun
    • Salvage suits Nevermind, just spationaut.
    • Head suits
      • Cap
      • CMO
      • CE
      • RD
      • HoS
  • Space suit helmets
  • Certain melee weapons
    • Fireaxe
    • Fire axe
    • Cap sabre
    • Knives
      • Combat knife
      • Survival knife
      • Kitchen knife
      • Butcher cleaver
  • Tools wider than like four pixels
    • (Syndicate) Jaws of Life
    • Drill
    • Welders
  • Common machines (like the protolathe or chem master)
  • Tables & Walls & Windows
  • Puddles
  • Backpacks and other similar sprites (see front texture)
  • Various often-used items (by crew and by antags)

Covered by autogenerated normals (Or not worth the effort):

  • Very very specific items
  • Inhands
    • Too small, not worth the effort for something where my change is gonna be "Yowza! It looks like the autogenerated sprite but worse!"
  • Anything that's less than 5x5 pixels
    • Not much detail to extrapolate depth from.
  • Basically anything living
    • Not common enough in Regular Gameplay (e.g. any dept that isn't related to the kitchen) to warrant the difficulty. Enjoy perfectly flat cow, nerd.
  • Anything that's mostly flat
    • Cloaks
    • Beds
    • Bedsheets
    • IDs
    • EMAG
    • Boxes
    • Basically all clothing
  • Guns
  • Hair
  • Has shader: unshaded on it
    • Self explanatory

Why / Balance

Normal maps are Cool and so is lighting in general

Technical details

Media

image

image

image

(achieved by setting LIGHTING_HEIGHT in light_shared.swsl to the sine of time...i have just had an idea)

MyServer.-.Space.Station.14.2025-02-17.14-28-02.online-video-cutter.com.1.mp4

Requirements

Breaking changes

Changelog

🆑

  • add: Added normal maps for lighting! Turn them on in settings (will require restart) to try them out!

@github-actions github-actions bot added size/M Denotes a PR that changes 100-999 lines. Changes: No C# Changes: Requires no C# knowledge to review or fix this item. Changes: Sprites Changes: Might require knowledge of spriting or visual design. S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Feb 5, 2025
Copy link
Contributor

github-actions bot commented Feb 5, 2025

RSI Diff Bot; head commit b919486 merging into 33b9149
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Clothing/Head/Hardsuits/atmospherics.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Hardsuits/basic.rsi

State Old New Status
bump Added

Resources/Textures/Clothing/Head/Hardsuits/capspace.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Hardsuits/cybersun.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Hardsuits/engineering-white.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Hardsuits/engineering.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Hardsuits/medical.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Hardsuits/rd.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Hardsuits/security-red.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Hardsuits/security-warden.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Hardsuits/security.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Hardsuits/spatiohelm.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Hardsuits/syndicate.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Hardsuits/syndiecommander.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Hardsuits/syndieelite.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Hardsuits/syndiemedic.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Helmets/atmos_firehelmet.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Helmets/eva.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Helmets/eva_large.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/Head/Helmets/eva_syndicate.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/atmospherics.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/basic.rsi

State Old New Status
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/capspace.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/cybersun.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/engineering-white.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/engineering.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/medical.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/rd.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/security-red.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/security-warden.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/security.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/spatio.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/syndicate.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/syndiecommander.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/syndieelite.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Hardsuits/syndiemedic.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Suits/atmos_firesuit.rsi

State Old New Status
bump Added

Resources/Textures/Clothing/OuterClothing/Suits/eva.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Suits/eva_emergency.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Clothing/OuterClothing/Suits/eva_syndicate.rsi

State Old New Status
bump-vox Added
bump Added

Resources/Textures/Mobs/Customization/reptilian_parts.rsi

State Old New Status
snout_bump_round Added
snout_bump_roundlight Added
snout_bump_sharp Added
snout_bump_sharplight Added
snout_bump_splotch Added
tail_bump_large Added
tail_bump_regular Added
tail_bump_spikes Added

Resources/Textures/Mobs/Species/Arachnid/parts.rsi

State Old New Status
bump Added

Resources/Textures/Mobs/Species/Diona/parts.rsi

State Old New Status
bump Added
bumpf Added

Resources/Textures/Mobs/Species/Gingerbread/parts.rsi

State Old New Status
bump Added

Resources/Textures/Mobs/Species/Human/parts.rsi

State Old New Status
bump Added

Resources/Textures/Mobs/Species/Moth/parts.rsi

State Old New Status
bump Added

Resources/Textures/Mobs/Species/Reptilian/parts.rsi

State Old New Status
bump Added

Resources/Textures/Mobs/Species/Skeleton/parts.rsi

State Old New Status
bump Added
skull_icon_bump Added

Resources/Textures/Mobs/Species/Slime/parts.rsi

State Old New Status
bump Added

Resources/Textures/Mobs/Species/Terminator/parts.rsi

State Old New Status
bump Added
skull_icon_bump Added

Resources/Textures/Mobs/Species/Vox/parts.rsi

State Old New Status
bump Added

Edit: diff updated after b919486

@NoElkaTheGod
Copy link
Contributor

A bit closer to directional lighting

@Kadeo64
Copy link
Contributor

Kadeo64 commented Feb 6, 2025

holy sovl

mind posting some images with moths and lizards? I want to see how this affects tails and wings

@notquitehadouken
Copy link
Contributor Author

notquitehadouken commented Feb 6, 2025

holy sovl

mind posting some images with moths and lizards? I want to see how this affects tails and wings

i am working on markings

@Sadie-silly
Copy link
Contributor

please give us a showcase with the blue and pink bisexual lighting

@notquitehadouken
Copy link
Contributor Author

please give us a showcase with the blue and pink bisexual lighting

later

@Everturning
Copy link

ss a non-coder could i get an explanation as to what normal maps are?

@robinthedragon
Copy link
Contributor

ss a non-coder could i get an explanation as to what normal maps are?

they tell the computer what direction parts of a sprite are facing. so you could mark pixels as the front of your sprite, and if there's a light infront of the sprite, those pixels will be illuminated. however, if there's a light behind your sprite, they won't be

@notquitehadouken
Copy link
Contributor Author

ss a non-coder could i get an explanation as to what normal maps are?

it's like if the people were 3d but in 2d

@Everturning
Copy link

ss a non-coder could i get an explanation as to what normal maps are?

they tell the computer what direction parts of a sprite are facing. so you could mark pixels as the front of your sprite, and if there's a light infront of the sprite, those pixels will be illuminated. however, if there's a light behind your sprite, they won't be

thank you, this is good 👍

@FairlySadPanda
Copy link
Contributor

ss a non-coder could i get an explanation as to what normal maps are?

they tell the computer what direction parts of a sprite are facing. so you could mark pixels as the front of your sprite, and if there's a light infront of the sprite, those pixels will be illuminated. however, if there's a light behind your sprite, they won't be

thank you, this is good 👍

There's more to it than that ofc so you can read an explainer like this https://www.artstation.com/blogs/typhen/GMyG/this-is-normal-1-what-normal-maps-are-and-how-they-work

TLDR tho it means certain materials can get really sloggers lighting effects... especially if we get specular maps some time :godo:

@TheShuEd TheShuEd added P1: High Priority: Higher priority than other items, but isn't an emergency. T: New Feature Type: New feature or content, or extending existing content Fun: Holy Shit HOLY SHIT! A: Art Area: Art with no implications for other areas. A: Core Tech Area: Underlying core tech for the game and the Github repository. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Feb 10, 2025
@notquitehadouken
Copy link
Contributor Author

gonna be ready in like 2 months fr fr

@notquitehadouken
Copy link
Contributor Author

notquitehadouken commented Feb 16, 2025

one more hardsuit jbjjrbejrbrj

then i get to do all the helmets :trollface: (i am losing it)

@notquitehadouken
Copy link
Contributor Author

helmet time

@notquitehadouken
Copy link
Contributor Author

ngl i've spent like 5 minutes staring (ingame) at the video i just put in media

@notquitehadouken
Copy link
Contributor Author

Is this what Flareguy felt when making all the vox sprites

@github-actions github-actions bot added size/M Denotes a PR that changes 100-999 lines. and removed size/S Denotes a PR that changes 10-99 lines. labels Feb 19, 2025
@notquitehadouken
Copy link
Contributor Author

notquitehadouken commented Feb 20, 2025

YARG!!!!!!

@notquitehadouken notquitehadouken marked this pull request as ready for review February 20, 2025 00:29
@ArtisticRoomba
Copy link
Member

Would you like reviewers assigned to you for this PR? You'll have to say who you want this time.

@ArtisticRoomba
Copy link
Member

Also I think in order for your tests to pass you'll have to add schema information in rsi-schema.json.

@notquitehadouken
Copy link
Contributor Author

Also I think in order for your tests to pass you'll have to add schema information in rsi-schema.json.

warg

@ArtisticRoomba
Copy link
Member

The RSI validator, which checks meta.jsons, uses rsi-schema.json as a base to check against. That test is crying, and you've added new metadata information that isn't defined as standard in the schema, so when the test goes to check your new metadata files against the rsi-schema.json file to make sure everything is correct, it cries because it sees something it doesn't expect. That's my guess though.

@notquitehadouken
Copy link
Contributor Author

notquitehadouken commented Feb 20, 2025

The RSI validator, which checks meta.jsons, uses rsi-schema.json as a base to check against. That test is crying, and you've added new metadata information that isn't defined as standard in the schema, so when the test goes to check your new metadata files against the rsi-schema.json file to make sure everything is correct, it cries because it sees something it doesn't expect. That's my guess though.

validate-rsis.py is crying because it looks for all the pngs in the state objects and because it can't find the bump maps (it only checks the "name" field) it screams because they're defined In A Different Way. also it's in the engine so i can't do anything about it (in this pr)

@ArtisticRoomba
Copy link
Member

Ah, well, sounds like you need to make another engine PR (godo).

@notquitehadouken notquitehadouken marked this pull request as draft February 21, 2025 03:56
@notquitehadouken
Copy link
Contributor Author

this PR is kil until i fix all the millions of issues with the engine pr

@Agoichi
Copy link
Contributor

Agoichi commented Feb 23, 2025

We'll be waiting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Art Area: Art with no implications for other areas. A: Core Tech Area: Underlying core tech for the game and the Github repository. Changes: No C# Changes: Requires no C# knowledge to review or fix this item. Changes: Sprites Changes: Might require knowledge of spriting or visual design. D0: Very High Difficulty: Codebase knowledge required is extreme. Consider atomizing instead. Fun: Holy Shit HOLY SHIT! P1: High Priority: Higher priority than other items, but isn't an emergency. size/M Denotes a PR that changes 100-999 lines. T: New Feature Type: New feature or content, or extending existing content T: Visual Change Type: Deals with changes to art, sprites or other visuals in the game.
Projects
None yet
Development

Successfully merging this pull request may close these issues.