Jump to content

shadmar

Members
  • Posts

    3,618
  • Joined

  • Last visited

Everything posted by shadmar

  1. Here are som extra skyboxes The two first ones are ChrisV skyboxes converted to LE3 format and ready to use with the code above ;
  2. It is a skybox, not dome and you can replace the cubemap with any cubemap you like.
  3. shadmar

    skybox

    http://www.leadwerks.com/werkspace/topic/7452-skybox-in-30-a-simple-example-with-shader/
  4. I had to delete Leadwerks.dll and Leadwerks.exe, to get the editor to update it. (windows)
  5. For L3DT use scale modifier when exporting RAW like this :
  6. Postprocessing was working unofficially pre june 30 update, but it wasn't supported. You can however use full screen drawimage for some limited usage. Dynamic shadows works for models casting on csg geometry from directional light.
  7. Doing water (again), this is just a 10000,1,10000 box using normalmaps to animate surface:
  8. Just resized a picture to 1024x32, selected VolumeTexture and save. Editor crashes immediately giving this in the log : Loading texture "C:/Leadwerks/Projects/test23/Materials/volume1024x32.tex..." Error: OpenGL error GL_INVALID_ENUM
  9. According to this : http://www.leadwerks.com/werkspace/topic/7088-roadmap-or-eta-on-things-to-come/#entry57938 I think it will (if you upgrade from 3.0 to 3.1), but I guess Josh will have to answer this.
  10. Pacman was popular back in the days.
  11. Lua example : http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/transform/transformplane-r547 This works in c++, but not in lua. The other transform exmaples works ok in lua and c++, but not Plane.
  12. Seems commented i Texture.h //virtual void WritePixel(const int x, const int y, const char r, const char g, const char b, const char a, const int miplevel=0, const int framenumber=0)=0;
  13. Oh I like this, writepixel, neat. Maybe I can splat blood now
  14. No, this would be the same mesh since it instanced from the first one. (not a copy, but an instanced one) You can do the same using a loaded mesh, and just instance it several times, then use a vertex shader to displace height.
  15. Something like this would create a 2 triangle plane: local patch = Model:Create() local surface = patch:AddSurface() surface:AddVertex(-0.5,-0.5,0, 0,0,-1) surface:AddVertex(0.5,-0.5,0, 0,0,-1) surface:AddVertex(0.5,0.5,0, 0,0,-1) surface:AddVertex(-0.5,0.5,0, 0,0,-1) surface:AddTriangle(2,1,0) surface:AddTriangle(0,3,2) patch:SetColor(1,1,0) Then maybe instance more of them and rescale them : local patch2 = patch:Instance() patch2:SetScale(2) patch2:SetColor(1,0,0)
  16. Hi Here one way to do a skybox in 3.0 without interfering with editing in the editor: --Create a camera camera = Camera:Create() camera:Move(0,5,-15) --Create skybox sky = Model:Create() --just render a plane and project cubemap onto it local surface = sky:AddSurface() surface:AddVertex(-0.5,-0.5,0, 0,0,-1) surface:AddVertex(0.5,-0.5,0, 0,0,-1) surface:AddVertex(0.5,0.5,0, 0,0,-1) surface:AddVertex(-0.5,0.5,0, 0,0,-1) surface:AddTriangle(2,1,0) surface:AddTriangle(0,3,2) --position in front of camera but far out to near camera clip plane sky:SetPosition(camera:GetPosition()) sky:Move(0,0,camera:GetRange().y-50) sky:SetScale(camera:GetRange().y*10) sky:SetParent(camera) -- and paint it skymat=Material:Create() shader=Shader:Load("Shaders/Cubemap/sky.shader") skymat:SetShader(shader) skytex=Texture:Load("SkyBox/grimnew.tex") skymat:SetTexture(skytex) sky:SetMaterial(skymat) Shader and example texture attached below :
  17. How to do this using Texture::Create() ?
  18. Yeah this would certainly improve workflow. +1 from me.
  19. What are you trying to do?, I don't understand.
  20. Doesn't look very exiting yet, Testing my own dynamic lod system for perhaps an ocean mesh maybe, using an empty quadtree split method and a dynamic array (instance as I traverse). In lua it's pretty darn fast, depending on Leadwerks to cull my nodes, which seem to work well
  21. What happens if you : 1. Double click the clock mdl file in the asset browser 2. Tools->Calculate Normals 3. Apply, OK 4. Save
  22. Did you even try the changes I suiggested in #3 and #4, works fine if I do it.
  23. You can customize a shader to ignore directional light and paint your inside walls with a material which uses this shader. Open up shader fragment : Find : //Distance attenuation attenuation = lightposition[i].w * max(0.0, 1.0 - distance(lightposition[i].xyz,ex_VertexCameraPosition) / lightrange[i]) + (1.0 - lightposition[i].w); After Add : if (attenuation == 1.0) continue;
×
×
  • Create New...