#ok

1 messages · Page 1 of 1 (latest)

steady zenith
#

after generating a level, have a look at one of the wall segments in the scene view

#

make sure there is only one of them in a single spot

#

if they're fine, and they aren't extremely tiny, then there must be something else contributing all of those triangles

edgy wind
#

here is the structure for generation

#

it generates this then orients it randomly

#

I plan to add more structs later

steady zenith
#

the walls seem tolerable

#

what about the lights?

edgy wind
#

the lights did seem problematic

#

let me just turn them all off one sec

steady zenith
#

not because they cast light, but because they might be complex meshes

edgy wind
#

they are also just cubes

#

but glowy cubes

steady zenith
#

how much level are you generating here?

edgy wind
#

it runs slightly faster with the lights off, but not enough to justify it imo

#

but more level gen doesn't mean more visible level

#

which seems to be the problem

#

but

#

ok

#

the walls go through the ciel a bit so you can get the idea

steady zenith
#

how many copies of the template is that?

edgy wind
#

well there are two temps rn

#

21 chunks

steady zenith
edgy wind
#

so 21 of the template

edgy wind
#

no shot

steady zenith
#

it needs to pre-compute that data

edgy wind
#

occlusion culling window

#

ok

steady zenith
#

if you select half of the generated chunks and turn them off, does the triangle count roughly halve?

edgy wind
#

uh ok

#

let me

#

oop genend me in the other area

#

one mo

#

waiiit

#

so

#

the other chunk type

#

has some more complex models

#

yeah the tri count jumps from 25k to 2.5m when the other type spawns

#

however
the performance is the same whether or not it has the tris

#

so let me look at occlusion culling

steady zenith
#

i don't think you can bake that data at runtime

steady zenith
edgy wind
#

wdym

#

what should I look at

#

the editor is causing a lot of lag but

#

the game causes more

steady zenith
#

you will definitely get worse performance in the editor, especially if you have something selected

#

(the inspector can be pretty expensive)

edgy wind
#

You can use occlusion culling to occlude Dynamic GameObjects, but Dynamic GameObjects cannot occlude other GameObjects. If your Project generates Scene geometry at runtime, then Unity’s built-in occlusion culling is not suitable for your Project.

#

so

#

im screwed

steady zenith
#

you could probably rig it up yourself tbh

edgy wind
#

yeah

steady zenith
#

if you can make guarantees about visibility

edgy wind
#

yeah

steady zenith
#

if you can never see past neighboring tiles, it'll be very easy

edgy wind
#

well sometimes you can

steady zenith
edgy wind
#

ok

#

ill work on this

steady zenith
#

it's possible that you're being heavily cpu-bound

#

in that case, adding more triangles would have a relatively small effect

#

i'm a little fuzzy on the cpu cost of complex meshes

#

it's definitely more data to send to the gpu

#

but it's not like a skinned mesh, where the cpu needs to do the deformation every frame

#

(iirc that happens on the cpu, not the gpu, in unity)

#

also, you should consider using the LOD system for those complex meshes

edgy wind
#

ok

steady zenith
#

(if you don't want to just cut their polycount)

#

nooooo

#

dyno'd

#

dyno'd again

edgy wind
#

aughh

steady zenith
#

i got a glimpse

edgy wind
#

My emotion was stifled

#

lol

#

dyno is a cruel and angry god

#

ill figure this out

steady zenith
#

what render pipeline are you using?

edgy wind
#

normal

steady zenith
#

i'm also fuzzy on the concept of static batching

edgy wind
#

bcause I want postprocessing

#

Im too far in to switch to URP

steady zenith
#

that reduces the amount of times you have to tell the gpu to draw something

edgy wind
#

this also takes a lot sometimes randomly

steady zenith
#

the Stats menu should mention that

#

i think that's just when the gpu takes a long time to render

edgy wind
#

ahh

steady zenith
#

i am super fuzzy there

#

not sure what would cause that to spike

edgy wind
#

ok well

steady zenith
#

maybe if you have to upload a bunch of giant meshes to the gpu in one frame

edgy wind
#

time to change all the settings until fframes

steady zenith
#

are you using version control?

edgy wind
#

github

#

but that sometimes doesn't save settings

#

ill get it to work

steady zenith
#

so you're using git

#

i have had some problems convincing unity to actually write my changes to the assets that hold settings

#

notably with the SuperUnityBuild package i use