-
Posts
3,618 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by shadmar
-
-
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
- 4
-
-
Looks great Evayr
Coming out really nice! I hope someday we can make multiplayer games for the launcher, that would be pretty sweet.
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?
- 1
-
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.
-
It sounds like you are doing it correctly.
-
Just keep the thermal fans/radiators clean every other month from microdust and you'll be fine (mine is running just as cool since 2 years ago), using compressed air directly into the vents, no need to dismantle anything. Just use very short bursts to prevent condensation and overspinning the fans.
- 2
-
Good choice, I use ROG laptops from Asus myself (G750 JX currently), best gaming laptops in my opinion, best cooling solution yet on laptops.
-
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
-
If you want to make perfect solvable mazes with no closed loops, then look up the recursive backtracker algorithm.
- 1
-
Hard to say without the fbx, your shader looks correct.
- 1
-
Yes you can just create a new world with its own camera and 3d objects, render to texture and reuse in the "real world"
- 1
-
But you can only set an upwards value,
So SetCore(100) followed by SetCore(99) will always show 100.
-
-
The firepit uses a spritesheet shader to play a 6x6 animation for the fire. You can easily convert gifs to a spritesheet.
- 1
-
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.
-
This might help for rotate
http://www.leadwerks.com/werkspace/topic/13045-rotating-shader-help/#entry92578
- 1
-
-
"../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.
-
Very cool!
-
good job padawan
-
till I can work out what's going on with ATI.
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..
- 1
-
A maze:
- 3
-
They are reflections, they are suppose to reflect environment when you move the camera.
Show me a video and your shader.
-
That looks like smoothing problems. What happens if you recalc normals using 35 or 50 degree angle.
Parabolic arc (throwing a grenade)
in Programming
Posted
Used that in a terrain road carving experiment a while ago.