Jump to content

[SOLVED] General Materials, Shader Question


photo

Recommended Posts

Hello and a good day,

 

atm we are using an 'Engine' with which it is easily possible to write HLSL shaders and directly connect it to meshes, set dynamically parameters etc.

(I am not a programmer, so sorry If I do not use the correct technical terms).

 

That is basically the way, to realize every (I'm)possible material, effect, scene, postprocess etc.

In fact we have no real strict render pipeline and for me it feels very open, but at the same time very complex controlling e.g. scenes 24/7/365.

 

But this is what we are doing.

 

So we have our own system for skydome, surface shaders, post effects etc. Nearly all written in HLSL.

 

The main advantage of this method is, that we have control over each and every single scene element on the fly.

Lets say, I can easily apply a very simple shader to a 'static' mesh, have a skinned shader for chars. And parallax shader for terrain, selective soft render shadow, etc.etc. at the same time, but can control each element separately, introduce variables, write expressions, add gui interfaces etc.

 

I would be very happy to have a more defined set for outdoor scenes (what Unigine has) and a quasi fixed material system, with which all the necessary parameters interact and play well together. 

This I experienced so far, using the eval version, which is nice.

 

As we are used to work on a shader level, we are wondering, if/how and how easy it would be, to implement our own ideas into the pipeline.

 

A very good example would be our latest project.

There we have a shader, which we are using to 'simulate' a flowing paper pulp stream in a machine.

It is not very fancy in technical terms, but it is a very handy way to visualize our ideas, and it works very very well.

(Its a displacement shader with animated uvs and maps, dynamic normal creation, shadows, specular, lightmaps, reflections etc.)

 

This whole thing was developed in a very visual manner, experimenting with the shader itself, and instantly checking the result in the scene.

 

How flexible is the workflow with Unigine, how flexible is the Material and the Shader system.

 

As I mentioned, I am not a programmer, but I have very good Ideas about, what we need and what is possible, as well as how workflows can be,

but please also, if possible, answer in a very technical way, as our graphics programmer will definitely understand all the terms.

 

Thank you very much, and looking forward to some ideas.

 

ps. I know, that this cannot be answered as simple as a post, but I am happy to get some directions.

 

Cheers.

Werner
Link to comment

The idea behind creating custom materials, effects and postprocesses is quiet simple. If you've created shaders for your engine already, you'll be able to do so in Unigine as well.

  • You can take existing shaders as an example (they can be found in data/core/shaders/default folder), and create your own materials. Materials are defined in data/core/materials/default/. There, you define, what textures are used, what shaders are used for each rendering pass, list states, parameters, etc. So in you material, you can access all textures, modify them, change texture coordinates, etc. Since we support multiple platforms, our shaders are written both in HLSL and GLSL. If you are going target multiple platforms as well, you'll need to keep that in mind. If not, HLSL will be enough.
  • You can create a custom postprocess (using an auxiliary buffer, for example, check how our render and post postprocesses work). You can check examples of custom postprocess shaders in the SDK: samples/shaders/shaders/
  • You can modify existing shaders as well, though you'll have to merge new updates of shaders manually in this case. (Well, vertex shaders have VERTEX_SHADER definition to include a shader file, so could be OK).

What you cannot do without a source SDK on hand is create new rendering passes/change existing ones. With source SDK, even that is possible.

Link to comment

Dear manguste,

thank you for your answer.

Sounds very good.

 

(I cannot find the data/core/shaders/default folder in the eval kit.)

 

Its good to know, that with the SDK there is a way to do the advanced stuff.

 

cheers.

werner

Link to comment

Ic.

In a sense I would be happy if we can get an idea of this.

 

As we are used to work very intense on shader level, i feel, that we will use this method as well.

 

It would be good to get an understanding.

 

 

Best.

Werner

Link to comment
×
×
  • Create New...