Ogre Version: 2.1
Operating System: Windows 10 (for now)
Render System: D3D11
Hello,
I am looking into the feasibility of porting an existing project (a modified version of OpenMW, currently using Ogre 1.10.11) to Ogre 2.1. Although I have worked on OpenMW for a while, my knowledge of Ogre or rendering libraries in general are extremely limited.
I've read the porting guide and the Wiki articles, e.g. the entry on HLMS
Have I understood correctly that I will need to implement a custom HLMS (e.g. based on Pbs or unlit) for each and every material? Or is it one HLMS per a similar set of materials? Or just the default Pbs material should be sufficient as long as they are modified in code based on the NIF spec?
Note that I'm working with predefined data set from Oblivion, Fallout, Skyrim, etc. They can't easily be changed (and doing so will more or less defeat the aim of using existing data)
Some help to get me started will be much appreciated.
[Beginner] understanding HLMS Topic is solved
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
Re: [Beginner] understanding HLMS
Hi!
It's one Hlms implementation for the entire set of materials.
Whether you want to use one single implementation or a few multiple ones (e.g. each handling similar materials) depends on how different these shaders will be and your personal preference.
e.g. if the materials are extremely different you may prefer to handle in one big Hlms with multiple "if( ) {} else {}" chains, or you may split it into two or more Hlms.
Personally I'd recommend to keep everything within the same Hlms implementation. In Ogre we offer two (Pbs and Unlit) out of the box. Pbs is used for almost everything (for modern renderers looking towards photorealism), while Unlit is a significantly lighter and simpler version for handling stuff that requires no lighting (e.g. particle FXs and UI elements)
I have no idea if these game's materials are similar enough to follow the same approach, or are vastly different.
It's one Hlms implementation for the entire set of materials.
Whether you want to use one single implementation or a few multiple ones (e.g. each handling similar materials) depends on how different these shaders will be and your personal preference.
e.g. if the materials are extremely different you may prefer to handle in one big Hlms with multiple "if( ) {} else {}" chains, or you may split it into two or more Hlms.
Personally I'd recommend to keep everything within the same Hlms implementation. In Ogre we offer two (Pbs and Unlit) out of the box. Pbs is used for almost everything (for modern renderers looking towards photorealism), while Unlit is a significantly lighter and simpler version for handling stuff that requires no lighting (e.g. particle FXs and UI elements)
Perhaps it may make sense to have one Hlms per data set (e.g. one for Oblivion, another for Fallout, etc) but ultimately it depends on how different they are, and how you organize and structure your code.
I have no idea if these game's materials are similar enough to follow the same approach, or are vastly different.
- cc9cii
- Halfling
- Posts: 99
- Joined: Tue Sep 18, 2018 4:53 am
- x 20
Re: [Beginner] understanding HLMS
Hi dark_sylinc, thanks for your response.
I'll head over to the Samples/Tutorials and begin the journey. Thanks again.
I was kinda hoping this would be the answer, to be honest. Sounds like I can start with one Hlms then add more if and when the need arises. OpenMW's Ogre implementation uses 'shiny' library which does something similar - maybe knowing a little bit about that will help me here.dark_sylinc wrote: ↑Wed Jan 22, 2020 9:34 pm It's one Hlms implementation for the entire set of materials.
I'll head over to the Samples/Tutorials and begin the journey. Thanks again.