Einlander
-
Posts
778 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Einlander
-
-
I want a filled polygon. I want to feed it the points of a shape like a star, and have it fill it.
- 2
-
I would like something like Context::DrawPoly( {table of Vec2()} )
While doing the 2d drawing, I found that using a scanline fill will IMMENSELY cripple the engine. if you scan-line draw (line by line) 3 squares on screen, you can see an fps drop from 200fps down to 40. and about 7fps if you use debug.
This would help reduce the amount of code needed for gui libraries, and help raise the fps count.
- 1
-
The beta version of leadwerks has this feature.
-
Haha, this made my day. But the reason he has that is to warn the player that he's near, sort of like a "Tling tling" sound
I'm glad you do
But who shall bell the cat? http://en.m.wikipedia.org/wiki/Belling_the_cat
- 1
-
My mind doesn't do curves, humans, animals or plants. Been practicing for years. Ask me to model anything not alive and I can do it in my sleep. Some people just aren't good at it, that's why there are special job positions for them at game studios.
- 1
-
Good work. I for one know I absolutely suck at organic modeling.
-
I'm when I get back from work I plan on filling out a issue report form located here: http://www.amd.com/report
Everyone with an ATI card should fill it out. Maybe they will notice.
-
Check if to see if it has sync(true) that's vsync
-
I wanted to scale my GUI using the setscale command and found some of the drawing commands do not function correctly.
The drawrect command works properly.
The plot command does not scale at all.
The line command does not work properly in straight lines horizontally or vertically, but it does diagonally.
Hear is code to test and explain:
--This function will be called once when the program starts function App:Start() --Initialize Steamworks (optional) --Steamworks:Initialize() --Set the application title self.title="MyGame" --Create a window local windowstyle = window.Titlebar if System:GetProperty("fullscreen")=="1" then windowstyle=windowstyle+window.FullScreen end self.window=Window:Create(self.title,0,0,System:GetProperty("screenwidth","1024"),System:GetProperty("screenheight","768"),windowstyle) --Create the graphics context self.context=Context:Create(self.window,0) if self.context==nil then return false end return true end --This is our main program loop and will be called continuously until the program ends function App:Loop() --If window has been closed, end the program if self.window:Closed() or self.window:KeyDown(Key.Escape) then return false end --Update the app timing Time:Update() self.context:SetScale(2,2) -- everything should be twice as big self.context:SetColor(self:rgbatovec4scalar({255,255,255},255)) self.context:DrawRect(0,0,200,200) -- This is the size the line squares should be at self.context:SetColor(self:rgbatovec4scalar({100,100,100},255)) for y = 1 , 200 do -- this should make a solid square, not rectangle self.context:DrawLine(5, y , 205, y ) -- draw square at an offset so you can see its dimensions in a relative manner end self.context:SetColor(self:rgbatovec4scalar({80,100,100},10)) for x = 5 , 205 do -- this should make a solid square also self.context:DrawLine(x, 5 , x, 205 ) -- draw square at an offset so you can see its dimensions in a relative manner end self.context:SetColor(self:rgbatovec4scalar({255,0,0},255)) self.context:DrawLine(0,0,200,200) -- the line is off from actuall 0,0 by a few pixels but it is the size self.context:SetColor(self:rgbatovec4scalar({0,255,0},255)) self.context:Plot(200,200) -- this should actually be at the edge of the white box but its at real cordinates 100,100 --Refresh the screen self.context:Sync(true) --Returning true tells the main program to keep looping return true end function App:rgbatovec4scalar(rgb,a) return Vec4(rgb[1]/256,rgb[2]/256,rgb[3]/256,a/256) end
As long as this is does not function as intended, my gui will have to be put on the backburner.
-
Leadwerks is the only program I have that has issues with the new drivers. My situation is a bit different because I run a dual crossfire setup with 3 monitors. If a program is running bad it's because of bad optimization or potentially suspect coding.
-
While coding my lua GUI I found that I needed to be able to fill many 2d polygons. After looking at quite a few algorithms (I am very bad at math), I found one created in lua and felt that I needed to share.
It was converted from the Corona lua which was in turn converted from PSP lua. I have modified it to work without change in Leadwerks
See here for examples on how it works: http://forums.coronalabs.com/topic/8084-drawing-a-polygon-with-a-fill/
function rgbatovec4scalar(rgb,a) return Vec4(rgb[1]/256,rgb[2]/256,rgb[3]/256,a/256) end function paintPoly(poly, xoffset, yoffset, rgba) -- [url="http://forums.coronalabs.com/topic/8084-drawing-a-polygon-with-a-fill/"]http://forums.coronalabs.com/topic/8084-drawing-a-polygon-with-a-fill/[/url] local math_floor = math.floor local math_min = math.min local math_max = math.max local polyGroup = {} local n = table.getn(poly) local minY = poly[1].y local maxY = poly[1].y for i = 2, n do minY = math_min(minY, poly[i].y) maxY = math_max(maxY, poly[i].y) end for y = minY, maxY do local ints = {} local int = 0 local last = n for i = 1, n do local y1 = poly[last].y local y2 = poly[i].y if y1 < y2 then local x1 = poly[last].x local x2 = poly[i].x if (y >= y1) and (y < y2) then int = int + 1 ints[int] = math_floor((y - y1) * (x2 - x1) / (y2 - y1) + x1) end elseif y1 > y2 then local x1 = poly[last].x local x2 = poly[i].x if (y >= y2) and (y < y1) then int = int + 1 ints[int] = math_floor((y - y2) * (x1 - x2) / (y1 - y2) + x2) end end last = i end local i = 1 while i < int do polyfillcontex = Context:GetCurrent() polyfillcontex:SetColor(rgbatovec4scalar(rgba,rgba[4])) polyfillcontex:DrawLine(ints[i] + xoffset, y + yoffset, ints[i + 1] + xoffset, y + yoffset) i = i + 2 end end return polyGroup end
- 1
-
any chance we can see it in action in a video?
-
Don't forget the vita, ps4 and xbox one all support Unity.
-
Create a 1 meter cube in leadwerks. Export as obj, import to 3ds. Then figure out the scale. If memory serves me, you need to scale up by 1000 to get to meters. Read post below.
-
This drives me crazy too. And I know under what conditions it happens too. If it is a single mesh with a named root node. Leadwerks will preserve the name. If it has any hierarchy it will give it a different name. It gets worse when you mass import models and you need to rename everything.
- 3
-
Is this the problem you are having? http://www.leadwerks.com/werkspace/topic/10060-errors-loading-fbx-with-embedded-textures/
-
Um, Tesseract does have GI. It's in the video on the site and in the text under the video.
"The new rendering features include fully dynamic omnidirectional shadows, global illumination, HDR lighting, deferred shading, morphological/temporal/multisample anti-aliasing, and much more."
PBR is still new so very few engines have it.
-
How does it work when you set it to debris?
-
Also take a look at the tesseract engine or it's fork Octaforge for the version that supports lua.
Tesseract has everything real time.
-
Ah ok. The possible good news here is that you can read and write texture pixels.
Not as simple as what you were looking for but not too bad to implement.
Does this work in lua?
-
So far it looks like an Nvida issue. Anyone on AMD card having this issue?
-
In the Leadwerks editor it use to have the bottom console visible by default or hidden if you hide it. Now its always hidden when you load the editor regardless of what you set it at previously.
Many times I start the editor and load my map and miss all the red text telling me things are potentially wrong.
I would request an option or the ability to keep the position of the editor console constant between sessions.
-
root mass to 0 and object mass to .1. The engine still exhibits drag/friction with no gravity. Things set in motion eventually stop, you may seg fault or run out of space before it does though. You can check this out by making in a flat surface to walk on, a prop with weight, and the fps creator. Set the gravity to 0 and walk into a movable object. it will move and eventually stop. You can walk off your walking surface and you will not fall off. Oddly you can still walk around without ground.
-
That fix is fine to get the window working, but if you have dark levels, its a no go.
Model names wrong in scene panel : Model test
in Suggestion Box
Posted
Have you tried to put the model into a folder/group with the name you want it? The problem here is what is inside the file is not necessarily the same as the name of the file.
See this version of the model. FBX2013 pre-normalized for Leadwerks.
modelTest2.zip
http://i.imgur.com/cvW84PH.png
The highlighted stuff to the right.