Gryphon_de Posted August 9, 2011 Posted August 9, 2011 Hello! We'd like to create brand new custom materials for our project. Brand New MaterialIf you, for some reason, want to create a brand new material, do the following: Look at data/core/materials/unigine.mat to study the structure of base Unigine materials. Create a new material declaration in a target material library. Specify a set of shaders (with proper defines) in the declaration—either combine existing shaders or write your own ones. Depending on the set of shaders, add required textures, parameters, and states to the declaration. Check, if the new material is loaded and rendered correctly. There is no data/core/materials/unigine.mat. And without it I don't understand how should I tune all the parameters, states etc. Could you please create some tutorial for brand new materials?
ulf.schroeter Posted August 9, 2011 Posted August 9, 2011 Could you please create some tutorial for brand new materials? Maybe custom viewport mask shader material is a good starting point as it shows basic required components/definitions in a small example. Have a look into material definition and shader code. Another example for extending an existing UNIGINE material can be found here. Also study UNIGINE core material and shader definitions (e.g. data\core\materials\default + data\core\shaders\default)
hintuc_de Posted August 11, 2011 Posted August 11, 2011 We need with common material with all textures, effects, options and etc. How to create it? May be add to UnigineEditor tool - UnigineMaterialEditor,in that leveldisigner can be create users materials at manual?
binstream Posted August 11, 2011 Posted August 11, 2011 What for do you need to create a custom base material? Is the current set of base materials not enough for your project?
hintuc_de Posted August 11, 2011 Posted August 11, 2011 Artist and modeler created very beautiful object (building), they exported node with big count of surfaces, and automaticaly set material, but for different surfaces need different materials. It is very inconvenient set diffrent material for each surface by manual, we need common material, that will be assign automaticaly when model export from 3dmax.
manguste Posted August 11, 2011 Posted August 11, 2011 There is no data/core/materials/unigine.mat. As Ulf said, please check data\core\materials\default. Unigine base materials are now stored under this folder. Artist and modeler created very beautiful object (building), they exported node with big count of surfaces, and automaticaly set material, but for different surfaces need different materials. It is very inconvenient set diffrent material for each surface by manual, we need common material, that will be assign automaticaly when model export from 3dmax. Assigning materials is a non-iterative task. It is 'done once and forgotten' action. You won't ever need to redo it for the node. Usually assigning materials does not not take much time considering this. Plus, you can select multiple surfaces with SHIFT and assign one material for them in one click.
danni.coy Posted August 11, 2011 Posted August 11, 2011 Artist and modeler created very beautiful object (building), they exported node with big count of surfaces, and automaticaly set material, but for different surfaces need different materials. It is very inconvenient set diffrent material for each surface by manual, we need common material, that will be assign automaticaly when model export from 3dmax. My understanding is that the Max Node exporter already largely does this. It creates a material for each surface based on the max material which can be loaded along side the model. This part of the exporter is written in Maxscript and fairly easy to modify. Here we have been with Unigine for a few years and have built up a substantial material library in Unigine. We have MultiSub materials in Max that match our Library materials and have modified the exporter to optionally create material names but not materials. Models will then automatically hook up to the library materials when loaded.
hintuc_de Posted October 7, 2011 Posted October 7, 2011 1. Пожалуйста добавьте туториал по созданию произвольного материала. 2. Нам недостаточно стандартных материлов, а точнее настроек, которыми они обладают. Translate: 1. Please add a tutorial on creating an arbitrary material. 2. Give us enough base materials, to be exact settings that they have.
manguste Posted October 12, 2011 Posted October 12, 2011 You are right, such tutorial is should be created, but in the near future we do not plan to add it. Check Ulf's example and the default Unigine materials if you do not where to start. On a side note, I hope you do understand that to create a custom material from a scratch you will need to create vertex and fragment shaders for all rendering APIs that are going to be supported (3 DirectX ones and OpenGL).
alexei.garbuzenko Posted October 12, 2011 Posted October 12, 2011 Есть еще один подводный камень с собствеными материалами - периодически внутреннее API движка меняется и собственные шейдеры перестают работать. За время работы с движком (а эвал кит я запросил в декабре 2006го года) не меньше десятка раз приходилось переписывать собственные шейдеры и материалы под новую архитектуру, новые API (DX10 и пр.), изменившиеся слоты текстур, форматы хранения вертексов и т.п. Потому я бы советовал не заниматься собственными материалами, а пытаться работать с тем, что есть. -- There are lots of caveats in custom materials development. Internal shader API and architecture often changes forcing you to rewrite or refactor your materials almost with every engine update. I'd strongly recommend you to use default engine shaders to avaid these problems and tons of unneeded work.
steve3d Posted October 14, 2011 Posted October 14, 2011 I think that modification of custom shader in every sdk release will not happen so frequently, and another way, would we create tons of new shader? So that modification is acceptable.
Recommended Posts