#2D rigged sprite rendered into a 3D viewport causing immense lag

60 messages · Page 1 of 1 (latest)

modern depot
#

I've actually already mentioned this back in #animation, but I'm unable to find solutions on my own so here am I

I want to make a two dimensional sprite that can be rigged display in a 3d space (something like how Limbus Company does it)

It does technically work, but it slows my game from a constant 60fps to 30 with just one Unit

I did also notice that my gpu is not doing any work, so maybe its related to that, but i have no experience with with it

I do hope it's just one of those problems where i don't know how to ask and thus can't find the solution

patent dagger
# modern depot I've actually already mentioned this back in <#732288982691348601>, but I'm unab...

first of all, your rig is pretty complex, and unlike regular Sprite2Ds, Polygon2Ds won't be batched even when using the same texture. So that can make it much less performant, but if it isn't an issue just rendering the Rig on its own i doubt that would be the problem.

Secondly, what resolution is the Subviewport set to? Maybe it's a lot higher than you would need given how big the ViewportTexture will then be rendered in the 3d world.

modern depot
patent dagger
#

can you show a screenshot of the SubViewport's settings?

modern depot
#

I'm outside rn so it gotta be later

#

Apologies

patent dagger
modern depot
patent dagger
karmic forum
#

Technically speaking, Limbus doesn't do that, actually

modern depot
#

I've realised, yes

#

But i do want to try a 3d approach

karmic forum
#

It's not exactly what I mean

#

they have an animated idle sprite + a set of sprites for moving/Dodging/attacking/Hurt

You can just pre-render a set of motions and use them as animated sprites

modern depot
#

The look pretty smooth from what i remember

karmic forum
#

just as an example

modern depot
#

Ive been bamboozled

patent dagger
# karmic forum just as an example

you sure this is really just a single animated sprite? because i have often seen wiki's just show those, but the game internally still uses Rigs for animation.

karmic forum
patent dagger
#

i mean that could just have been a stylistic choice

patent dagger
#

but yeah, that's definitely not done wiht a rig

karmic forum
#

I think it is done with a rig - the weapon is definetely skewed

#

just not in-game

patent dagger
#

yeah, prerendered

modern depot
#

Honestly i can see prerenders working in my favour

karmic forum
#

maybe in something like Illustrator or equivalent program

patent dagger
#

but i mean doing it in real-time should still be feasible.

modern depot
#

Godots animation editor is pretty wacky ..

karmic forum
#

AFAIK Godot isn't really fit for animation

#

that could work though for when you need dynamic animatons

#

like if your char is walking AND holding a gun while looking in the aiming direction

modern depot
#

Im not making a system where they can wield different weapons

#

At most those dynamic stuff is probably just hair or cloth physica

karmic forum
#

also I looked up - you most probably wuld need to use GPU for all that, it will 100% improve your fps

modern depot
karmic forum
#

Uhhh... Idk, lol

#

never looked into that until now

pulsar ingot
#

from having used subviewports into textures for many objects like cards... might be worth looking into making a 3d rig (that's plain like a 2d object)

modern depot
#

i think im considering just going with the pre-rendered Sprites

#

more editable for an artist like me anyways

#

but for the sake of resolving this for whatever next person that needs it

patent dagger
modern depot
#

and i take back what i said, even in 2D my frames are getting tanked

patent dagger
modern depot
#

looks like this is a no bueno

patent dagger
modern depot
patent dagger
#

although of course only if that logic would still be executed even when the rig is hidden. Alternatively you could see how the fps react when you reduce the render resolution a lot.

#

could you maybe show how the polygons look like structurally?