#ok
1 messages · Page 1 of 1 (latest)
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
here is the structure for generation
it generates this then orients it randomly
I plan to add more structs later
not because they cast light, but because they might be complex meshes
how much level are you generating here?
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
how many copies of the template is that?
i don't think unity will be doing occlusion culling by default
so 21 of the template
what
really
no shot
it needs to pre-compute that data
if you select half of the generated chunks and turn them off, does the triangle count roughly halve?
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
i don't think you can bake that data at runtime
how does the profiler compare?
wdym
what should I look at
the editor is causing a lot of lag but
the game causes more
you will definitely get worse performance in the editor, especially if you have something selected
(the inspector can be pretty expensive)
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
you could probably rig it up yourself tbh
yeah
if you can make guarantees about visibility
yeah
if you can never see past neighboring tiles, it'll be very easy
well sometimes you can
sort by % and compare how much time gets spent on that rendering caetgory
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
ok
(if you don't want to just cut their polycount)
nooooo
dyno'd
dyno'd again
aughh
i got a glimpse
what render pipeline are you using?
normal
i'm also fuzzy on the concept of static batching
that reduces the amount of times you have to tell the gpu to draw something
this also takes a lot sometimes randomly
the Stats menu should mention that
i think that's just when the gpu takes a long time to render
ahh
ok well
maybe if you have to upload a bunch of giant meshes to the gpu in one frame
time to change all the settings until fframes
are you using version control?