wxywxy.ji Posted May 9, 2012 Share Posted May 9, 2012 NodeSector Class is loading only mesh , image and texture. unigine engine have delay time for material and Node Load. can unigine engine support seamless background streaming? Link to comment
ulf.schroeter Posted May 9, 2012 Share Posted May 9, 2012 Read this forum thread for some more details. As you already have mentioned at the moment UNIGINE only supports streaming of mesh, images and texture data, but all nodes and material libraries of large world still have to be loaded on startup and stay in mermory all the time. Real zone-based tiled world streaming including node files, properties and material libraries required for "endless" worlds has been discussed several times here on the forum (e.g. this thread), but implementation by UNIGINE is still open. Link to comment
wxywxy.ji Posted May 10, 2012 Author Share Posted May 10, 2012 I have read those threads. can you make sample code that does streaming using unigine engine? Link to comment
ulf.schroeter Posted May 10, 2012 Share Posted May 10, 2012 Have a look into NodeSector documentation. Required steps are quite well explained. Also some code snippets can be found here Link to comment
unclebob Posted May 12, 2012 Share Posted May 12, 2012 Hi, Does Ulf's posts solve your problem or you still need code sample? Link to comment
wxywxy.ji Posted May 14, 2012 Author Share Posted May 14, 2012 i need code sample. i want look at process stream in Unigine Engine. Link to comment
unclebob Posted May 15, 2012 Share Posted May 15, 2012 Hi, For NodeSector usage please take a look at samples/lightmap/loading.cpp. Is that you searching for? Link to comment
wxywxy.ji Posted May 21, 2012 Author Share Posted May 21, 2012 UnigineSDK-source-2012-04-11 not have folder to data/samples/lightmap/. instead exist folder data\samples\lights. not found loading.cpp. Link to comment
unclebob Posted May 21, 2012 Share Posted May 21, 2012 My fault. Its location is in data/demos/lightmap/loading.cpp By the way, here is this code sample in case you haven't demos folder: /* Copyright (C) 2005-2012, Unigine Corp. All rights reserved. * * File: lightmap.cpp * Desc: Lightmap demo * Version: 1.01 * Author: Alexander Zaprjagaev <frustum@unigine.com> * * This file is part of the Unigine engine (http://unigine.com/). * * Your use and or redistribution of this software in source and / or * binary form, with or without modification, is subject to: (i) your * ongoing acceptance of and compliance with the terms and conditions of * the Unigine License Agreement; and (ii) your inclusion of this notice * in any version of this software that you use or redistribute. * A copy of the Unigine License Agreement is available by contacting * Unigine Corp. at http://unigine.com/ */ #include <core/scripts/camera.h> /* */ float time; NodeSector sector; PlayerSpectator player; Unigine::CameraPath camera; /* */ int init() { player = new PlayerSpectator(); player.setZNear(0.1f); player.setZFar(20000.0f); player.setPosition(vec3(12.0f,-2.6f,2.8f)); player.setDirection(vec3(-1.0f,0.0f,-0.2f)); player.setControlled(0); player.setCollision(0); engine.game.setPlayer(player); camera = new Unigine::CameraPath("lightmap/camera/camera.txt"); // get sector sector = node_cast(engine.editor.getNodeByName("sector")); // update resources sector.updateMeshes(); sector.updateTextures(); // increase the loading time engine.console.setFloat("filesystem_delay",0.05f); return 1; } /* */ int update() { // load resources if(sector.loadMeshes() == 0 || sector.loadTextures() == 0) { engine.message("Loading..."); return 1; } // enable sector engine.message("Ready"); engine.console.setFloat("filesystem_delay",0.0f); sector.setEnabled(1); yield 1; if(engine.editor.isLoaded() == 0) { time += engine.game.getIFps(); camera.setFrame(player,time * 25.0f); } return 1; } Link to comment
wxywxy.ji Posted May 21, 2012 Author Share Posted May 21, 2012 thank for reply! node sector is good solution when preloaded. that Node , World And Base Resource. node sector was useless in seamless World. Link to comment
unclebob Posted May 21, 2012 Share Posted May 21, 2012 You can create an array of NodeSectors and use 'update/load' calls when you need to load new chunk and 'clear' calls when you don't need this chunk. This approach could be useful if you want to stream only meshes/textures. Unfortunately, you can't stream properties, nodes and material libraries. Could you specify your use case for streaming? Link to comment
Recommended Posts