Jump to content

Einlander

Members
  • Posts

    778
  • Joined

  • Last visited

Everything posted by Einlander

  1. Make a copy of the model and change the material on the copy.
  2. Is there a polygon limit? There are some situations where is almost covers the whole model properly, then it looks like it gives up.
  3. For modeling software, I also made a list of software and some thoughts about them. http://www.leadwerks.com/werkspace/topic/10046-what-3d-modeling-tools-do-you-use-what-do-you-recommend/
  4. There is always the option to make a wikibook for leadwerks. We can always use the same game idea and book structure as unity or a similar engine. This way when it needs to be updated someone can and new sections can always be added.
  5. I wouldn't go that far about ATI. I only have problems with exactly 1 piece of software when it comes to ATI cards. That and any software that thinks using hardware Physx is a good idea. How is it that my 8 core 4Ghz processor and 2 R9 270x gfx cards struggling to run Borderlands 2 on max settings and max Physx? Because NVIDIA made the tools and basically told and users to f off. If you can't tell I'm bitter against NVIDIA. (got a nvidia motherboard, with NVIDIA chipsets and built in NVIDIA gfx card? Installed an ATI gfx card? Gonna have to disable hardware Physx)
  6. The latest Amd Catalyst Omega drivers don't work with Leadwerks. (R9 270x 2gb)x2 crossfire
  7. Einlander

    Multi-threading woe's

    Can't you just call the map.load hook every entity to update an animated icon? It would be like this script http://leadwerks.wikidot.com/wiki:entityindexer but instead of indexing them you are manually drawing to the screen and syncing it. It would look jerky but you know its loading. Also if you know how many entities there are in the level ahead of time (say you wrote a loading script to count it for you and stored the info in a file) you can do a proper progress bar.
  8. Leadwerks only deals with triangles so the exact number would be 400^2 Also Leadwerks uses Newton physics.
  9. A 200x200 grid plane takes around 20seconds to generate a collision, 100x100 is from .4 to 4 seconds.
  10. You can create tiles with prebuilt waypoints. The road waypoint has a key saying its a road, the sidewalk has a waypoint saying its a sidewalk. Cars only look for car waypoints and people look for sidewalks. The complicated part is getting the car to plot a path from a location to another exclusively using waypoints.
  11. That worked beautifully. I was trying to apply the texture coordinates for every single triangle individually. I also added a scaling feature. The new function for all thoe intrested. function Script:MakeTerrain(TerrainSize,texscale) --texscale must be => 1 if ( (texscale == nil) == true or (texscale <= 0) == true) then texscale = TerrainSize end local terrain = nil terrain = Model:Create() terrain:SetColor(0.5,0.5,0.5) local surface = terrain:AddSurface() -- add vertexes and uv's System:Print("Generating Vertices") for TerrainWidth=0 , TerrainSize do for TerrainDepth=0 , TerrainSize do surface:AddVertex(Vec3(TerrainWidth*self.TerrainSquareSize,0,TerrainDepth*self.TerrainSquareSize), Vec3(0,1,0),Vec2((TerrainWidth / TerrainSize)*texscale, ((TerrainDepth / TerrainSize)*texscale)*-1)) end end -- add triangles System:Print("Generating faces") trianglestrip = 0 System:Print(tostring(surface:CountVertices())) for triangle = 0 , (TerrainSize*TerrainSize)+(TerrainSize-2) do --(surface:CountVertices())/2 do point1 =trianglestrip point2 =trianglestrip+(TerrainSize+1) point3 =trianglestrip+(TerrainSize)-(TerrainSize-1) point4 = point3+(TerrainSize+1) --System:Print("Bottom:"..tostring(point1+1).."|"..tostring(point2+1).."|"..tostring(point3+1).."["..tostring(point4+1).."]") --System:Print("Top:"..tostring(point2+1).."|"..tostring(point3+1).."|"..tostring(point4+1)) surface:AddTriangle(point1,point3,point2) surface:AddTriangle(point2,point3,point4) trianglestrip =point3 end surface:Update(true) System:Print("") return terrain end This isn't quite ready for prime time. I need to swap the direction of the triangles every other row as described here: http://dan.lecocq.us/wordpress/2009/12/25/triangle-strip-for-grids-a-construction/ and that should be easy enough. A last question, Is it possible to change the material for a single polygon as if it were a multi-material mesh?
  12. I'm trying to make a terrain generator, I have the mesh plane generated, but I'm at a total loss at how to generate the uv's for all the triangles. This is the code that I currently have. How would I go about programmaticly adding uv's? function Script:MakeTerrain(TerrainSize) local terrain = nil terrain = Model:Create() terrain:SetColor(0.5,0.5,0.5) local surface = terrain:AddSurface() -- add vertexes System:Print("Generating Vertices") for TerrainWidth=0 , TerrainSize do for TerrainDepth=0 , TerrainSize do surface:AddVertex(TerrainWidth*self.TerrainSquareSize,0,TerrainDepth*self.TerrainSquareSize, 0,1,0) end end -- add triangles System:Print("Generating faces") trianglestrip = 0 System:Print(tostring(surface:CountVertices())) for triangle = 0 , (TerrainSize*TerrainSize)+(TerrainSize-2) do --(surface:CountVertices())/2 do point1 =trianglestrip point2 =trianglestrip+(TerrainSize+1) point3 =trianglestrip+(TerrainSize)-(TerrainSize-1) point4 = point3+(TerrainSize+1) System:Print("Bottom:"..tostring(point1+1).."|"..tostring(point2+1).."|"..tostring(point3+1).."["..tostring(point4+1).."]") System:Print("Top:"..tostring(point2+1).."|"..tostring(point3+1).."|"..tostring(point4+1)) surface:AddTriangle(point1,point3,point2) surface:AddTriangle(point2,point3,point4) trianglestrip =point3 end -- This is where you would add the uv's System:Print("Adding UV's") surface:Update(true) System:Print("") return terrain end
  13. Are you using a grayscale image as normal? If so leadwerks doesn't support that.Either generate a normal from the diffuse, or try to use the displacement/tesselation for the grayscale image.
  14. This is using today's update. In the editor for example, the scripts folder you can see all the scripts and shaders of all the child folders instead of just the files in the current folder. I'm at work so I can't take screenshots.
  15. What version of catalyst are you using? I have uninstalled the drivers from AMD and I'm currently using the Windows update version but I'm still having issues.
  16. I have not been able to test it with an nvidia card yet. I don't have my Linux box setup to run leadwerks and I have to install msvc++ runtimes on my tablets so I can test it on intel/powervr gfx.
  17. Awesome modeling. You succeed where I fail and thats UV mapping. Good job!
  18. I'm going to guess it's connected to this http://www.leadwerks.com/werkspace/topic/10988-editor-no-longer-allows-the-copying-of-prefab-copies/
  19. Awesome pics, as for the gloss, more light less specular for materials.
  20. I have ran across that, but in my case I needed it to fire for every entity that enters it. Using the wikidot script, I can push an entity into it and then I have a free pass to go through without dying. It gets worse if they make it so it just hurts people and not kill them. For example I wade into acid and then people chase after me. I would get all the damage and no one else would. I do have a collision trigger script that is capable of tracking multiple entities entrances, exits and if they are just idling in the trigger. It is complicated due to me coding it to be network multiplayer friendly.
  21. While making my game I ran into a situation where I needed to kill the player reliably and not depend on fall damage. The solution was to create a trigger that when the player touches it, they die. Kill_trigger.lua function Script:Collision(entity, position, normal, speed) if entity.script then if entity.script.health>0 then if type(entity.script.Hurt)=="function" then entity.script:Hurt(entity.script.health+1,"WORLD") end end end end WARNING: If the player is to FALL ON TOP of the trigger, the kill trigger MUST be almost paper Thin. Otherwise your dead body will keep bouncing as if were on a trampoline. I used it for when the player falls in the water. When they fall in the river they die/drown.
  22. In the latest beta you can no longer make a copy of a prefab, and copy the copy of the prefab. Also if you you make multiple copies of the first prefab instance and put them in a group, then try to copy the group it only copies the first instance.
  23. Hmmm, thats odd.I'll see if i can try it from another computer. Here is a video of whats happening. I have 2 AMD Radeon R9 270X 1GB in crossfire mode. on Windows 7 64
  24. When using the glass material, I assume Leadwerks continues to cull the objects behind the object. This leads to views where most of your level is simply missing. This does not happen in the editor. I have a map uploaded to demonstrate the bug. When you load the map in the editor you will see there are 3 colored boxes at the end of a path. When you start the map BEFORE you start to move, you will only see the blue box. Walk backwards and all the boxes appear. Walk back up to the glass. Strafe left or right. As you get to the edge of the glass the box in that direction appears. You can also make it happen by standing close to the glass and looking left or right. Also is there way in lua to simply disable culling totally in the game? I have other issues with the way Leadwerks culls objects. If not, can I designate an object as something that should not be put in the culling list? trasnparency_bug.zip
×
×
  • Create New...