Search the Community
Showing results for tags 'Material'.
-
When I was im QQ20241221-101746.mp4 porting a scene, I found a weird material rendering, and this was the only material in the scene that was messed up,
-
Hi, I created many referenced nodes from an ObjectMeshStatic, and the mesh use a surface material that need to changed UV from node ID. In visual graph I change UV position with "InstanceID" and "Function" nodes. This works, but sometimes the UVs change when we change the position of the object or camera. Thanks for your help.
-
The material I created can be edited by double clicking it. but the material from plugins or somewhere else cannot. Why?
-
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.
-
Hi everyone, I started make video tutorials for Unigine 2.11.0.1 , You can see & use , This is my playlist about unigine, and I hope useful for you. Get started with 8 hours of free video tutorials full of tips you want. Playlist 1 Playlist 2 With respect Ahmad Karami a computer teacher/ author book / test engineer / solo game developer
- 8 replies
-
- 1
-
- ahmad karami
- unigine
-
(and 94 more)
Tagged with:
- ahmad karami
- unigine
- unigine2
- unigine editor 2
- tutorials
- video
- material
- objects
- terrain
- time
- lighting
- scripting
- advanced tutorial
- full tutorial
- download unigine
- install unigine
- setup unigine
- c sharp
- showcase
- demo
- help
- decal
- water
- sea
- ocean
- import
- hackathon
- build project
- particle
- particle system
- all settings
- collision
- physics
- physic
- physics ocean
- fog
- flower
- grass
- time of day
- day
- night
- wind
- field spacers
- fieldshoreline
- field shore line
- trigger
- destructible mesh
- code
- distance two object
- animation
- animation loop
- cloudlayer
- cloud
- clouds
- time lapse
- vr
- panorama
- render settings
- dof
- ray tracing
- global illumination
- cpp
- c-sharp
- examples
- text
- 3d text
- show
- hide
- message
- light
- point light
- spot light
- area light
- cloth
- clutter
- clothbody
- cloth body
- ripple effect
- gui
- ui
- sound
- soundsource
- sound sources
- audio
- sky
- field
- volume
- volumebox
- materials
- node
- water mesh
- water_base
- water pool
- احمد کرمی
- احمد کرمی بوکانی
- پدر علم بازی سازی
-
[SOLVED] Derived custom material sometimes crashes.
sebastian.vesenmayer posted a topic in Rendering
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 -
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
-
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
-
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);
-
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
-
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
-
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!!
-
Export Node, Mesh, Materials and Textures to load them later over c++ api
sebastian.vesenmayer posted a topic in Content Creation
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 -
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
-
Add StructuredBuffer support to material file/api
helmut.bressler posted a topic in Feedback for UNIGINE team
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 -
Why has my rendering completely changed from 2.7.1 to 2.7.2.1
sebastian.vesenmayer posted a topic in C++ Programming
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 -
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
-
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
-
How can I force upload of Material and Mesh data at creation time.
sebastian.vesenmayer posted a topic in C++ Programming
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 -
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
-
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?
-
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
-
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)
-
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
-
Creating child material of "mesh_base" and write custom ambient Shader
Akshay.Patil posted a topic in Rendering
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 ?