Jump to content

njord

Members
  • Posts

    57
  • Joined

  • Last visited

Everything posted by njord

  1. thanks, i will try that now
  2. Rick basically you say that our way of modelling is correct then ? Because another method is to model the terrain plane with small but repeating textures of concrete and grass, then put the lines as seperate geometry on the terrain which was our previous method (the texture sizes were not gigantic in this way). But we had severe aliasing problems when looking at line polygons horizontally. So we changed our method to the one I explained above. What do you think of ideal texture sizes ? Is it ok to use 50-150 4096x4096 textures which occupies a great deal of memory ? Is it feasible ?
  3. Hello all guys. We created a flat rectangular plane for our airport model in 3Dsmax. However airport is too large. So to have detailed textures on the floor, we divided the plane into tiles and textured them seperately. (textures are with mip maps, to avoid texture aliasing) While tessellating the terrain, we tried applying different resolutions of textures including 2048x2048, 4096x4096 and 8192x8192 sizes on tiles. If we shrink the texture size, we need to also shrink that tile's size since we do not want to lose detail. 8192x8192 textures caused some problems with LE editor including access violations. Is what we are trying reasonable ? What is the highest texture size you would recommend us to use in LE ? Please note that a 4096 texture takes up to 22 mb, and we will have at least 50 tiles. If the texture sizes are gonna shrink, tile number will quadruple. Lets say gpu ram is 1GB, texture memory of it is even smaller. What would you recommend us to do ? More tiles, smaller textures OR Less tiles, larger textures ? Also, would you recommend using a single gmf for a large terrain plane with many textures on it , or would you recommend seperate gmf's for each tile ? Thanks in advance PS : You would say, why make very large textures on the terrain ? Repeat (tile) a texture ! Well we cannot do that unfortunately, because there are unique (colored) line patterns scattered on the airport. Textures can only be repeated where there is pure grass or concrete i guess right ?
  4. Basically, when our application is like this : RegisterAbstractPath("./xxx"); Graphics(800,600,0); TFramework framework = CreateFramework(); TLayer layer = GetFrameworkLayer(0); TCamera defaultCam = GetLayerCamera(layer); BP L = GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1); SetGodRays(1); SetHDR(1); SetSSAO(1); SetBloom(1); SetAntialias(1); SetShadowQuality(1); SetTextureQuality(1); OcclusionCulling(1); TEntity ent = LoadModel(std::string("abstract::switch.gmf").c_str()); While(true) { UpdateFramework(); RenderFramework(); } the switch.gmf emissive/glossive greenlight is lit by default. When the RenderFramework(); is changed to RenderWorld(); I cannot see any emissive greenlight. You can see the difference in the below screenshot. The traffic light on the left is rendered with RenderWorld() command, the one on the right is rendered with RenderFramework() command. What I am asking is, what is the minimum code required to make emissive surfaces work, using RenderWorld(); . Afterall, RenderFramework() uses RenderWorld(), RenderLights() etc. on the background right ? Thanks all PS : We are insisting on using RenderWorld for our mirrors, because the performance drops immensely otherwise. However we need to see emissive surfaces such as vehicle signals and traffic lights from our mirrors. Also we need to see light sources, which can be implemented easily by using RenderLights & RenderWorld. screenshot :
  5. Hello all, We create a rain effect in our simulations by moving an area emitter (or a number of area emitters) on the top of the camera. Our particle dds image for rain is a vertical line like this : | . However with the LE version updated to 2.5, rain particles are rotated by a random offset each time I create an emitter , for eg : \ , / , _ instead of | . I believe the function void SetEmitterRotationSpeed(TEmitter emitter, flt rotationspeed) came with the latest LE version along with particle rotation functionality. Setting the rotationspeed parameter to 0 only stops particles from rotating. But particles are still generated with a random rotation (initial) offset. Is there any solution to this problem? Or give me a hint to make realistic rain/snow/hail effect in LE Thanks.
  6. Hello guys. We normally render our scene with framework functions. But for our mirrors, due to performance problems, we get the render with renderworld() function. Ofcourse by creating an extra buffer and using renderlights() function, we can render light sources too. But how to render emissive/glossive surfaces in addition ? Basically I want this : use renderworld(), render light sources, see traffic light working all together. Traffic light model is in LESDK 2.5\Models\Props\Switch. It uses a switch.frag to make the lights glow in darkness by using mesh color as a parameter to shader, on line 183 : gl_FragData[3] = texture2D(texture2,texcoord)*fragcolor.x + texture2D(texture3,texcoord)*(1.0-fragcolor.x); Thanks in advance
  7. njord

    Shadow problem

    Thanks for the information. As I said, the problem does not occur immediately when u open up the scene in the LE Editor. With (non-modified %100 default) daynight script, I left out daynight cycling (started at 6.30 with update rate 10 or 15) and went to lunch. Then I recorded the video you have seen in this post. So problem is there, but unfortunately I still cannot create it deterministically. I have seen this problem in LE 2.4 and 2.5, in daynight 1.0 and 1.3 . This bug existed in our apps for severel months, however lately we've been seeing it far more frequently. It may take seconds, minutes or hours before the bug occurs (random ?). This bug has been observed in multiple computers and LE scenes. The bug has been seen in both LE Editor and in our LE applications. Using daynight script's GUI in the Editor and changing values there -especially day time and update rate may help re-create the problem. Until I find a deterministic way to recreate the problem, just do this : Open up editor and load the scene I attached. Make daynight script time 6.30 AM. Set update rate to 10, daynight must be CYCLING with some rate. Go to a shady part of the airport. Leave it like that and have lunch or dinner. Hopefully you will see the same problem when u return. Thanks!
  8. njord

    Shadow problem

    Quick tip : In editor, open up the scene I attached. Then open up your daynight lua. After the object.light = CreateDirectionalLight() line, insert the below code chunk. You will have a very similar looking-behaving shadow - Although not sure if they are the same. LightRange(object.light,7500)--HACK SetShadowDistance(object.light,8,0)--HACK SetShadowDistance(object.light,40,1)--HACK SetShadowDistance(object.light,80,2)--HACK SetShadowmapSize(object.light,2048)--HACK SetShadowQuality(1)--HACK SetShadowSoftness(object.light,0)--HACK SetShadowOffset(object.light,0.31*5, 5.0, 0)--HACK SetShadowOffset(object.light,0.40*10, 10.1, 1)--HACK SetShadowOffset(object.light,0.70*15, 15.2, 2)--HACK SetShadowOffset(object.light,1.50*20, 20.3, 3)--HACK
  9. njord

    Shadow problem

    And here is the video : if cannot open, plz download some common codec pack
  10. njord

    Shadow problem

    Up until now our scenes with these problematic circular shadows consisted of gmfs only. Meaning we dont have a terrain with heightmap, but only gmfs positioned around. So I have performed another test which includes a small 128x128x1m planar terrain and a part of airport (a simple gmf). *Surprisingly, circular shadow does not fall onto the heightmap terrain, but only on airport model. *I used DayNight_1_3.zip downloaded from asset store without any modification. (Older version of Daynight used to produce the same bug though) *I started daynight cycle at 6.30 AM with a 10-15 updaterate, in LE Editor 2.5. (LE 2.4 used to produce the same bug though) *This problem also occurs on different scenes other than the airport scene attached. - We have seen the problem on many different computers. You can check out the attached scene and reproduce the error. Sometimes you have to give it a long wait You can leave your daynight cycle and check back a few hours later maybe. I will also link a video of the bug, as soon as I can shrink it and upload to the web Thanks! Josh, what about the second exponential parameter in this function, how to use it, what are the default values of it ? I am asking this, because I think by playing with exponential values (instead of 1.0 using values like 1.1, 1.2, 1.3, 1.4 ....) I see circular shadow patterns very similar to our problematic shadows.
  11. njord

    Shadow problem

    I already tried playing with these parameters : SetShadowOffset(object.light, 0.31*2, 1.0, 0)--HACK SetShadowOffset(object.light, 0.40*3, 1.0, 1)--HACK SetShadowOffset(object.light, 0.70*4, 1.0, 2)--HACK SetShadowOffset(object.light, 1.50*5, 1.0, 3)--HACK Can u give me a specific combination for the 0 1 2 3 rd stages ? What about the second exponential parameter ?
  12. njord

    Shadow problem

    Even if I dont use lightrange on directional light, the bug exists. Josh, are you saying I should use even larger ranges for lighting ? BTW this interesting circular shadow pops up after a while during day cycling (- not immediately). Also, can u explain me the parameters of SetShadowOffset and SetShadowDistance ? Am I using them right in my code ? Thanks.
  13. Hello guys. We are using the daynight script downloaded from this forum in our scene. However, during day night cycle, a circular shadow pops up. The problem sometimes occurs after a single cycle, sometimes it just pops up after many cycles. The shadow accumulates slowly as a circle. I could not deterministically recreate the problem. but there are some screenshots attached. I have played with shadow settings , thinking if this is related to shadow acne problem. But none helped, maybe they affected the time for the problem to occur , i am not sure. By the way, tell me please, What is / How to use exponentialOffset in the following function : void SetShadowOffset( TEntity light, flt linearOffset, flt exponentialOffset, int stage ) what is the proper parameters for the below functions ? (part of daynight lua i modified) : object.light = CreateDirectionalLight() LightRange(object.light,7500)--HACK SetShadowDistance(object.light, 24, 0)--HACK SetShadowDistance(object.light, 120, 1)--HACK SetShadowDistance(object.light, 240, 2)--HACK SetShadowmapSize(object.light,2048)--HACK SetShadowQuality(1)--HACK SetShadowSoftness(object.light,0)--HACK SetShadowOffset(object.light, 0.31*2, 1.0, 0)--HACK SetShadowOffset(object.light, 0.40*3, 1.0, 1)--HACK SetShadowOffset(object.light, 0.70*4, 1.0, 2)--HACK SetShadowOffset(object.light, 1.50*5, 1.0, 3)--HACK Another screenshot, daynight script - around midday - circular shadow around camera
  14. Sorry if I sounded aggressive. I didnt mean that
  15. If we are to depend on exe exit like Metatron said, then there is no sense in calling terminate function since Windows gets back the memory you borrowed automatically. Also even freeframewrok is unnecessary at some point, because we are already exiting the application when we call it dont we ? By the way, project creator of Lesdk (2.40 the one I use now) does not even put a freeworld call at the end. It calls terminate directly. I strongly agree with paramecij, there should be an ability to shut down and reinit the engine. Engines run and stop right ? Thats why they are called engines
  16. By the way, I needed this functionality because based on user input and selected simulation vehicle, i need to open a LE window and show things. If the user turns off the 3D window (deletes the particular vehicle), I never know if he will turn it on again. One workaround is to hide the LE window i guess. But I need to hack object oriented architecture of the simulator to do this, because my vehicles are dll plugins, and some of them create LE windows, others dont. I need to pass the windowhandle of vehicle plugin LE win to the simulator classes which is problematic.
  17. I am confused. If no one will ever need to terminate the engine, why is there a terminate function in LE ?
  18. Hello guys. In my application, I want to activate and shut down LE engine multiple times based on user input. Anyone knows how to do it properly ? The below code crashes at 2nd "Graphics" function call. Thanks in advance! #include "engine.h" #include <iostream> void LEapp() { ::Initialize(1);//engine debug mode RegisterAbstractPath("D:/WORKSPACE/LESDK 2.40"); Graphics( 800, 600 ) ; TFramework framework = CreateFramework(); TLayer layer = GetFrameworkLayer(0); TCamera DefaultCam = GetLayerCamera(layer); PositionEntity(DefaultCam,Vec3(0,0,0)); //Set Lua variable BP L = GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1); SetStats(2); while(!KeyHit(KEY_ESCAPE)) { // Update timing and world UpdateFramework(); RenderFramework(); Flip(0); } ::Terminate(); } int main( int argn, char* argv[] ) { LEapp(); std::cout << "SECOND APP" << std::endl; LEapp(); return 0; }
  19. FindWindow did not work somehow. But this worked : Graphics(resolutionX,resolutionY,32); HWND windowHandle = GetActiveWindow(); void setWindowAlwaysOnTop(bool enable) { if (enable) { SetWindowPos(windowHandle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); } else { SetWindowPos(windowHandle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); } } void moveWindow(int posx, int posy, int width, int height) { if (width < 1) { width = resolutionX; } if (height < 1) { height = resolutionY; } MoveWindow(windowHandle,posx,posy,width,height,true); } void showWindowBorders(bool enable) { if (enable) { SetWindowLong(windowHandle, GWL_STYLE, GetWindowLong(windowHandle, GWL_STYLE) | WS_BORDER | WS_DLGFRAME | WS_THICKFRAME); } else { SetWindowLong(windowHandle, GWL_STYLE, GetWindowLong(windowHandle, GWL_STYLE) & ~(WS_BORDER | WS_DLGFRAME | WS_THICKFRAME)); } } Thank you for the answers lads.
  20. Hello comrades. I have two monitors connected to my pc. 1.How can I choose which monitor Leadwerks Application window will be created in ? 2.How can I control on which xth, yth pixel the LE window will pop up (if not full screen) ? 3.How can I make my LE app "always on top" ? I have tried using parts of this example code : http://www.leadwerks.com/werkspace/topic/3433-checking-if-your-game-has-been-started-multiple-times/page__p__31286__hl__setfocus__fromsearch__1#entry31286 however FindWindow never returns a non null value. Thanks in advance!
  21. Of course I bridged them with SLI bridge. And in nvidia settings, I can enable/disable SLI. Unfortunately, I cannot upload screenshots rar file that is 10.5 mb .
×
×
  • Create New...