Add PerPixel Lighting and Rtt to the material scripts

What it says on the tin: a place to discuss proposed new features.
Post Reply
white_waluigi
Goblin
Posts: 253
Joined: Sat Sep 28, 2013 3:46 pm
x 10

Add PerPixel Lighting and Rtt to the material scripts

Post by white_waluigi »

I know that ppl and rtt are not standard features of Opengl, ppl does not yet support the full spectrum of its standard lighting system and rtt is kinda difficult to implement because of the nature of it. And that the material system is meant to just support everything that doesn't need a shader, but i think in order to stay simple and considering that ppl and rtt for shiny objects are clearly the way of the future, i just think it would make sense to put these features in as commands. Because currently, if you want ppl, it seams like you have to use an external shader, which doesn't provide other ogl lighting features or may be incompitable with other materials. And it seams like a shiny car-material that reflects its environment or reflective water is not possible to have as a simple material, without using native code.
It may just be plugin, and not part of the actual code.
this is how i imagined it:

add an option to the lighting paramter:
lighting: vertex,pixel,none
and a variable witch represents the generated envmap around the object with the material, for ie
render_envmap resolution color maxdistance etc...
which can then be applied as an envmap using cubic_reflection

It may brek the rules of the material scripts functonality and may just be impossible for some reason (in which case i am sorry for even bringing it up), but i think it would take ogre in an interesting new direction, where a lot of different high quality materials would be possible right out of the box.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5292
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: Add PerPixel Lighting and Rtt to the material scripts

Post by dark_sylinc »

We're actively working on a solution called HLMS (High Level Material System) that will solve exactly this problem (get pretty graphics without needing shader knowledge).

This is still very WIP, so I don't have much to show for now.
As for RTTs, see the Cubemapping sample from Ogre 2.0 source code repository. It works pretty much like you've described.
white_waluigi
Goblin
Posts: 253
Joined: Sat Sep 28, 2013 3:46 pm
x 10

Re: Add PerPixel Lighting and Rtt to the material scripts

Post by white_waluigi »

Great, thanks a lot. Looking forward to see the HLMS.
I'll have look at the CubeMap example.
Have a nice weekend!
Post Reply