#lightmapping

1 messages · Page 1 of 1 (latest)

raw condor
#

lightmapping

#

okie

soft dome
#

i made some objects baked

#

but didnt generate light yet

#

i can revert baked right?

raw condor
#

yes

soft dome
#

okay i thought so

raw condor
#

you can always go back to realtime lighting its not a permanent thing

soft dome
#

thats nice

#

so i just mark all the statics as contribute GI

#

?

raw condor
#

no you mark only what doesn't move

#

or what isn't dynamic

soft dome
#

thats what i meant, didnt phrase it right

#

so i just do that and then generate?

raw condor
#

you could but I like to tweak my settings on the lightmapping window first before I hit generate

#

first thing I typically do is use the progressive GPU lightmapper

#

there is a CPU version but its slower, but its there for a reason as there can be cases where the GPU lightmapper fails (which can be due to a variety of things)

soft dome
#

uhuh

#

are there a few settings you would recommend

raw condor
#

yes, I tend to set these settings to the following...

soft dome
#

should probably say that im making a darker/horror game

raw condor
soft dome
#

so it'd be more mody

#

moody*

raw condor
#

I tick of progressive updates, which is a somewhat useful thing as it bakes only the area at which you are looking at, if you want to quickly iterate on your lighting this is a good option but generally I have some patience so I tick it off because it actually goes faster

#

I tick importance sampling which in english just means it goes faster (though in dark areas it can lead to artifacts but we can get into that later)

raw condor
# raw condor

I tend to drop all of the sample counts for direct, indirect, and enviorment to what I set here which are generally pretty low

#

but right after that I turn on filtering which cleans it all up

soft dome
#

i saw the prog updates, should be good for performance

raw condor
#

for good measure also I like to enable ambient occlusion

#

though leave direct contribution to 0

soft dome
#

ambient is unavalibe

raw condor
#

because its not enabled by default

soft dome
#

oh?

raw condor
#

so just enable it

#

its not a requirement to have honestly, for some scenes it may introduce too much contrast

#

but its up to you whether you want to have it on or not

soft dome
#

i guess i'll just leave it as it is rn

#

other than that tho, can i bake now?

raw condor
#

yes

soft dome
#

ill try then, might take a bit to generate

#

ill only do the first areas

raw condor
#

if you want it to go faster you can also drop the quality settings here

#

to 512 or 256

#

generally thats usually how most go about baking

#

drop the settings pretty low just to see how it looks

#

and once they are happy with how it looks lighting wise then you can increase your resolution/sample counts for a better quality bake

soft dome
#

i see, ill probably do that

#

also i decided to do ambient occlusion

#

okay it generated

#

looks not too shabby rn

raw condor
#

screenshots?

soft dome
#

yeah hold on, generating room 2 for more depth

raw condor
#

doesn't look right

#

is all of that geometry there marked static?

soft dome
soft dome
raw condor
# soft dome

on there it looks alright, low resolution obviously but that makes sense given what I've told you

soft dome
#

I did forget to mark some of them

#

regenerating

raw condor
#

yeah make sure you mark them

#

if its not marked on the bake then it won't see it

soft dome
#

my doors reverted to deafault size and rotation

#

i didnt mark them tho

raw condor
#

quickest way to see what you've marked is if you switch to the baked lightmap view

#

make sure this is ticked on

#

at the bottom

#

throws a checkerboard pattern on all objects marked contribute gi

soft dome
#

i can check

raw condor
#

alleyway is looking better

#

seeing some funny buisness with the trees though

soft dome
#

yeah the tree was being weird

#

its basically static

#

it doesnt really move

raw condor
#

foliage can generally cuase alot of issues in a bake because of how complex they usually are, but one thing I would check on is for all of your tree materials

#

make sure that this field

#

on the materials

#

is enabled

#

what happens in a lightmapper is that triangles are usually culled from the back, like in typical rendering, and what happens in a lightmapper is that these rays are terminated and typically you get really funky looking artifacts like you see here

#

or in here in my test scene for example

soft dome
#

how can you get rid of artifacts

raw condor
#

which is caused by this geometry being raised, and on the bottom of it there is no geometry inside or behind

raw condor
#

in my example what im showing here are artifacts caused by ray termination

raw condor
# raw condor

and you can fix that by ticking this field here in the material properties

#

fixed

soft dome
#

should so every material with an artifact should have doublesided ticked

#

?

raw condor
#

no

#

because double sided in some instances in certain edge cases can lead to light leaking through geometry

#

so its really only turn it on, on materials that you see are problematic

soft dome
#

oh okay

#

ill turn the house material into doublesided then?

#

because of the artifacts

#

or at least try

raw condor
#

go for it

soft dome
#

ill test

#

the tree looks better now btw

#

fixed it

raw condor
#

hows it look

soft dome
#

i can show you but i cant seem to find double sided on my house material

raw condor
#

so heres how to know when you'll get that artifact

soft dome
raw condor
raw condor
#

but just to finish up the tangent

#

heres how you know when that artifact will appear

#

I have barricade meshes here

#

and if you notice below them there is some wierd light leaking happening

#

zooming in closer you can see more of the funky shenangins going on

#

now this barricade mesh its worth noting, has no polygons on the underside of it

#

if I look under we can see the mesh becomes invisible

#

because there are no polygons there

soft dome
#

this is up close

raw condor
#

in that case that might not be a ray termination issue, that looks to be improper lightmap UVs

soft dome
raw condor
#

ah so its probably a ray termination issue there

#

I have a question to ask though

#

are you ever going to see that area in game?

soft dome
#

yes i guess

raw condor
#

alright then, because its worth noting that in far away or inacessible areas it can be common to see those artifacts and in many cases you can get away with it because its never going to be seen by the player

raw condor
# soft dome

but in your case, the issues are caused by the concrete material that you have

#

from the stairs and that little corridor

#

not from the house itself

#

I can tell because in an earlier screenshot

#

in your baked lightmap view

raw condor
soft dome
#

i see

raw condor
#

but in your shaded view

#

the outer walls of that corridor are culled

raw condor
soft dome
#

well you dont get that close to it ever

raw condor
#

then you don't have to fix it

#

but just for the sake of learning

#

we'll try to fix it

#

but based on what I saw

#

I can tell those ray termination artifacts are caused by that corridor and its materials

#

so enable double sided on them

soft dome
#

oh okay hold on

raw condor
#

there is also another way to solve it but I don't think i'll get into it as it'd be hard to explain

soft dome
#

i dont seem to have the option of double sided

#

if this is even where its supposed to be

raw condor
#

its supposed to be in the material tab, but yeah doesn't seem to be on that shader

#

I would actually try setting the render face mode

#

from front

#

to all or off

#

I forget the options it has

soft dome
#

both

#

its both

raw condor
#

set it to both and bake

soft dome
#

it should fix it i think tbh

#

hold on

#

its gone now seems like

raw condor
#

show me

soft dome
#

also this door is dark compared to the rest of the area

raw condor
#

how are these meshes made

#

are they made using pro builder or have you made them through an external modeling package like blender/maya etc?

soft dome
#

some are imported

#

some are probuilder

raw condor
#

for the imported meshes I would go in the import settings and enable generate lightmap UVs

soft dome
#

where do i find the import settings

raw condor
soft dome
#

it crashed trying to generate lmao

#

hold on