Jump to content

Search the Community

Showing results for tags 'material'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to UNIGINE Forums
    • News & Announcements
    • Getting started
  • Development
    • Content Creation
    • World Design
    • Rendering
    • Animation
    • Physics, Navigation and Path Finding
    • UI Systems
    • Sound & Video
    • Editor
    • C++ Programming
    • C# Programming
    • Networking
    • Sim IG (Image Generator)
    • VR Discussions
    • General
  • Improving UNIGINE
    • Documentation
    • Feedback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Add-on Store (https://store.unigine.com/)
    • Showcase
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

  1. The material I created can be edited by double clicking it. but the material from plugins or somewhere else cannot. Why?
  2. Hi, In new editor I can't find the way to specify per instance parameters for properties and materials. In the .node file, these parameters were stored as follows: <node type="NodeLayer" id="1877567429" handled="0" name="layer_building_arrecife" property="cgs_building_arrecife"> <layer>guid://3d26f5abfa9536fdfda15d25830dcc1213be9dfb</layer> <property> <parameter name="floors">5</parameter> </property> <transform>1 0 0 0.0 0 1 0 0.0 0 0 1 0.0 0 0 0 1.0</transform> </node> Can you tell me how can I perform this operation in user interface? Thanks.
  3. [SOLVED] Derived custom material sometimes crashes.

    Hello, we have a custom Material with a custom Shader and a Unigine::ObjectDynamic with custom attributes. Sometimes Engine::do_render() function will halt when call to RenderState::setMaterial(int pass, Material * mat) Line 216 happens with following Error code. Unhandled exception thrown: read access violation. texture-> was 0xFFFFFFFFFFFFFF3F. We update the texture in this material frequently with a new image. What can cause this crash? If it helps I can provide a crash dump. We are runnin 2.14.1 Thanks, Sebastian
  4. hi I would like to find material in Materials list, but case-convention for material can differ. I am interested in way how to find material in case insensitive manner. Now I am using fore approach. void chane_material_on_object(Unigine::ObjectPtr& objPtr, std::string_view materialName) { for (int material_id = 0 ; material_id< Materials::getNumMaterials() ; ++material_id ) { if (aux::to_lower_case(Materials::getMaterialName(material_id)) == aux::to_lower_case(materialName)) { MaterialPtr const & material = Materials::getMaterial(material_id); for (int i = 0; i < objPtr->getNumSurfaces(); i++) { objPtr->setMaterial(material, i); } } } } Thanks for any help
  5. hi, I would like to know if it is possible to set a parameter for post-process material via C++ API. Unigine::Render::setPostMaterials("post_hblur_gauss"); // like Uniigine::Render::setPostMaterialParam("Radius",2.2); thanks
  6. [SOLVED] new Material();

    Hi how do i create an new material where i'm able to set the albedo color true code? I am able to clone a material (NOT base_mesh) and set its metalness. V2.12.0.1 Material mat = Materials.FindMaterial("Cone_material").Clone("mesh_base_0"); mat.SetParameterFloat("metalness", 1.0f); // mesh.SetMaterialParameterFloat4("Albedo_color_multiplier",vec4.BLACK,0); // mesh.SetMaterialParameterFloat4("diffuse_color",vec4.BLACK,0); // mesh.SetMaterialParameterFloat4("albedo",vec4.RED,0);
  7. [SOLVED] Skip Shading for ObjectMeshStatic

    Hello, is it possible to disable Shading on a ObjectMeshStatic. I want to use a rendered Texture on it, but it must not be shaded. I already tried to use it as a emission texture in the material but there ist still shading applied to it. Thanks
  8. Material migration 2.8 to 2.11

    Hello, during migration of some materials i did observe that some parameters names vanished/changed. One particular is "volume_scale", am I right it is "soft_interaction_scale" now? Are there any other names that have changed? Thanks
  9. [SOLVED] unlit shader

    Hi. I'm trying to draw a moving path of an object in lines with Object Mesh Dynamic. like Each world has different environments and settings, making it difficult to express in a fixed color. We want to display a fixed color like a 2D GUI. Which direction should I go? Thanks!!
  10. Hi, is there a fast way to export a Node reference with all its subobjects (objects,meshes,materials,textures) into a single folder. Our Artist imported a fbx file in Unigine Editor and I want only the converted assets, to load it later with the c++ api on the fly at any given location in the filesystem dynamically. I know, that they are saved in the .runtime folder, but it is hard to search for every object/mesh/material/texture manually with a few hundred subobjects uglyfied. Thanks, Sebastian
  11. Hi! I'm trying to change material parameters of "object water global". Problem is that some parameters are not saved or not applied at all. Here's what I do: 1) Create new material and apply it to water object MaterialPtr core = materials->findMaterial("water_global_base"); MaterialPtr newMat = core->inherit(); newMat->setName("my_water_material_0"); newMat->setPath("materials/my_water_material_0.mat"); newMat->save(); 2) Change material parameters MaterialPtr mat = materials->findMaterial("my_water_material_0"); MaterialPtr core = materials->findMaterial("water_global_beaufort_4"); float fog = mat->getParameter("underwater_fog_transparency"); for (int i = 0; i < core->getNumParameters(); i++) mat->setParameter(i, core->getParameter(i)); mat->setParameter("underwater_fog_transparency", fog); mat->save("materials/my_water_material_0.mat"); 3) Restart the app OR reload materials (via 'materials_reload' console command) I expect: All material's parameters are correctly applied and saved. What i got: Some properties are saved and some are not, this makes water look ugly. After a small research i found that some properties (such as 'wave0_uv_transform') are always saved with default value in material's XML file, ignoring what i passed in setParameter(). Properties are applied correctly before you reload the material. Using UNIGINE SDK 2.7.2.1
  12. Hello, it seems to me that the material API and the material file offers only support for Textures and Uniform/Constant buffers as shader resources. It would be great if support for Structured Buffers could be added, i.e. for the material file the following xml tag: <structuredBuffer unit="43" name="myBufferData"/> and for the Material API the following methods: void setStructuredBuffer( int num, const Ptr<StructureBuffer> & structBuffer); Ptr<StructureBuffer> getStructuredBuffer( int num ); Many thanks, Helmut
  13. Hi, I managed it to migrate from 2.7.1 to 2.7.2.1. It works so far when we are not using decals for most of our scene, but we recognized a significant change in the shading. We did no changes to our Material initialization and textures, but the image is brigther and more saturated. Why is this happening? Files attached. Thanks
  14. Hi, I'm evaluating Unigine Engineering for generating large scale environments from GIS data. The landscape tool seems really powerful however I'm having trouble getting my satellite imagery to work. I've imported all the tiles of satellite imagery I have and they line up with the heightmap in the preview window - everything is GeoTiff. However when I generate my terrain, It seems like only the heightmap is being used. My terrain is all there but it's the default grey colour with none of my satellite imagery applied. Am I missing a step? Do I need to merge my satellite data into one single GeoTiff? Thanks, James
  15. Deasaturation per Material

    I would much appreciate a slider 0-1 which desaturates the final diffuse color of a material from the actual color to a grey. (Could be considered if the other direction so e.g. 0- -1 would saturate the material also makes sense.) We once implemented that in our old engine and we used it always. We often have the situation that we need to desaturate certain objects in the scene in a final stage of the project, but it would also very helpful in a prototyping stage while testing compositions. Changing textures and diffuse colors is much too much work. The material system has the advantage as well, because it has a hirarchy. So It would be a feature, which would help us a lot. Thanks Werner
  16. Hi there, we are using ObjectMeshStatic and create meshes on the fly from our own format on cpp side. The materials are also generated on the cpp side and assigned to the ObjectMeshStatic object. When unigine starts rendering and I change the view direction, the application hangs for some time. When I did a complete 360 degree manual turn it is fine. It seems that unigine is not uploading the data to video memory on creation. How can I force the upload for meshes, materials ,shaders and images loaded by cpp code to stop uploading on demand? Best regards, Sebastian
  17. Couldn't find the right matrial

    Hi , I find a big problem that troubled me. If there are two project in the data folder, they all have the same name material testMaterial(the material that create by myself). If I load one project and want to show a picture to the testMaterial, the picture could not be loaded.After remove the other project, the picture could be loaded. This means only one project can be in the data folder. Regards, Willam
  18. In 2.5 materials loads automaticaly after using this statement: NodeReference::create(path) Could you provide me how to load materials in 2.6 ? Same instructions can't find materials' guids. Log outputs: Object::setMaterial(): can't find guid "..." material for "mesh..." obejct Now I solve the problem by using Materials::get()->loadMeterial(path) function with manual pointing to materials' files. Is it more simpliest and/or correct way to load materials?
  19. How would I go about implementing a "flat shaded" mesh material? By flat shading, I mean the mesh should be subject to world lighting, however triangles should be rendered as if all pixel normals are set to the face normal (e.g. for a retro-graphics look with hard-edged triangles). The "brute force" method of achieving this is to duplicate all vertices in the mesh, such that no vertices are shared. Then the three normals for each triangle can be set to the face normal by taking the cross-product of two of the edges. This is not ideal however, since it results in redundant vertex data. How would I implement this using a material? I thought it might be possible to calculate per-vertex face normals using a geometry shader, but I can't get this to play nicely with mesh_base. Is there some sample material or shader code that does this? Many thanks
  20. Hello, When creating a Spline Object over a landscape as Decal, the material associated with it is created as read-only AND connot be inherited from. This prevents us from changing the Material Mask ID, which is created with the default value of 0xFFFFFFFF. This means the decal will appear on all objects, and not only over the terrain. Suggestions: - make this material inheritable from - add a "Material Mask" entry for Spline Decal in the Landscape editor (this would also be a good idea for all created materials)
  21. some red shows in the project

    Hi , First I use the latest version of 2.6, I open the project use our solution but not the Unigine Browser. Sometimes open the unigine project look like a mesh that lost the material which show many red ,but the mesh does not exist really. If I open the unigine project again it looks normal. My description maybe not clear , so I have captured two picture to explain the problem. The two picture is come from the same unigine project . Regards, Wenxin
  22. Hello , I have written a material <material name="my_custom_material" parent="mesh_base" > <options object="mesh_dynamic" transparent="2" order="1"/> <state name="workflow">1</state> <state name="auxiliary" defines="name" pass_defines="auxiliary"/> <blend src="src_alpha" dest="one_minus_src_alpha"/> <state name="deferred">0</state> <state name="ambient" type="switch" items="none,opacity,transparent" transparent="2">2</state> <parameter name="auxiliary_color" auxiliary="1" type="color">1.0 1.0 1.0 1.0</parameter> <parameter name="my_param_a" workflow="1" shared="1" type="slider">1</parameter> <parameter name="my_param_b" workflow="1" shared="1" type="slider">0</parameter> <parameter name="my_param_c" workflow="1" shared="1" type="slider">0.0</parameter> <parameter name="my_param_d" workflow="1" shared="1" type="slider">0</parameter> <shader pass="ambient" ambient="2" object="mesh_dynamic" defines="BASE_AMBIENT,AMBIENT,ZERO_DEPTH" vertex="shaders/my_custom_material.vert" fragment="shaders/my_custom_material.frag" geometry="shaders/my_custom_material.geom"/> </material> But my shader specified in shader tag are not used while rendering , but when i remove the parent material "mesh_base" they are used in rendering . Can you help me ? Can we override the shaders in child material ?
  23. [SOLVED] Error compressing textures

    I'm currently trying to import a 3DS Max scene into Unigine to see how well it translates. I've exported the scene to FBX and imported it into the engine with no issues. The trouble I'm facing is importing textures to create materials with. On all but 6 of my textures I receive an error saying that Unigine cannot compress them. Can you suggest modifications that need to be made to the files themselves, or my process for importing to get them into the project and easily mapped to my meshes? Please see the textures attached in a ZIP file. Thanks! A. CompressedMaps.zip
  24. Real-Time Material/Mesh Swap

    Hi there, I'm wondering if there are any internal Unigine projects, or a scripting example that shows how you can enable real-time material or mesh swapping for an ArchViz scene, allowing users to change fabrics or pieces of furniture at runtime? Thanks!
×
×
  • Create New...