Huh, so #godot doesn't really have a good solution for rendering a view model on a separate viewport/camera (like for a first person weapon), but also having that viewmodel be lit by realtime lights in the environment?

Follow

@duskdev I've used subviewports and also the disable depth testing flag available in materias/shaders

@duskdev in terms of lighting; the different render layer+subviewport method. Unfortunately I think you might wanna use an extended light which sets itself to be on render layer 1 and also 2 or wherever you keep your viewmodel

I guess a constant question in engine design is which weird dirty hacks to include when basically every genre has different ones in order to work right

@kyra only problem with the depth test thing is what if you have something that has more than one mesh? Then the viewmodel itself gets all funky

@duskdev best answer I got for you is "it sure does man" (this is a joke I know it sucks).
As a game developer who has never created a product anyone has played, my favourite way to do an FPS gun is to make it an object in the world. (This is also a joke, because it's an accurate description of what I'm like)

@duskdev yeah i think your best bet is a subviewport+extra camera+render layer 2 viewmodel and lights that run set_layer_mask_value(2,true) on themselves in the ready function

Sign in to participate in the conversation
Awoo Space

Awoo.space is a Mastodon instance where members can rely on a team of moderators to help resolve conflict, and limits federation with other instances using a specific access list to minimize abuse.

While mature content is allowed here, we strongly believe in being able to choose to engage with content on your own terms, so please make sure to put mature and potentially sensitive content behind the CW feature with enough description that people know what it's about.

Before signing up, please read our community guidelines. While it's a very broad swath of topics it covers, please do your best! We believe that as long as you're putting forth genuine effort to limit harm you might cause – even if you haven't read the document – you'll be okay!