-
Posts
705 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Slastraf
-
-
Personally I would use leadwerks stream and make my own parser and file system depending on what I need
for example
names.data
foobar
then loop trough all the lines and read all the data into an array -
I also had trouble in the beginning with the default project settings
-
I had this happen so often to me over years on random applications and feels like this has bugging me ever since.
-
It seems to be very small at 4000 aswell.
In this scene I put the size to 4000 in the editor and did the same thing from before but the player still disappeared.
This is a major issue to the game I want to develop, and even still this should not be the limit to this engine. -
this is enough for collision but to maek your actual wayve more interesting you could add smaller noises at higher frequency than the big wave.
https://www.shadertoy.com/view/MtsXzl- 1
-
I see.
You don't need a displacement map. This can easily be calculated
this is basically a cos function in the range of [0, 8*pi]
pixel(x,y) = cos((y/height)*3.1415926*8)
Just to give you a headstart.
To get the color information you would use the function from above like this disp = (pixel(x,y)*0.5+1)/255
because cos goes from -1 to 1 and if we add one it goes from 0 to 2, then multiply by 0.5 to get from 0 to 1 and divide by 255 to get the color intensity.
- 1
-
The shader still calculates the height of the wave trough a function. It must contain sin / cos.
If you copy that function to lua with the same parameters, it will have mathematically the same result. Which parameters would need to be converted from leadwerks global space to whatever space the shader operates. -
You would need to get the surface of the model.
Not tested here I will give you a tip:
local model = Model:Load("Models/Grass/grass01.mdl") local surface = model:GetSurface(0) local smallest = nil for v=0,surface:CountVertices()-1 do local position = surface:GetVertexPosition(v) --multiply by scale (you mentioned 1500) local vertDistance = self.entity:GetDistance(model:GetPosition()+(surface:GetVertexPosition(v)* 1500)) if smallest == nil or vertDistance < currDistance then currDistance = vertDistance smallest = v end end local posOfNearestVert = model:GetPosition()+(surface:GetVertexPosition(smallest)* 1500)
This probably wont work on the first try, but is an example on how to approach this.
Also you cannot directly get the vertex, but the position as presented -
-
You might use
https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_SetOcclusionCullingMode
SetOcclusionCullingMode to true or false and look at the results.
For this you need to add a script to each decal, or make a "decal handler" that sets this for every decal entity. -
2 minutes ago, Slastraf said:
Update, in the video even an empty project with the fps player and high movement speed, I can get to the "edge".
In this case it seems to be at z + ~1503 and 1513
How come this happens ?I have newest gfx drivers ..
And some more files: -
Update, in the video even an empty project with the fps player and high movement speed, I can get to the "edge".
In this case it seems to be at z + ~1503 and 1513
How come this happens ? -
I have not come closer to the issue, but it might be that I am setting the camera position by SetPosition and the player does not "move", I also place him with SetPosition. Maybe some kind of vector doesnt update the position ?
-
Just now, Josh said:
Floating point errors will occur as you get further from the origin. 2000 units seems a bit low though.
That's what I thought, too
-
When I move the player a long distance from the world origin,
firstly the shadows disappear and after Z > 2000 the screen is totally black
First it is all normal:
then shadows disappear
and then (z> 2000) only things from postrender get drawn on the screen.
Position x:7.6799964904785 y:1.4799995422363 z:1264.5567626953 -- round about here shadows disappear (+-50)
Position x:7.6799974441528 y:1.4799995422363 z:2033.2707519531 -- here black screen (+-50) -
-
-
Hello
I have a problem creating a window in c++, when I use this
window = Leadwerks::Window::Create("Game Test",0,0,1280,720, Window::FullScreen); context = Context::Create(window);
the window will appear correctly but as soon as I try to make it any resolution higher than 1920 1080 the window will not be created.
Is this some kind of surprise windows setting that causes this or is this a leadwerks bug?
-
make a new script
Script.first = nil --entity
Script.second = nil --entityfunction Script:Start()
if self.second == nil then System:Print(">> second is nil") end
end
now drag two random things in each slot of the Script tab and run the game, nothing will happen.
then click on the red x of "first" so it will disappear.
Now for some reason, second will be nil when you run the game again.
I don't know if it has some more details for reproduction but I think this should be enough.
-
Have just gone "around" this issue like this
Quoteworld:GetCurrent():ForEachEntityInAABBDo(self.entity:GetAABB(),"Callback",v)
and for some reason the camera was always in the aabb so i just checked if the entity in the parameter of callback was the camera
-
-
new script editor/better direct support for VS code
better shader workflow(getting lots of engine side bugs while working with shaders)
hair (alpha like leaves.shader but animated), outline shader for selecting things
terrain heightmap generator (from 1..n noise funcitons with custom arguments)
-
Any recent version for a material outline shader available ?
Thanks in advance. -
modular Plugins
This one is going to be interesting
Rotating a bone
in Programming
Posted
This is a really hard thing to do and unfortunately it only ever works with upright bone models.
I made spider legs but modeled them like this
place bone, do not rotate scale etc
extrude it to the top
Then it is possible to rotate them, but also only tested with setrotation()