Horde3D http://horde3d.org/forums/ |
|
Shader question http://horde3d.org/forums/viewtopic.php?f=2&t=998 |
Page 1 of 1 |
Author: | EsaK [ 29.10.2009, 08:53 ] |
Post subject: | Shader question |
Hi, I want to render my model with a solid color, so I made a copy of model.shader and replaced the setting of albedo with a uniform parameter (which I can set in the material file). My question is if this is the "right" way to do it? ... I mean to me it seems unrelevant if the color comes from a texture or a user-supplied value (I have though limited exprerince of shader programming)... If this approach is OK I think it would be nice if the model.shader got updated to also support a user-supplied color value, so that it can handle either a user-supplied value or the color from a texture (as it is now)... maybe this could be handled with a new shader flag (#ifdef statement)? |
Author: | Volker [ 29.10.2009, 09:09 ] |
Post subject: | Re: Shader question |
I guess normally you have textured objects in your scene, because simple uniform colors looks normally not very well in a professional scene. Maybe for quick testing and debugging a fixed albedo color is useful, but I'm not sure if we should add this to the default sample model.shader. After all I guess those shaders are only samples and not ment to be a swiss army knife, but that's only my personal opinion. But concerning your solution for uniform colors, I think that's the way to go. I did it the same way in the color shader for the blender exporter (BTW, someone should update that shader to Beta4 ![]() |
Author: | EsaK [ 29.10.2009, 09:48 ] |
Post subject: | Re: Shader question |
My guess is that this shouldn't be that kind of special situation... you may want to mix simple models (with one color) with more advanced models (with textures) in one scene... at least that is what i want to do in my little game. I think also that some newbies (like me) coming to Horde3D will look for this kind of support... |
Author: | marciano [ 30.10.2009, 21:12 ] |
Post subject: | Re: Shader question |
Volker wrote: I guess normally you have textured objects in your scene, because simple uniform colors looks normally not very well in a professional scene. Maybe for quick testing and debugging a fixed albedo color is useful, but I'm not sure if we should add this to the default sample model.shader. After all I guess those shaders are only samples and not ment to be a swiss army knife, but that's only my personal opinion. I agree with Volker. A solid color is only useful in rare cases when aiming for realistic rendering and we shouldn't make the sample shaders overly complex. It can be useful for creating a special style (e.g. cartoonish) but then you need custom shaders anyway. However, for newbies such shaders can be added to Community Branch or their creation can be explained in the wiki. |
Author: | Saypen [ 31.10.2009, 08:39 ] |
Post subject: | Re: Shader question |
How about adding a shader repository to the wiki? |
Author: | EsaK [ 31.10.2009, 19:42 ] |
Post subject: | Re: Shader question |
marciano wrote: Volker wrote: I guess normally you have textured objects in your scene, because simple uniform colors looks normally not very well in a professional scene. Maybe for quick testing and debugging a fixed albedo color is useful, but I'm not sure if we should add this to the default sample model.shader. After all I guess those shaders are only samples and not ment to be a swiss army knife, but that's only my personal opinion. I agree with Volker. A solid color is only useful in rare cases when aiming for realistic rendering and we shouldn't make the sample shaders overly complex. It can be useful for creating a special style (e.g. cartoonish) but then you need custom shaders anyway. However, for newbies such shaders can be added to Community Branch or their creation can be explained in the wiki. How would a "cartoonish" shader differ from the default sample model.shader, besides using a solid color? (Just out of curiosity and because i'm thinking of using a "cartoonish" style in my game.) |
Author: | marciano [ 31.10.2009, 20:14 ] |
Post subject: | Re: Shader question |
Saypen wrote: How about adding a shader repository to the wiki? This is certainly a good idea! However, the content must mainly come from the community since we are already busy enough with the core system. EsaK wrote: How would a "cartoonish" shader differ from the default sample model.shader, besides using a solid color? (Just out of curiosity and because i'm thinking of using a "cartoonish" style in my game.) Usually the lighting is different, for example the number of shades is very limited or you have an exaggerated rim lighting effect. IMHO, one of the best looking non-photorealistic styles is used in Team Fortress 2. Take a look at their paper for more technical details. |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |