Jump to content

Gandi

Members
  • Posts

    295
  • Joined

  • Last visited

Posts posted by Gandi

  1. Hi!

     

    Is there a way of deleting single vertices from a surface??

     

    €: Adding some more questions as i dont wanna spam the forum:

     

    How can i add something to the transparency layer in the editor and add some textures to my shader then (color and depth buffer)?

    How can i set values in my shader in the editor?

  2. Sorry for triple-posting, but there seems to be something wrong with Key.LeftShift. Neither RenderContext.KeyDown( Key.LeftShift ) nor RenderContext.KeyHit( Key.LeftShift ) do ever return true... any other Keycode I tried did.

     

    Edit: Okay, all the left and right ctrl, shift and alt-keys don't work for me. Could be something with the german keyboard but I'm not sure.

  3. Hm... I tried the sample project but obviously the Render, PreRender, AfterRender, etc. events are only fired once at startup. I also just see a white background with a red border and a red cross in the middle oO

    I copied all dlls to where they should be.

     

    Any ideas?

     

    E: Okay, the output window says: (translated to english)

    An exception (first chance) of type "System.DllNotFoundException" occurred in OpenTK.dll.

    An exception (first chance) of type "System.TypeInitializationException" occurred in OpenTK.dll.

    An exception (first chance) of type "System.DllNotFoundException" occurred in OpenTK.dll.

    An exception (first chance) of type "System.AccessViolationException" occurred in Leadwerks.dll.

    An exception (first chance) of type "System.NullReferenceException" occurred in LeadwerksControlSample.exe.

     

    I don't get why it says DllNotFound. Where am I supposed to put the dlls? I tried the bin/Debug and bin/Release folders, the SDK dir, the project dir and the solution dir but none works.

  4. Made some changes, added some features.

    Watch the video for further information :mellow:

     

     

    the alpha image is an extra grayscale texture. Had to do minor changes in the mesh.frag file, but seems to work fine now...

     

    When fixed all bugs i think ill share the code again..

  5. Looks nice, just gets a bit weird if stretch your head backbards ^^ meaning if you rotate the camera upwards (so everything is upside down) the flare kinda gets weird just scaled up or so..

  6. Can it be modified so it can use a parallax shader? :blink:

    Would look awsome to have this kind of detail in specific areas.

    Is there a way to use something like 512x1024px? Seems to stretch my texture. or is it bound to the terrain grid in some ways?

     

    EDIT:

    There is a bug somewhere.

    Placed decal. All fine. Scaled decal because they are very huge by default.Still al fine. Closed and reopend editor. Now decal is pitch black and huge again. :)

     

    Shouldn't be a problem with the parallax shader, just edit the material file?

    The way its coded it is only possible to create a quadratic plane.. ans yes it is bound to the terrain grid.. just enable wireframe and you wont see any aditional wires..

     

    Gonna take a look at at cause of the bug, never had this one before..

     

    I changed line 113 to

     

    pos=Vec3(pos.x-offset.x,0.005,pos.z-offset.y)

     

    never had that problem with zsort=1

  7. ok.. posted it in the download section...

     

    Click me

     

    If you find any bugs please report them to me. selection now just works with a small plane in the middle of the decal.. should be enough :)

  8. yes you are right macklebee and the reason i dont just create the surface on the same mesh as the model is is, that i dont move the vertices everytime i move the mesh, and im calculating the rotation/scale on my update code instead of really rotating the mesh..

  9. you will always get strange results when using alpha blend, if not using in its own world, thats because of the deferred shading.

    if your render in the normal world without skipping the invisible pixels the depth buffer will also be written at "invisible" pixels, so the whole plane gets rendered. when lighting the plane gets lightened even if its not visible there --> you see the plane again.

     

    what i was thinkin about is: rendering all visible pixel (alpha=1) in the normal color buffer and rendering all pixels with alpha<1 in another color buffer at the same rendering call.

    then compute the lighting for both buffers and blend the transparency buffer on the first color buffer.

    i know thats pretty much like the transparency world, just that the shadows(exept the pixels with alpha<1) get drawn and that the collisions will also work as it's all in the same world

     

    problems: 1 more computeLighting call

    -when there is a object with alpha<1 behind an object with alpha<1 (but thats also in the transparency world)

    -the shadows dont get calculated for pixels with alpha<1

     

    €: sry.. forgot that i'd also need my own depth buffer then..

  10. I think the HUD needs some detail.

    I also think the movement animation is not perfect. looks a bit strange. a mix of running and walking. also im my oppinion you should try to fade in and fade out the move animation when you start/stop running.

     

    The terrain is grad. really love it.

  11. .....what he said! :P

     

     

    are you able to allow the decal to traverse(project) over multiple objects and the terrain at the same time?

    This system is only meht to be used for terrain and the terrain also shouldnt be changed at runtime.

    you can apply it to objects because:

    the density of the mesh fits exactly to the terrain, so wont cover objects right

    the mesh takes the height values from the terrain for setting the vertex-positions.

     

    I will share the code when i get the selection to work.

  12. I spent the last day on creating a terrain-decal script for the LE Editor.

     

     

    the benefits of my system are:

    the density of vertices is depending on the scale of the terrain.

    So if the terrain has scale of 2meters my decal also got a scale of 2 meters.

    the vertices are updated on the cpu, but only if they are being manipulated. so after placing the decal no more computations are needed for it.

     

    FPS decrease when manipulating a big decal, but if you dont move/scale/rotate it theres no change of frames.

     

    Some Questions:

    How can i archieve, that when clicking on the decal it selects the decal, just like the road?

     

    €:

    Posted my code in the download section

     

    Please report any bugs to me.

    have fun

  13. I Got a model and i painted a material to that model (the model is self.mesh)

    now i want to set the texture0 of that material (SetMaterialTexture() in C)

     

    and im sure its self.mesh im just not sure if i get the mesh's material with self.mesh.material

     

    and i know there is 1 line of code missing.. thats the line where i set the texture :)

  14. It seems like there is a lack of documentation for lua :-/

     

    Im trying to set the texture of a material in the editor.

    atm i got:

    local material = self.mesh.material
    local tex = LoadTexture("abstract::"..value)
    

     

    but i just cant find the command for setting the texture of the material..

     

    another question:

    I create my mesh with lua (like the road) and i want to be able to select the entity by clicking on the plane. how can i get to that?

×
×
  • Create New...