Hi I'm Dana, I mostly just tool around with friends, play RPGs, and listen to podcasts, but I've also been known to make podcasts at SuperIdols! RPG and I've written a couple of short rpgs at my itch page and on twitter.

💕@wordbending

This user is transgenderrific!


posts from @authorx tagged #game dev

also: #gamedev, #gamedevelopment, #game development, ##gamedev

joewintergreen
@joewintergreen

A while ago I tweeted this about Max Payne 2's really nice shadow. This was 2003, remember.

Max Payne in 2 only ever casts one shadow, so it just moves around based on - I guess? - averaging the relevant lights. It's a nice shadow though. A lot of UE3 games did this too, I think including Batman AA?

Luckily, a couple of Remedy folks who worked on the game saw it!

Petri Häkkinen:

Hey, that looks familiar! I wrote the shadow rendering code for Max Payne 2. :) It’s basically a CPU decal with 2 shadow maps, hard and soft, blended together. Direction & intensity is sampled from the radiosity lightmaps. @jaakkolehtinen
wrote the GI system.

Jaakko Lehtinen:

It’s a shame we never talked about this, or the (what I still think is cool) distributed radiosity solver that scales well with scene complexity by breaking things down with portals and mediating radiance between “rooms” with 4D light fields in a 2-level iterative manner. It’s based on a 1st order SH irradiance volume, which is equivalent to an ambient term (DC) and two directional lights, positive & negative, from opposite directions (linear terms). Shadow direction and strength come from the latter: in a uniformly lit spot, the shadow fades away.

EDIT: After I posted this very post you're reading, someone else chimed in!

Peter Hajba:

So, what Jaakko was saying there was that the shadow (light) direction is baked into every point in the rooms where the light is rendered on, so you didn't need to cast any rays to cast the shadow, just look up the direction value from the spot Max Payne was standing on.
Radiosity rendering is pretty neat. Basically it goes onto each point on a surface, looks around to see if there are any lights visible, and then decides if that spot is lit. That's the first pass. Then in the second pass the renderer also sees the lit surfaces with color.
So if there are strongly coloured surfaces, the light applied to each point gets coloured by that. Then you run a third pass and the light bounces a third time, and more, until you have beautiful baked lighting.
We had a little distributed render farm at the Remedy office. Whenever we let our work computers idle, they would start calculating Radiosity lighting on the Max Payne levels.

Thanks Remedy gang!


@authorx shared with:


bobacupcake
@bobacupcake
Anonymous User asked:

Hi! I'm trying to learn shaders and I'm rlly curious how you got the appearance of cracks running through your stones? I'm not sure how to make it look like something is "inside" like that ><

hi!!! i'm assuuuuming you're talking about the effect in this one?
spinning 3d model of the summoner job stone from final fantasy 14

i'm using something called parallax mapping!! i know most people know what parallax is and how it works in the realworld but im just gonna demonstrate it real quick just so i dont have to keep going "ok now imagine how parallax works"

so imagine you have two windows. in the middle of the window on the left, there is an Orb. it is directly in the middle of the window. the window on the right also has an Orb, but this one is pushed backwards outside the window quite a bit. now if you look at the two windows, and turn them, you get this:
diagram of above

for the first window, the Orb stays basically in the center of the window. but in the second window, if you turn the window right, the Orb "looks like" it's moving left

parallax mapping is essentially taking this assumption, that if you change the angle you are looking at an object, the further away an object is, the more it will move in the opposite direction. i will spare you on the matrix math involved but you can get the exact relation you need by getting the Tangent Space View Direction. you dont need to understand the math behind this to use it

so, lets go back to the window example, how would you make the same effect, but with just this 2d texture of the Orb?
a grey orb

what if, whenever the object it was attached to turned right, you just moved the texture to the left, by X amount, where X is how far into the window the orb is. you would essentially be cheating god and "faking" the parallax. it would look like it's moving like it's far out of the window, but really, it's still a 2d texture. it would look like this:
the same diagram

i was too lazy to make the shader and record another gif but i dont need to because functionally it would look almost identical because when you turn it right the Orb moves left

again, you can just Know the right direction to push the texture in based on the current angle by getting the Tangent Space View Direction. ok another example. what if you had a black and white noise texture, like this

a cloudy-looking noise texture

now what would happen if, instead of moving the whole texture X amount. you moved each pixel a proportional amount based on how bright it is. a 100% black pixel would not get moved at all, and a 100% white pixel would get moved the furthest along the Tangent Space View Direction. a pixel thats right down the middle would move half that distance etc etc. well it would look something like this!!!

a cube that looks like it has a 3d cloud inside of it

thaaat's the basics behind it!!! it's also used for effects like faking room interiors through windows with just a 2d texture in biig cityskapes and the like

a 2d picture of a room, plus the same room but with parallax

you can see how the cube example looks kind of like an ice cube with the distortion, that's Not intentional and how parallax mapping artifacts. i do not care about it, because i make crystals. but some people do care about it, so you can use parallax occlusion mapping, which is like parallax mapping but a step up

here's some more reads on it if you are interested!!!
https://simonschreibt.de/gat/windows-ac-row-ininite/
https://www.patreon.com/posts/playing-with-29753575
https://catlikecoding.com/unity/tutorials/rendering/part-20/
https://halisavakis.com/my-take-on-shaders-parallax-effect-part-i/


@authorx shared with:


MOOMANiBE
@MOOMANiBE

I'm not sure what makes me angrier, the idea that mocap has "obsoleted" hand-animating or the idea that fucking "AI" is the next generation of that. I am at an actual loss for words because to say "I hate this philosophy" would be to describe a raging inferno as gently warm. This is the most toxic approach to game development I can envision on absolutely any level


@authorx shared with: