-
Posts
3,618 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by shadmar
-
You can manipulate terrain using Terrain:SetHeight(x,y,z,false) with perlin noise. However computing perlin noise in lua is rather painly slow, lua doesn't do complex maths very fast compared C/C++ witch upto hundreds times faster or GLSL by thousands times faster. (yes I've tested) So I'd recommend using C/C++ or GLSL for the noise generation, rest could be done in lua just fine.
-
Looks great, however shadows only appear every other time I start the demo. GTX770M
-
Used that in a terrain road carving experiment a while ago.
-
If you got 3 points, just use a spline. Example : function smooth( points, steps ) if #points < 3 then return points end local steps = steps or 500 local spline = {} local count = #points - 1 local p0, p1, p2, p3, x, y, h for i = 1, count do if i == 1 then p0, p1, p2, p3 = points[i], points[i], points[i + 1], points[i + 2] elseif i == count then p0, p1, p2, p3 = points[#points - 2], points[#points - 1], points[#points], points[#points] else p0, p1, p2, p3 = points[i - 1], points[i], points[i + 1], points[i + 2] end for t = 0, 1, 1 / steps do x = 0.5 * ( ( 2 * p1.x ) + ( p2.x - p0.x ) * t + ( 2 * p0.x - 5 * p1.x + 4 * p2.x - p3.x ) * t * t + ( 3 * p1.x - p0.x - 3 * p2.x + p3.x ) * t * t * t ) y = 0.5 * ( ( 2 * p1.y ) + ( p2.y - p0.y ) * t + ( 2 * p0.y - 5 * p1.y + 4 * p2.y - p3.y ) * t * t + ( 3 * p1.y - p0.y - 3 * p2.y + p3.y ) * t * t * t ) h = 0.5 * ( ( 2 * p1.h ) + ( p2.h - p0.h ) * t + ( 2 * p0.h - 5 * p1.h + 4 * p2.h - p3.h ) * t * t + ( 3 * p1.h - p0.h - 3 * p2.h + p3.h ) * t * t * t ) --prevent duplicate entries if not(#spline > 0 and spline[#spline].x == x and spline[#spline].y == y) then table.insert( spline , { x = x , y = y, h = h } ) end end end return spline end Visual example, by drawing 20 boxes aling the spline of 3 points points = { } table.insert( points, { x=-5,y=28, h=17 }) -- start table.insert( points, { x=-5,y=38, h=39 }) -- top table.insert( points, { x=-5,y=48, h=17 }) -- end --make spline of points, 20 iterations local arc=smooth( points,20) --visualize arc for k,v in pairs( arc ) do Model:Box():SetPosition(v.x,v.h,v.y) end
-
Nice game. Well done! One question, why the forced windowed mode? If you leave the main.lua defaults it will use your settings on the gameplayer instead
-
Looks great Evayr Steamworks support simple P2P networking between steam users as well as lobby/matchmaking etc. look in header: ISteamNetworking.h https://partner.steamgames.com/documentation/api Maybe Josh will support this on the gameplayer in the future some day?
-
You dont really need a special shader, just do as drarem says and change to a material wich has no depth test and some emission when there is no rayhit, swicth back when camera ray hits. That is what is done in that old video Thirsty Phanter linked. Macklebee has an more advanced shader, but it's advanced stuff to set up, so I'd go with the raycast method.
-
Dynamic Scopes with the Camera Entity
shadmar replied to SleepingHollow's topic in General Discussion
It sounds like you are doing it correctly. -
Run this from a pivot in an empty map: If you change ViewRange to 0,1,2 or 3 it works. But 4, skips the nav entirely. function Script:Start() ground=Model:Box() shape=Shape:Box(0,0,0, 0,0,0, 1,1,1) ground:SetShape(shape) ground:SetScale(40,1,40) ground:SetNavigationMode(true) player=Prefab:Load("Prefabs/Player/FPSPlayer.pfb") for n=0,10 do local b=Model:Box() b:SetShape(shape) b:SetPosition(n,1,n) b:SetScale(n,1,1) b:SetViewRange(4) -- this kill navigation b:SetOcclusionCullingMode(false) b:Turn(0,Math:Random(-15,15),0) b:SetNavigationMode(true) end shape:Release() self.world=World:GetCurrent() self.world:BuildNavMesh() camera=player.script.camera camera:SetDebugNavigationMode(true) end
-
How to theoretically make an labyrinth creator script
shadmar replied to Slastraf's topic in General Discussion
If you want to make perfect solvable mazes with no closed loops, then look up the recursive backtracker algorithm. -
Hard to say without the fbx, your shader looks correct.
-
Yes you can just create a new world with its own camera and 3d objects, render to texture and reuse in the "real world"
-
But you can only set an upwards value, So SetCore(100) followed by SetCore(99) will always show 100.
-
http://www.leadwerks.com/werkspace/page/viewitem?fileid=312811332
-
I think it's heavy on the geometry shader? Rick : Probably slow on integrated and won't compile on AMD/ATI.
-
The firepit uses a spritesheet shader to play a 6x6 animation for the fire. You can easily convert gifs to a spritesheet.
-
FBX importer not importing more than two map channels?
shadmar replied to Michael_J's topic in Suggestion Box
Maybe the gmf (now mdl) format doesn't have support, I think the gmf SDK is downloadable somwhere in here so you can have a look. -
Very nice Josh, looking forward to this!
-
This might help for rotate http://www.leadwerks.com/werkspace/topic/13045-rotating-shader-help/#entry92578
-
-
"../Scripts/HiScores.lua" : 15 : attempt to call method 'GetLeaderboard' (a nil value) I have updated the project. Edit: just some shader billboard files was updated.
-
good job padawan
-
ATI have picky compiler, maybe the log reveals the error. But things to look for are typical float to vecs or vecs to float conversions, vec4 to vec3 conversions etc..