SamSuka
Puppygames
Puppygames

patreon


Transcripts 18th December 2017 - 27th December 2017

Cas: voxels!

(bumpmapped voxels!)

Dan: exam + cold

don't expect much until the 20th

Cas: snif snif

snot covered voxels!

Dan: do you want to see my pile of snot papers?

lol

Cas: only if they're made from voxels

Dan: atoms OK?

they're like small voxels.

Cas: not square enough

Dan: dammit what's the convention in february called again?

Cas: PCGamer

http://weekender.pcgamer.com/

the PCGamer Weekender

http://www.adriancourreges.com/blog/2016/09/09/doom-2016-graphics-study/

Screen space reflections hmmm

Dan: will take a look at it tomorrow

need to focus on exam tomorrow

Cas: yes yes just some light bedtime reading 😃

Dan: I'll add some normal mapping code tonight when I get home.

It'll probably be too late for you to test it tonight though...

Cas: I've got flu

So sick bedridden

Dan: =<

---

Cas: I've just got even more flu

The gift that keeps on giving

Dan: o_o

that sucks

I got some results for you

Normal mapping is working


there's the right picture lol

No need for a call if you're not feeling up for it by the way.

Cas: That looks good. How does it blend between different bump maps?

And now it's there what might the impact of adding specular gloss maps be?

Dan: Blend between bump maps?

Also specular maps would do nothing wihtout you know specular lighting.

Cas: Yeah

And yeah

Dan: When would we want to blend between bump maps?

Cas: When two voxels next to each other have different maps

Dan: You mean ANY two voxels?

It's gonna look like crap if we blend between two neighboring voxel's normal maps but not their textures

Cas: Aye

Dan: and their textures are extremely low res.

So... not really any blending.

I'm gonna do texture filtering for voxels that are merged together into one quad the same way I do for the diffuse color.

Cas: I was thinking we could use two identical colours but point to two bump maps

Different palette entries of course

Then do some random blotchy patterns of those colours to get random bump mapping mix

Of course... Instead of bump maps we could have a height map at say 2 or 4x the voxels resolution

They wouldn't blend as such but you just work out normals on the fly during rasterisation

Dan: Doing that is too expensive and cheaper to do with normal maps.

Cas: In any of 5 facings

Oh

Really that expensive?

Dan: To compute normals from a height map you want the slope of the depth map which is the same info as a normal map.

You need at least 3 samples to get one normal from a height map.

2 height maps filtering between 4 voxels = 2*4*3 = 24 texture samples for no good reason.

2 x 4 x 3

Cas: Oh

Dan: Regardless why not just have a huge precomputed normal map instead of doing blending?

Cas: Thought it would be easier �

So about adding specular.....

Dan: That's a thing???

Cas: Just me ... speculating 😎

Is it hard or expensive or both?

Dan: oh god the pun

It will make lighting a lot more expensive yes but it may not be a big deal.

It's quite a big undertaking and won't look good without properly tuned materials.

Cas: Only to be used sparingly

Dan: I've pushed the current stuff

There's no such thing as sparingly here it's for everything or nothing.

Cas: Polished internal floors metal walls etc

Dan: You mean specular lighting?

Cas: Materials with specular reflection yes

I figured that as the rasterisation was still the main bottleneck that a few more ops in the drag shader wouldn't kill it

We can limit it to the shadow casting lights

Dan: It's gonna look weird and fake without it for all of them though...

I dunno.

Cas: Hacky performance test?

Dan: The performance probably won't be too bad on our computers.

I'm mostly worried about the resources and the look of it

Cas: Like I say... Sparing usage

Base interiors robot skins etc

Dan: First of all sparingly doesn't mean much if it's still part of the shader.

An if-statement has a cost and even if it's not taken or a significant cost the compiler still needs to allocate registers for a worst case scenario

High register usage can make memory reads more expensive and the lighting is very heavy on those as all the lighting data is in textures.

But regardless

What kind of specular are you interested in?

Cas: Er... You know. Brushed metal

Not mirror polish

Dan: You can do phong in like 5 instuctions

or physically based shading in 30.

Cas: On the bump map?

Dan: How you do the shading and where you get the normal from are two separate issues.

You can have specular lighting without a bump map and bump maps without specular.

Cas: Each palette entry points to its own bump map right

So each can also point to a gloss map too perhaps?

Dan: Gloss maps aren't necessary either for specular lighting.

Gloss maps are like normal maps you use them to add more detail.

Cas: Well could just have a specularity

Dan: You can have a constant specularity value for each voxel just as well.

OK let me put it like this

How realistic do you want the specular reflections to be?

As realistic as possible or as simple and fast as possible?

Cas: Not massively

Just simple and fast

Dan: OK I'll try to add some simple stuff then.


Transcripts 18th December 2017 - 27th December 2017

More Creators