Jump to content

Slastraf

Developers
  • Posts

    705
  • Joined

  • Last visited

Everything posted by Slastraf

  1. Thanks for trying. Is there any fix ?
  2. Yes I hope it was everything. spiderLegFiles.zip
  3. Yes I have used both now and they have the same result. I thought SetQuaternion was going to fix it but it didn't.
  4. I have converted the script and tried to make a lot of adjustments, but so far have not been able to accurately replicate rotation of an already working model without bones. The script is uploaded here, but I don't know why the model with bone (not the green +yellow one) is still acting strangely. It seems to not track the target blue sphere accurately. I have uploaded the bone model before. Really would like to proceed with normal development speed but I sit on this sole issue for two days now and really don't know any fix. //edit In the video the model with bone has 3 "parts" of the leg but the rock box should be on the same position as the blue sphere oldSpiderLeg.lua
  5. Last time I tried to use that it crashed on me. But that was years ago and maybe I had the actual notes.txt or whatever it is importing in some other folder and maybe it crashed because of that.
  6. You can add multiple gradient noise generators to make different type of height maps. You can also subtract height gradually more at the edges and make an island generator. In the library I used I used only one perlin noise, with different octaves and frequency of details in it. if you have less frequency hills will get larger on xz and if you have higher octaves you can get more hills and holes. //EDIT You can also generate Biomes / textures with https://en.wikipedia.org/wiki/Voronoi_diagram Voronoi. basically use one texture ant interpolate between them.
  7. Oh, I thought you needed a W also but it does work like that. This needs to be in the documentation
  8. Here a minimally tested lua funciton to convert from Euler to Quat in LE source http://www.euclideanspace.com/maths/geometry/rotations/conversions/eulerToQuaternion/index.htm function eulerToQuat(x,y,z) --Assuming the angles are in radians. local c1 = Math:Cos(x*0.5); local s1 = Math:Sin(x*0.5); local c2 = Math:Cos(y*0.5); local s2 = Math:Sin(y*0.5); local c3 = Math:Cos(z*0.5); local s3 = Math:Sin(z*0.5); local c1c2 = c1*c2; local s1s2 = s1*s2; return Quat(c1c2*s3 + s1s2*c3, s1*c2*c3 + c1*s2*s3, c1*s2*c3 - s1*c2*s3, c1c2*c3 - s1s2*s3) --[[ w =c1c2*c3 - s1s2*s3; x =c1c2*s3 + s1s2*c3; y =s1*c2*c3 + c1*s2*s3; z =c1*s2*c3 - s1*c2*s3; --]] end
  9. Yeah that pointed me in the right direction, but still not the desired outcome. i will not get a $70 textbook on that so I need to rely on utube now.
  10. Here is the quat test file. I am pretty confident it would work normally on any other thing than a bone. But have not tried it there yet. quatTest.lua
  11. As far as I understand an quatof xyz = 100 is the "lookAt" vektor of the model and "W" the rotation on that axis (global euler x in that case). if it goes from 0-180 it should turn on that x axis ( It is doing just that, but it should never scale itself up. It is a bug.) The point is, neither setQuat or setRot work as they both have inpredictable outcomes. I am 99% sure that the scaling up issue is a bug so that makes quats unusable in LE currently. Can you confirm that ? 2021-04-15 18-40-56.mkv
  12. I have uploaded a version in the downloads tab.
  13. Here is a private video that shows different ways of rotating in Leadwerks and how they all do not work on bones from models. Moreover, I tried using quaternions to rotate the spider leg around the x axis, which worked but scaled the model up in the process for no reason. The red, green and blue are rotated on the x , y and z but none of them actually rotate around the x axis. If you set rotation to global, the outcom eis worse. I am running out of ideas. i have uploaded the spider leg mdl and fbx so you can try yourself. spider leg.zip
  14. View this video Description Inverse Kinematics in Leadwerks.
  15. All random number generators only produce pseudo random numbers and you can use it to your advantage because if you initialize it with a seed like "123" it will always generate the same infinite numbers for that seed. For the terrain height generation I use perlin noise which is like a controlled 2d fractal / noise. I used a cpp library for perlin noise as a height map to set the vertices height of the tiles. It can never be the same if the seed is always different for each new playtrough. But if you you use the same seed you can have the exact same world as someone else.
  16. Yes I can share it, but with the seed you don't need to store it in a db because it will generate the same output every time. I will put it on in a bit. I want to add texture generation and make it more readable / stable. Its missing physics and textures basically. The player is moved by raycasts.
  17. View this video Description See utube desc for more.
  18. It looks like you are drawing it twice. Maybe some other value in a different script (at the position y 100 120 140)
  19. The space behind the screenshot is black. Maybe there is no camera or anything to render above the "last" postrender ?
  20. You wont be able to access the surface in a normal model
  21. Hmmm. I cant tell for sure but copy seems to make it lag even less than Instantiate.
  22. That would be doable if copy takes a long time. For now the Idea is to copy it and iterate over vertices for every new chunk and hide out of bound ones.
  23. I was very happy with performance of Instance. Does Copy have similar performance ?
  24. Here another screenshot without the block. The hole in the middle should only generate 3 times, as the other times the offset for this position is 0. But it is there on every chunk.
×
×
  • Create New...