Search the Community

Showing results for tags 'Node'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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
    • Feeback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • Showcase
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

  1. [SOLVED] ung at runtime

    Добрый день, столкнулся со следующей проблемой: Не могу прочитать файлы из ung архива, созданного в runtime При выполнении приложения выполняются следующие функции: 1) С помощью плагина CadImporter импортирую step файл с иерархией в папку data/imported/step_name/. В папке step_name/ создаются меши и нода: data/imported/step_name/step_name.node data/imported/step_name/sub_shape_0.mesh data/imported/step_name/sub_shape_1.mesh и т.п. В самой ноде при импорте все пути прописываются следующим образом: <node type="ObjectMeshStatic" id="107603081" nam
  2. Hello, we are running into a cpu bottleneck while updating matrices via setTransform on nodes. We do have 50 instances with about 20 subtransformations for each node, which will be updated every frame. Is there a faster/better way to update positions/orientations. Version is 2.8 , renderer is directx. Thank you for your help.
  3. Nodes redistribution

    We are thinking about the way to “redistribute” nodes to our customers. The use case: customer has a binary executable to load several nodes (ship models) at runtime and the list of available nodes must be expandable by providing new models. So the goal is: 1. Create new node (ship model) with materials, textures and so on. 2. Pack this node with required assets somehow. 3. Redistribute this package to customer. 4. Load new node at customer side by using existing binaries. Is there a way to create ung-file from node for future use in other project ?
  4. Hello everyone, I would like to ask, is there any way to provide collision between two nodes? I added two objects as ".node"(FBX) file and tried to set collider on them.But unfortunately I couldn't check any collision is available between them.According to this collision I would like to give some effect like explosions on objects. simply, Unigine::NodePtr node1; Unigine::NodePtr node2; then I initialize node objects for them which is available in Unigine editor,mReference represent parent node(everything works and I can show them in Unigine engine(these two objects are avail
  5. 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
  6. [SOLVED] Node 3D to NDC coordinates

    Hi, I need the 2D screen Position of a 3D Node transformation. Can you write me a short code example with unigine matrices form the Player and Node and perspective division to get the NDC coordinates? auto proj = m_player->getProjection(); auto view = m_player->getTransform(); auto obj = instance->second->getNode()->getTransform(); auto projectedPosition = Unigine::Math::Mat4(proj)*view*obj*Unigine::Math::Vec4(0.0, 0.0, 0.0, 1.0); projectedPosition /= glm::abs(projectedPosition.w); x = (projectedPosition.x+1.0f)*0.5f * m_ungineAppHandle->getWidth(); y = (
  7. Hello, I encountered something weird manipulating BoundingBox with UnigineScript, here's the code part reproducing the problem : BoundBox bb = node.getBoundBox(); //bb.setTransform(mat4(node.getTransform())); vec3 p1 = bb.getMin(); vec3 p2 = bb.getMax(); engine.visualizer.renderPoint3D(Vec3(p1), 0.1, vec4(1, 0, 0, 0.5), 0); engine.visualizer.renderPoint3D(Vec3(p2), 0.1, vec4(1, 0, 0, 0.5), 0); engine.visualizer.renderNodeBoundBox(node, vec4(0, 0, 1, 0.5)); (The code has to be run with engine.visualizer.setEnabled(1); called, and a valid node instance loaded). The visualizer pa
  8. [SOLVED] Node export for Node Reference

    Hi, is it still possible, to export an object or asset, a mesh with materials (which I edited in the editor) as a node, to use it with the node reference? At the moment I can only find the possibility to use an FBX file with a node reference. The issue I have with that is, that I need to edit all the elements outside of Unigine, (e.g. the assignement of the materials). Thx. Werner
  9. Hi, In a unigine script, I would like to save a Node (recursively) in a .node file. I've searched in the documentation in the functions of but it seems that the function saveNode() exists only for C++ and C#. I've tested anyway the function, n) in my unigine script and I was happy (and also surprised) that it works. I need to know : is it an omission in the documentation ? or is it a function that will disapppear later ? Regards
  10. Hi everyone, There are a question about rotate a node, There is the default material in the new C++ project's scene: After rotate the material_ball about Y-axis by these code: node = Editor::get()->getNodeByName("material_ball"); Mat4 transform = node.get()->getTransform(); mat4 rot = rotateY(90.0f); node.get()->setTransform(transform * Mat4(rot)); The material_ball become this: And then I rotate it about Z-axis by these code: node = Editor::get()->getNodeByName("material_ball"); Mat4 transform = node.get()->getTransform()
  11. Hi, I have a world node. I want to find any points z value when I give x and y. What function should I use?
  12. Hi, I would like to create a node hierarchy in a script and add it to the editor. I've made a simple project to test that, with a simple body, a static graphic mesh (child of the body) and a convex shape from the mesh. But when I create the nodes in the script, the mesh appears in the editor's view before i had it to the editor. Here is my code from unigine_project.cpp (the zip of the project is in the attached file also). #include <core/unigine.h> int init() { // load editor if (!engine.editor.isLoaded()) {"editor_load"); } PlayerSpectator camera = new
  13. Hi, In the documentation (, we can see : Node getChild (int id) Returns a given child of the node. Arguments int id - ID number of the child. Return value Child node. is the argument a ID number or an Index number ? If it's an index number, could you update the documentation ? Thanks, Philippe
  14. I'm automating the process of creating tiled terrains through code and I have an unusual problem when saving the node files. <?xml version="1.0" encoding="utf-8"?> <nodes version="1.19"> <node type="ObjectTerrain" id="575191784" name="Terrain_x7_y11"> <terrain/> <lod_distance>20</lod_distance> <lod_progression>2</lod_progression> <flatness_threshold>3</flatness_threshold> <visible_distance>8000</visible_distance> Basically my terrain tag is completely empty. I'm not sure that my script has any knowledge of the terrai
  15. [SOLVED] Ptr Problems

    So, I have something nice and simple. Unigine::Engine *engine = Unigine::Engine::init(UNIGINE_VERSION, acrgc, argv, NULL); for(initialize for loop) { Unigine::ObjectDynamicPtr obj = Unigine::ObjectDynamic::create(); *do stuff - even if all of this is commented out it crashes Unigine::Editor::get()->addNode(obj->getNode()); } While(engine->isDone() == 0) { engine->update(); engine->render(); engine->swap(); } The problem is that it always crashes on update. I've tried to release the obj Ptr but that doesn't work either. Anybody
  16. Hi there, To control the weather in a scenery, I'm using the following code. Like this I can control the height of the clouds received by a Cigi packet. Now, I want to control the clouds in depth, slice, density, etc from the ObjectSky class. But I don't see how to get to this derived class to apply their methods. Node clMiddle =; if (clouds == NULL) { log.message("getNode(clMiddle) failed\n"); } clMiddle.setPosition(dvec3(0.0, 0.0, clBase));
  17. Hi all, I've attached a basic sample based on tracker/nodes_00 sample. Basically it should make the same, but with the following differences: I've added a new node called 'my_statue' loaded from a node file I've added a track parameter to change 'my_statue' position in nodes_03.track When you run the sample 'my_statue' remains static, if you load track in tracker editor you can verify the tracker parameter it's resolved for this node, but the id is different from the id expressed in Nodes editor. Two more observations: In tracker editor, If you change the name to 'my_statue_0' (ac
  18. Hi folks! I'm currently facing a rather annoying issue in Unigine, created by myself and my lack of understanding of course, which I need your help on! My situation is this: I have two characters, I want to calculate the mid-point between these two characters' heads and make a camera inside of the game look at that mid-point. What I am currently doing is: 1. Cycling through bones and finding the head bones of each character 2. Using ObjectMeshSkinned::getWorldBoneTransform to get the transform of each head bone as a mat4 3. Getting the 12th, 13th and 14th values from t
  19. When I export my mesh from max it appears fine in engine. When I export as node I get errors saying can't load .mat, can't load .mesh. I have tried all of the different settings in the node export tool with no success...
  20. Hello, I wanted to know if I have applied a material "red" to Node A and apply material "green" to Node B and if I make Node B child of Node A, will the materials applied to Node B be overidded with materials of Node A? Below is the pseudo code for it nodeA.setMaterial("red", "*"); nodeB.setMaterial("green", "*"); nodeA.addChild(nodeB); I want to this because I have another query on WidgetSpriteNode based on this answer Thanks
  21. I have a DummyNode with a child ObjectMesh, both created via System-script function NewNode(), and the pointers are managed by C++. Child was attached by Unigine::Node::addChild(). I used SetScale() from World script to set parent node scale - all was Ok. BUT. When I moved SetScale() to the System script, it began to set the scale BOTH to parent and child nodes. (C++) - by switching which line, I get different sizes of objects on the scene (of size Scale or Scale^2) ... static void SetScale(NodePtr parentNode, float scale) { //Engine::get()->runSystem("NodeSetScale", Variab
  22. [SOLVED] extended Node class

    I'm making a custom class that extends Unigine's WorldTrigger. I find that two of the constructors below cannot "coexist". These would be the second and third constructors - TriggerObject(vec3 size), TriggerObject(string callback). The interpreter does not throw a correct error in the first place, which took me quite some time to figure out that the class can only work with one constructor but not the other. #ifndef MY_OBJECT_H #define MY_OBJECT_H class TriggerObject : WorldTrigger { public: TriggerObject() : WorldTrigger(vec3_one * 2) { setEnterCallback("OnTriggerEnter", this); setL
  23. Editor Nodes

    May we have a section that contains a list of node types that may be added to the editor? When I first got my hand on Unigine a few months ago, I tried adding a PlayerPersecutor class to the editor, which is of course, not possible, leading to an application crash. My workaround back then was to add a NodeDummy whose position and rotation is set from the PlayerPersecutor instance since I only needed to see if the camera goes where I want it to. I'm in the process of upgrading my Unigine copy which now allows a PlayerPersecutor instance to be added to the editor. Thanks.
  24. Related to this post it would be awesome to have some callback system at WorldClutter and WorldCluster classes at every creation/deletion of dynamic nodes (or batch of nodes). This could make these classes more powerful and dynamic. Thanks!