Replies: 3 comments
-
UPDATE: Someone told me that within Godot's documents, there is some kind of option to toggle between flat/smooth models using shader code, but the models have to be smooth shaded before import, then it can be flat shaded on the fly using said code. I didn't know this was a thing, but I made this thread because it would be more convenient if it was a inspector toggle rather than a setting controlled by code. |
Beta Was this translation helpful? Give feedback.
-
You can emulate flat shading on smooth-shaded faces using a shader to avoid having to export model data twice. (To my knowledge, the opposite isn't possible without manually processing vertices on the CPU.)
I'd argue that a toggle may be superfluous, and you should go with what looks best for your artstyle 🙂 To my knowledge, the only oldschool FPS that provides a flat/smooth-shaded model toggle is Unreal. However, I haven't seen anyone actually play with flat-shaded models nowadays – all the screenshots/videos I can find online show people using the default smooth-shaded option. Don't spend time implementing options that most people won't toggle. This doesn't apply to just games, but to any kind of software development: time is the most valuable resource.
Both of those can be done with shaders just fine. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to that, someone on Twitter showed me after posting this thread to my Twitter, and so far I'm being confused by it, but in case nothing works or I need assistance, at least the Discord can probably help me out. Said person who showed me it on Twitter also linked me to where said shader code is mentioned in the official Godot documentation.
Honestly my game's models by default are going to be smooth shaded due to it's inspiration, but I want to implement a toggle and a buttload of other options in my games for preference for the user. Yes, it's gonna take a lot of time, and I know you really don't want me to do something like this, but in the long run, it can help and amuse a lot of people, so that they can tweak it to their liking. Is all fine. Also thanks to me discovering some N64 shader pack someone made for Godot, I can confirm that weird metallic texture from Sonic Adventure, Half-Life, etc is doable on Godot, and I'll use that to my advantage.
Surprisingly, I've played a lot of Unreal, and I didn't even notice that was an option in the first place, and assumed the models were always flat shaded. Interesting. |
Beta Was this translation helpful? Give feedback.
-
Hey, I'm working on a throwback FPS game (ala Quake, Half-Life, Unreal, etc) within Godot, and something I want to do graphically wise was to replicate the graphics of games from the late 90s/early 2000s. One of the games that is a graphical inspiration to my game is Sonic Adventure, and a big majority of Dreamcast/early PS2 titles. One of the secrets to it's nostalgic graphics, is that a good portion of games, including Sonic Adventure and some Dreamcast titles, use Phong shading, rather than flat shading. That doesn't mean ALL Games had smooth shading, games like SiN, Half-Life, TimeSplitters, and others around that time used flat shading for their models, but it's an interesting concept that I want to implement in my game. Pictured below is what my game currently looks like, the models are flat shaded.
The issue is that Godot doesn't allow you to turn on smooth shading for models. You have to smooth shade it within your 3D software of choice (I use Blender), then export it. This sucks because even if I do want to implement togglable smooth/flat shading, that means I would have to export the same 3D models twice, one is flat shaded, and one is smooth shaded. This is why I want a togglable feature so that not only I can do it within the Godot editor, but it can also be promoted to a variable, so that in the options menu of my game, I can have an option to toggle between flat or smooth models, so if people are disgusted by the smooth models, they can toggle it back to the flat models. I know it could be possible, because I know in OpenGL coding, you can switch between smooth and flat shaded models on the fly, as seen in this diagraph here:
That's all I'm really asking right now, I know my childhood games of mine have other graphical things I want to implement in my game within Godot, like in Sonic Adventure it has gradient lighting in the Dreamcast version, and I THINK it's possible to do it within Godot using shading code, but I'm not sure, unless people can do that, and the weird metallic/mirror textures that Sonic Adventure and Half-Life have, that warp when you move. If anyone is okay with this idea, I would love to see it in the next Godot 3 release, and at max, maybe in Godot 4.
Beta Was this translation helpful? Give feedback.
All reactions