Jump to content

Einlander

Members
  • Posts

    778
  • Joined

  • Last visited

Everything posted by Einlander

  1. What happens when you attach an empty script to the light?
  2. Working on a shader to animate trees and leaves. The upload will take forever ...
  3. Sounds like what happens in left 4 dead 2 when you set AA to 1x. Lots of pink checkered textures
  4. and entity.script.teamid~=1 and entity.script.teamid==1 This says if teamid is not 1 and is 1. Teamid can't be both. Try removing the teamid~=1
  5. Release basically deletes the object from the world.
  6. Adding Specular Color and Gloss Maps to shaders to accomadate the new 3dcoat texture exports.
  7. Think interpolation, As you get farther from an entity or have a certain amount of entities on screen you reduce the amount of animation steps you actually Process. Look at the Creatures in the background. The animation is in sync but the number of animation frames processed is reduced.
  8. Unity is left handed. Unreal seems to be able to switch if they want to. The big 3d modelers use z up. Interesting discussion here http://answers.unity3d.com/questions/38924/unity-is-a-left-handed-coordinate-system-why.html
  9. You're right, I didn't see when you used the Time:GetSpeed. So you have basically all bases covered.
  10. You could create a billboard studio tool that takes pictures at all the right angles. Seems like the bill boards would solve some of the lod needs
  11. The default character controller is programmed to update on physics instead of on world. This gives it constant motion that is independent of fps. On leadwerks the physics is already time adjusted. Your version will start to misbehave on very high or low fps. This becomes a concern when you have to do something within a set time. If fps is low the time will run out before your done, if its high you will be done before the time runs out.
  12. So I worked on this some more and ran into a few issues and some questions. Can sprites cast shadows? If no then it will cause problems with immersion. For example power lines outside in the day. I would expect those to have shadows. Next is you can't attach joint's to a mesh without bones as far as I know. So since we are generating the rope on the fly this is a no go. Finally slack in a rope. You can define the number of control points and how much slack they have from the next point. This is done by offsetting the control points by the slack amount on the z axis. This is a recipe for disaster. My solution that I'm going explore something that I found n some unity forums. They simply create a mesh with vertexes at each joint location and deform it to match the joints location as it moves. I have some family business to attend to so the next presentation may take a while.
  13. Good post, I was completely lost with the sprite part. I'll experiment with something additional too.
  14. Here's what a night of no sleep accomplishes. So this is an almost complete dynamic rope creation system. You create 2 pivots, one start, one end. You attach this script to the start and drop the end entity on the end point box. It will then string joints between the 2 points. You can set the amount of slack there is in the rope. To make it hang from the ceiling like a gymnasium rope or a broken power-line, just add mass to 1 of the ends. There is a debug mode that will show the actual pivot/joint locations. The start is green and the end is blue. The rope goes from black to red as it reaches the end. WHAT NEEDS TO BE DONE: Sprites need to be added to make it look like an actual rope. The rope is invisible when not in debug mode so not much use yet... --[[ Dynamic Rope Alpha By Einlander Description: Creates a rope between 2 points Instructions: Create 2 pivots, attach this script to the start, and drop the end on the End point box, adjust settings and go. TODO: Add sprites to actually draw the rope. ]]-- Script.EndEntity = nil -- entity "End Point" Script.Sections = 8 -- int "Sections" Script.Mass = 5 -- float "Mass" Script.Slack = 0 -- float "Slack" Script.Debug = false -- bool "Debug Mode" Script.Info = 0 --choice "Info" "Dynamic Rope Alpha,VERSION .01, By Einlander" function Script:Start() if self.EndEntity == nil then Debug:Error("End Point Entity Empty") end if self.Sections < 2 then Debug:Error("Sections must be 2 or greater") end -- Create boxes at start and finish if self.Debug == true then self.startpoint = Model:Sphere(3,self.entity) self.startpoint:SetScale(.1,.1,.1) self.startpoint:SetColor(0,1,0) self.endpoint = Model:Box(self.EndEntity) self.endpoint:SetScale(.1,.1,.1) self.endpoint:SetColor(0,0,1) else self.startpoint = Pivot:Create(self.entity) self.endpoint = Pivot:Create(self.EndEntity) end start1 = self.entity:GetPosition(true) end1 = self.EndEntity:GetPosition(true) -- place midpoints local i self.midpoints = {} local midpoint = self.entity table.insert(self.midpoints, midpoint) self.joints= {} for i = 1, self.Sections do if self.Debug == true then print(i/self.Sections) end -- Math formula from --http://stackoverflow.com/questions/2886092/finding-coordinates-of-a-point-between-two-points --https://archive.is/ME00H [ archive just in case] result = Vec3() result.x = (start1.x + (i/(self.Sections)) *(end1.x - start1.x)) result.y = (start1.y + (i/(self.Sections)) *(end1.y - start1.y)) if (i~= self.Sections) then if self:IsEven(i) == true then result.y = result.y + self.Slack else result.y = result.y + (self.Slack * -1 ) end end result.z = (start1.z + (i/(self.Sections)) *(end1.z - start1.z)) if self.Debug == true then local midpoint = Model:Box() midpoint:SetScale(.1,.1,.1) midpoint:SetColor((i/(self.Sections)),0,0) midpoint:SetPosition((result),true) midpoint:SetMass(self.Mass) table.insert(self.midpoints, midpoint) else local midpoint = Pivot:Create() midpoint:SetPosition((result),true) midpoint:SetMass(self.Mass) table.insert(self.midpoints, midpoint) end end local midpoint2 = self.EndEntity table.insert(self.midpoints, midpoint2) --set joint physics --start anchor local temppos = self.midpoints[1]:GetPosition(true) local tempjoint = Joint:Ball(temppos.x,temppos.y,temppos.z,self.midpoints[2] ,self.midpoints[1]) tempjoint:DisableLimits() table.insert(self.joints, tempjoint) --middle points for i = 2, #self.midpoints do local temppos = self.midpoints[i-1]:GetPosition(true) local tempjoint = Joint:Ball(temppos.x,temppos.y,temppos.z, self.midpoints, self.midpoints[i-1]) tempjoint:DisableLimits() table.insert(self.joints, tempjoint) end --end anchor local temppos = self.midpoints[#self.midpoints]:GetPosition(true) local tempjoint = Joint:Ball(temppos.x,temppos.y,temppos.z, self.midpoints[#self.midpoints],self.midpoints[#self.midpoints]) tempjoint:DisableLimits() table.insert(self.joints, tempjoint) end function Script:IsEven(number) if (number % 2 == 0) then return true end return false end
  15. I'll see if I can extract my platform code to be standalone. It's not physics based.
  16. Get a texture with text so you can read, and add a normal map. Scale it up then run the game. the texture is mirrored and the normal map is not at the same scale but larger. Image:
  17. You simply can not use a regular dll for lua. It must be built for lua http://lua-users.org/wiki/CreatingBinaryExtensionModules and http://lua-users.org/wiki/CreatingBinaryExtensionModules . If you really want to use a dll, there are probably ways to do it, but all of them are non trivial. I recommend luajit because leadwerks supports that. http://luajit.org/ext_ffi_tutorial.html Quick and dirty: local ffi = require( 'ffi' ) ffi.cdef [[ int GetSystemMetrics(int test); ]] local user32 = ffi.load(ffi.os == "Windows" and "user32" ) error("Screen Dimensions " .. tostring(user32.GetSystemMetrics(0)) .. "x" .. tostring(user32.GetSystemMetrics(1))) You will be searching through header files.
  18. I had one that every few cycles sets the physics positions. This forces the physics to update when you want it.
  19. Any chance we can get a map format similar to the gmf format? Apart from its little quirks, it is a beautiful format. backwards compatible and almost future proof.
  20. Einlander

    Art

    Yeah, this is the difference of making assets for Leadwerks and making assets with Leadwerks. The Source Engine had this issue until the community came up with the solution of Propper to turn csg's/bsp's to mdl's. Leadwerks isn't quite at that level where the community can make such tools ,though I am definitely trying, but it may change. But Olby is right, for the majority (read everyone on the steam forums but not here), if its not in the work shop it's not going to be made.
  21. I agree with the other commenters, modding and indie are worlds apart. With modding you base new creations on an established style, theme, and gameplay. You are on what essentially are training wheels. When you create something yourself you're on your own. Also the reason why people have issues with how Unity looks is not really the assests. It's the stock shaders and stock player controllers. This tends to make all the games look and feel the same. Unreal has the same issue if you're not a AAA studio with your own shader designer. With any broad success, Leadwerks will fall into the same problem, and those 2 engines have node based shader creators. With all that said I welcome a more complete asset collection. My suggestion is to have a regular dlc and a pro version where you get the actual textures and maybe the models.
  22. I want to take a physics file and apply it to another model. I would request it be added to the Model editors physics menu option. My use case scenario: I have a open box. Players can place objects into it. NOW is where everthing goes to hell. The player now should be able to carry this box. Polymesh is out of the running because those cant move, all of the other options other decomposition makes closed shells, and decomposition cant handle concave shapes well. You can no longer save csg as a physics shape. This leaves a handmade shape. You can add physics shapes to the model in a 3d editor but in game this will remove your ability to interact with the entity. So you have to be able to create a physics shape externally. This is no longer possible in the current incarnation of Leadwerks. To solve this I have to do an end run around the ENTIRE phyics system to do a simple task. Current process: Create mesh fbx, export. Create physics fbx, export (these are 2 separate ). In Leadwerks load the physics fbx. Open explorer window and find the collision phy. Rename collision phy to the mesh phy This use to be in Leadwerks, it's in the legacy options but there needs to be a way to do this in the new beta and going forward. The engine should not be removing features, it should be refining them. Things it doesn't need should be hid in a menu option because someone somewhere was using it .
  23. Also context scaling breaks some of the 2d draw commands
  24. http://www.leadwerks.com/werkspace/page/api-reference/_/font/fontload-r43 Font:Load("Fonts/arial.ttf",36)
×
×
  • Create New...