Jump to content

shadmar

Members
  • Posts

    3,618
  • Joined

  • Last visited

Posts posted by shadmar

  1. Not sure fixed would be the correct word, I think it looks more natural when the waterplane refracts the lakefloor and moves dynamicly with the waves. I thought might be a bug in the shader, but I'm not the one to answer that.

    The original water shader only look transparent and doesn't refract at all.

     

    EdIt: and yes I still working on it.. :)

  2. Hi

     

    First thing i noticed about the water in LE is that the waterline is next to invisible and refraction was not there at all making it look kind of invisble at shallow waters.

    I'm an old HLSL guy from 3impact/Rad/OddityEngine so I thought I'd take a crack at the opengl shaders in LE.

     

    Here is a shot when refraction is fixed (based on wave height) and the invisble water when very shallow.

     

    LE_water2.jpg

     

    LE_water1.jpg

    • Upvote 3
  3. Thanks, however they all show up as "Model" when using GetEntityKey and class on the tunnel.sbx scene

     

    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    Model
    ....
    

     

     

    But by using "name" instead of class I can distinguish them :

     

    spot_1
    straight_1
    fancage_1
    fanblades_2
    atmosphere_1
    fancage_1
    fanblades_2
    straight_1
    t_1
    straight_3
    switch_1
    t_2
    t_3
    emitter_2
    doorway_1
    cagelight_2
    cagelight_5
    node_1
    node_3
    ambient_3
    node_1
    node_1
    straight_3
    straight_3
    ....
    

  4. Hi

     

    I found out that LoadScene doesn't fetch lights automagic for me and the old tutorial uses a ProcessScene which doesn't seem to apply anymore.

     

    So if my C++ snip goes like this, how do I get the scene lights (without manually creating them and positioning them), Any tip would be appreciated, thanks.

     

    //Create a world
    world=CreateWorld();
    if (!world) {
       MessageBoxA(0,"Error","Failed to create world.",0);
       goto exitapp;
    }
    //Create render buffers
    TBuffer gbuffer=CreateBuffer(ScreenWidth,ScreenHeight,BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL);
    TBuffer lightbuffer=CreateBuffer(ScreenWidth,ScreenHeight,BUFFER_COLOR|BUFFER_DEPTH);
    //Create a camera
    cam=CreateCamera();
    CreateListener(cam);
    
    //Load the scene
    TEntity scene=LoadScene("C:/Leadwerks Engine SDK/Maps/tunnels.sbx");
    
    //how do I fetch lights from this scene ?
    //
    //

  5. Well I don't expect rad being able to produce same eyecandy as LE.

    But for rad, great :)

    You should also try the E300 plane F released as a plugin, very responsive and destructable on impact.

     

    This thread is now very offtopic... sorry

  6. Just an observation, is this normal ?

    The editor runs at 100% cpu consume from start.

     

    Also this little script, ran from the scripteditor (which should do almost nothing) consumes 100% cpu

     

    require("scripts/constants/engine_const")
    
    --Register the abstract path 
    RegisterAbstractPath("") 
    --Set a graphics mode 
    Graphics(800,600) 
    
    while KeyDown(KEY_ESCAPE)==0 do
    
    end 

  7. Hi

     

    I manage to crash engine.exe when moving camera. This is what I do (just copy paste into the lua editor)

    Is this a local problem for me or ?

     

    Running Windows7 x64 - GF8600M GT 256mb, latest LE from updater.

     

     

    Use WASD and FV and mouse for control:

     

    require("scripts/constants/engine_const")
    
    --Register the abstract path 
    RegisterAbstractPath("") 
    --Set a graphics mode 
    Graphics(800,600) 
    
    -- Create a framework object 
    fw = CreateFramework() 
    --set the camera 
    camera = fw.main.camera 
    camera:SetPosition(Vec3(0,2,-10)) 
    --Create a cube
    cube=CreateCube() 
    cube:Turn(Vec3(0.1,0.1,0.1)) 
    cube: SetPosition(Vec3(0,1,0)) 
    cube: SetScale(Vec3(2,2,2)) 
    --Create a mesh from scratch
    mesh3=CreateMesh()
    surf=CreateSurface(mesh3)
    surf:AddVertex(Vec3(-0.5,0,0))
    surf:AddVertex(Vec3(0.5,1,0))
    surf:AddVertex(Vec3(0.5,0,0))
    surf:AddTriangle(0,1,2);
    surf:SetVertexNormal(0,Vec3(0,0,-1));
    surf:SetVertexNormal(1,Vec3(0,0,-1));
    surf:SetVertexNormal(2,Vec3(0,0,-1));
    surf:SetVertexTexCoords(0,Vec2(0,1));
    surf:SetVertexTexCoords(1,Vec2(1,0));
    surf:SetVertexTexCoords(2,Vec2(1,1));
    UpdateMesh(mesh3)
    PositionEntity(mesh3,Vec3(2,0,-3));
    
    --Create a light 
    light=CreatePointLight(18) 
    SetShadowSoftness(light,2);
    SetShadowmapSize(light,512);
    light:SetPosition(Vec3(3,6,0)) 
    
    --DebugLights(1) 
    --Create ground 
    --cube2=CreateCube() 
    --cube2: SetPosition(Vec3(0,-2,0)) 
    --cube2: SetScale(Vec3(20,1,20)) 
    
    --terrain
    terrain=CreateTerrain( 512 ) 
    TerrainDetail( 10 ) 
    --terrain:SetPosition(Vec3(3000,0,0)) -- this doesn't work ?
    fw.renderer:SetWireFrame(1)
    
    --Move the mouse to the center of the screen and hide it 
    MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2) 
    HideMouse(1) 
    camrotation=Vec3(0)
    
    --Create the main loop 
    
    --while AppTerminate()==0 or KeyDown(KEY_ESCAPE)==0 do 
    while KeyDown(KEY_ESCAPE)==0 do
    
    --spin something
    cube:Turn(Vec3(0,0.1,0.1)) 
    mesh3:Turn(Vec3(0.1,0.1,0.1)) 
    
    --Camera rotation 
    gx=Curve(MouseX() - GraphicsWidth() /2, gx, 20) 
    gx=Curve(MouseX() - GraphicsWidth() /2, gx, 20) 
    gy=Curve(MouseY() - GraphicsHeight() /2, gy, 20) 
    camrotation.x = camrotation.x + gy / 100
    camrotation.y = camrotation.y - gx / 100
    camera:SetRotation(camrotation,1)
    
    --Camera movement 
    move = Curve(KeyDown(KEY_W) - KeyDown(KEY_S), move, 10) 
    updown = Curve(KeyDown(KEY_F) - KeyDown(KEY_V), updown, 10) 
    strafe = Curve(KeyDown(KEY_D) - KeyDown(KEY_A), strafe, 10) 
    camera:Move(Vec3(move/10, updown/10, strafe/10))
    
    fw:Update() 
    fw:Render() 
    Flip(0) 
    end 

  8. hey shad... what're ya doin on this end of the universe... got bored with 3DRAD already?

     

    you made some really nice stuff over there... the terrain editor was great... and i liked your infinite terain flythru demo...

     

    i think you'll have some real fun over here... leadwerks has better graphics capabilities with less pain than the shader implementation you're used to with RAD...

     

     

     

    --Mike

     

    3dRad is still great, but physx-integration seems to be the main focus atm, after I got the hang of HLSL I'm more the shader and vertex type.. So I'm starting out fresh here, got myself a lua quadtree and playing around with vertices and LOD. I also might have a look at LE's GLSL shaders some time.

     

    Infinite terrain is still on my todo, maybe in LE or 3impact. Too hard in 3drad since I can't displace vertices (except for displacing in the vertex shader via HLSL).

    I must admit LE does shadows/lightning very easy/automagic, and the API is so far working out for me.

     

    I've been snooping around the forum abit and I find your gameobjects to be a very interesting concept.

    How's that sub game coming along by the way ? :lol:

     

    Shad

×
×
  • Create New...