GithubHelp home page GithubHelp logo

Comments (12)

viciious avatar viciious commented on May 15, 2024

I've never quite liked the idea of embedding vertex and fragment programs into shaders. Three points:

  • first of all, q3a shaders are an example of declarative programming, I don't want them to turn into what they are not to be: imperative programs, that is
  • artists and mappers are usually ridiculously bad at shaders and GLSL for whatever reasons. Either they can't be bothered or just lazy.
  • I want to keep shaders *LSL-agnostic, so I wiill still have the liberty of switching the renderer to DirectX/HLSL if I want to.

from qfusion.

poVoq avatar poVoq commented on May 15, 2024

Ok, I get what you mean. But imho the reason artists and mappers are so bad at shaders is that nearly all engines make it damn hard to play around with them (e.g. you will hardly ever find an artist writing a shader from scratch, but adapting an existing on is well within reach) and that only a few have a nice node-based editor for them. However the real advances in the look of a game come when artists actually are able to mess with the shaders, as for example seen with the UDK.

Thus it would be great if you could come up with some way of allowing artists to make custom shader materials. Maybe there could be an way of simply declaring a custom GLSL function in the q3 shader, aka similar to this:
http://openarena.wikia.com/wiki/GLSL#On_to_using_GLSL_programs_within_the_Q3_shader_files
http://openarena.ws/board/index.php?topic=4767.0
?

P.S.: Both Blender and jmonkey3 have now node-based shader editors since very recently and allow for exporting the GLSL code, so it is more likely that an artist will come up with custom GLSL code now.

from qfusion.

viciious avatar viciious commented on May 15, 2024

In my opinion current syntax for materials is more than adequate ana allows
sufficient customization. I do not quite like the OA approach.

2013/6/18 poVoq [email protected]

Ok, I get what you mean. But imho the reason artists and mappers are so
bad at shaders is that nearly all engines make it damn hard to play around
with them (e.g. you will hardly ever find an artist writing a shader from
scratch, but adapting an existing on is well within reach) and that only a
few have a nice node-based editor for them. However the real advances in
the look of a game come when artists actually are able to mess with the
shaders, as for example seen with the UDK.

Thus it would be great if you could come up with some way of allowing
artists to make custom shader materials. Maybe there could be an way of
simply declaring a custom GLSL function in the q3 shader, aka similar to
this:

http://openarena.wikia.com/wiki/GLSL#On_to_using_GLSL_programs_within_the_Q3_shader_files
http://openarena.ws/board/index.php?topic=4767.0
?

P.S.: Both Blender and jmonkey3 have now node-based shader editors since
very recently and allow for exporting the GLSL code, so it is more likely
that an artist will come up with custom GLSL code now.


Reply to this email directly or view it on GitHubhttps://github.com/viciious/qfusion/issues/2#issuecomment-19614076
.

Best regards,
Victor Luchitz

from qfusion.

poVoq avatar poVoq commented on May 15, 2024

hmm, ok. But how would I as a artist/mapper and semi illiterate coder implement something like this for level custom textures:
http://www.zspline.net/blog/deposit-shader-in-mentalmill/
Which is easily doable in UDK without touching the engine code (see here: http://youtu.be/lH6SIFQ0ROE )
and perfectly feasible as something an artist should be able to do by himself?

from qfusion.

viciious avatar viciious commented on May 15, 2024

Ummm, just use the 'material' keyword + snow texture as decal parameter or
another material pass?

2013/6/18 poVoq [email protected]

hmm, ok. But how would I as a artist/mapper and semi illiterate coder
implement something like this for level custom textures:
http://www.zspline.net/blog/deposit-shader-in-mentalmill/
Which is easily doable in UDK without touching the engine code (see here:
http://youtu.be/lH6SIFQ0ROE )
and perfectly feasible as something an artist should be able to do by
himself?


Reply to this email directly or view it on GitHubhttps://github.com/viciious/qfusion/issues/2#issuecomment-19617685
.

Best regards,
Victor Luchitz

from qfusion.

poVoq avatar poVoq commented on May 15, 2024

Ok I looked up the "material" keyword and it seems to me that that is just the regular diffuse/normal/gloss shader used on all surfaces. There is no way this could be combined with a snow decal texture to get the same effect (which is based on taking the world normals and the hight channel of the normal-map to calculate the pixels on the texture that get covered with the snow texture for each in game surface individually).

However do you mean with "or another material pass" that is is possible to easily add another "material" like keyword, lets say "snowmaterial" that loads another custom GLSL shader and applies it to only to the textures with have this keyword in their q3 like shader? However if this case is true, that what would be the big difference to the OA implementation?

Sorry if I seem a bit dense in this regards... I am still struggling to understand all that GLSL shader stuff (and I am more of an artist than a coder).

from qfusion.

viciious avatar viciious commented on May 15, 2024

No, that means you can layer materials like this:

{
material xxxx
}
{
material yyyy
}

But ye, you're right, one can't do per-pixel effects such as reading from
normalmap's alpha channel in the q3a shader. And it'll remain this way for
the foreseeable future.

2013/6/19 poVoq [email protected]

Ok I looked up the "material" keyword and it seems to me that that is just
the regular diffuse/normal/gloss shader used on all surfaces. There is no
way this could be combined with a snow decal texture to get the same effect
(which is based on taking the world normals and the hight channel of the
normal-map to calculate the pixels on the texture that get covered with the
snow texture for each in game surface individually).

However do you mean with "or another material pass" that is is possible to
easily add another "material" like keyword, lets say "snowmaterial" that
loads another custom GLSL shader and applies it to only to the textures
with have this keyword in their q3 like shader? However if this case is
true, that what would be the big difference to the OA implementation?

Sorry if I seem a bit dense in this regards... I am still struggling to
understand all that GLSL shader stuff (and I am more of an artist than a
coder).


Reply to this email directly or view it on GitHubhttps://github.com/viciious/qfusion/issues/2#issuecomment-19643983
.

Best regards,
Victor Luchitz

from qfusion.

poVoq avatar poVoq commented on May 15, 2024

You seem to be avoiding to answer my actual question ;)
Is there an easy way for mappers to make custom per-pixel GLSL materials and load them via the build in q3 shaders?

from qfusion.

viciious avatar viciious commented on May 15, 2024

No, and I said, it's going to stay this way for the foreseeable future.

2013/6/19 poVoq [email protected]

You seem to be avoiding to answer my actual question ;)
Is there an easy way for mappers to make custom per-pixel GLSL materials
and load them via the build in q3 shaders?


Reply to this email directly or view it on GitHubhttps://github.com/viciious/qfusion/issues/2#issuecomment-19685828
.

Best regards,
Victor Luchitz

from qfusion.

poVoq avatar poVoq commented on May 15, 2024

Ok, thanks for the clear answer. Really a pity though.

from qfusion.

viciious avatar viciious commented on May 15, 2024

I'll reopen this issue when I think I've come up with a good idea for
implementation of your feature.

2013/6/19 poVoq [email protected]

Ok, thanks for the clear answer. Really a pity though.


Reply to this email directly or view it on GitHubhttps://github.com/viciious/qfusion/issues/2#issuecomment-19708383
.

Best regards,
Victor Luchitz

from qfusion.

poVoq avatar poVoq commented on May 15, 2024

Maybe this kind of system could be duplicated:
https://github.com/blackberry/GamePlay/wiki/Materials-and-Shaders

from qfusion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.