-
Posts
161 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by DaveLee
-
-
Hey folks,
I'm trying to render a screenshot via a LUA script that I saved from last year, but my terrain ends up white like this:
Can anyone tell what I'm doing wrong? Here's the script:
local width=1920 local height=1200 require("scripts/constants/engine_const") local buffer=CreateBuffer(width,height,BUFFER_COLOR) if buffer==nil then Notify("Failed to create buffer!",1) return end local buffer2=CreateBuffer(width,height,BUFFER_COLOR) if buffer2==nil then Notify("Failed to create buffer!",1) buffer=nil return end SetBuffer(buffer) fw:Render() SetBuffer(buffer2) DrawImage(GetColorBuffer(buffer),0,0,buffer:Width(),buffer:Height()) SetBuffer(BackBuffer()) SaveBuffer(buffer2,"test.png") buffer=nil buffer2=nil
-
Aren't they calling it "Minecrack" now due to it sucking time out of people's lives? I know better than to buy it!
-
To help with Explorer freezing, try this:
1. Open Folder and View options
2. Go to the "View" tab
3. Check the option that says something along the lines of "Run each Explorer window in its own process"
4. Hit Apply
I just discovered this, and as far as I can tell giving each Explorer window its own process takes up a little more RAM but helps prevent one window locking the rest up.
-
-
Hey Gilmer, under the vegetation object that you would like to edit you can adjust the "LOD Distance" amount to change how close to the camera the LOD takes effect.
-
100,000 triangle characters are not needed to make a realistic game.
Here is a great looking character model that's only 15-20,000 triangles: http://www.polycount.com/forum/showthread.php?t=74780
-
Make sure that you run the GMF process tool to collapse your models, and make sure each model has a base LUA file so that you can set an appropriate view distance.
-
This actually worked great! But, I was having issues with my rotating light model, so it may not make it into the final project. Great work though, thanks!
-
I think alpha test evaluates the alpha map pixel by pixel as either 100% transparent or 100% opaque, with no middle ground.
I can confirm that removing the shader information and using the material settings that Michael posted above produces the correct decal effect. Awesome! This issue had been bothering me for a while now.
-
I would lean towards the lower 300 watts for that PSU.
-
If it's a GTX 480 we're talking about, then 750 watts is definitely the minimum that you want to go. Don't forget name brand!
-
A power supply should be the one element in your computer that you should never go cheap on. Get a least a 500 watt, name brand PSU like Corsair or Thermaltake. This will allow you room to grow or for fluctuating power needs, and getting a name brand with solid components ensures that your PSU can supply the needed power at all times, and cleanly.
-
Sorry for the late reply! It looks like you figured it out.
Alpha blend behavior seemed to change for some reason in 3.32, but I'll have to try out your material code and see if that works. I had actually gone back to a straight alpha test until I had time to look at it.
-
Hey everyone! I've been experimenting with creating a rotating emergency light (similar to those seen in STALKER). My initial plan was to create a spinning light case and put a point light inside of that. It worked, but there were a few shadow artifacts that I could never completelu get rid of due to how close the point light and spinning model were.
My next idea was to remove the animation from the model, and attach two spot lights to it via LUA scripts like this:
>o<
...and then I would rotate the entire model+lights setup via LUA.
The problem is, I'm not a programmer by any means. B) I was able to get one spotlight attached to the model, but I'm at a loss about how to rotate it.
Does anyone have any suggestions?
Here's my code so far (the light is facing down the wrong axis atm):
require("scripts/class") local class=CreateClass(...) beginframe1 = 0 endframe1 = 81 class.sound_ambient=LoadSound('abstract::ambient_lighthum.ogg') function class:InitDialog(grid) self.super:InitDialog(grid) group=grid:FindGroup( "Appearance" ) group:AddProperty("castshadows",PROPERTY_CHOICE,"Disabled,Dynamic,Static,Dynamic + Static,Dynamic + Static + Buffered","Cast shadows") group=grid:AddGroup("Light") group:AddProperty("shadowresolution",PROPERTY_CHOICE,"256,512,1024,2048","Shadow resolution") group:AddProperty("linearoffset",PROPERTY_FLOAT,"0,1,2","Linear offset") group:AddProperty("Range",PROPERTY_FLOAT,"1,100,0") group:AddProperty("coneangles",PROPERTY_VEC2,"0,180","Cone angles") group:Expand(1) end function class:CreateObject(model) local object=self.super:CreateObject(model) object.light=CreateSpotLight(10,model) object.light:SetShadowMode(1+2+4) object.light:SetRotationf( 1,1,1, 1 ) function object:SetKey(key,value) if key=="shadowresolution" then if value=="0" then self.light:SetShadowmapSize(256) elseif value=="1" then self.light:SetShadowmapSize(512) elseif value=="2" then self.light:SetShadowmapSize(1024) elseif value=="3" then self.light:SetShadowmapSize(2048) end elseif key=="castshadows" then local mode=tonumber(value) if mode==0 then self.light:SetShadowMode(0) elseif mode==1 then self.light:SetShadowMode(1) elseif mode==2 then self.light:SetShadowMode(2) elseif mode==3 then self.light:SetShadowMode(3) elseif mode==4 then self.light:SetShadowMode(7) end elseif key=="coneangles" then local angles=StringToVec2(value) self.light:SetConeAngles( angles.x, angles.y ) elseif key=="range" then self.light:SetRange(value) elseif key=="castshadows" then -- local mode=tonumber(value)--+4 -- self.model:SetShadowMode(mode,1) elseif key=="multoffset" then self.light:SetShadowOffset(self.light:GetShadowOffset(0,0),value,0) elseif key=="linearoffset" then self.light:SetShadowOffset(value,self.light:GetShadowOffset(1,0),0) else return self.super:SetKey(key,value) end return 1 end function object:GetKey(key,value) if key=="linearoffset" then return self.light:GetShadowOffset(0,0) elseif key=="castshadows" then local mode=self.light:GetShadowMode() if mode==0 then return 0 elseif mode==1 then return 1 elseif mode==2 then return 3 elseif mode==3 then return 3 elseif mode==7 then return 4 end elseif key=="multoffset" then return self.light:GetShadowOffset(1,0) elseif key=="coneangles" then return self.light.innerconeangle..","..self.light.outerconeangle elseif key=="shadowresolution" then resolution=self.light:GetShadowmapSize() if resolution==256 then return 0 elseif resolution==512 then return 1 elseif resolution==1024 then return 2 elseif resolution==2048 then return 3 else return -1 end elseif key=="range" then return self.light:GetRange() else return self.super:GetKey(key,value) end return value end end
-
I can definitely attest to asset/feature creep in projects, but some of it is just the reality of making games.
-
I opened the Zone project files on another PC, and it seems that my terrain is missing:
It looks like the Editor can't load my terrain files, and wants me to create new terrain. I copied the entire Leadwerks Engine directory to this computer. This computer does use a nVidia Quadro FX 3700 workstation card, and I'm wondering if that could be part of the problem. I have gotten previous versions of the map to open on this computer, and I've also tried updating my drivers.
Any thoughts?
-
Haha, I was wondering about that.
-
Hey omid3098, try this material code:
texture0="abstract::pavementdecal01.dds"texture1="abstract::pavementdecal01_dot3.dds"
shader="abstract::mesh_diffuse_bumpmap_terrainalign.vert","abstract::mesh_diffuse_bumpmap_specularmap.frag"
zsort=1
depthmask=0
blend=alpha
overlay=1,10
castshadows=0
-
This is greatly needed for interior lighting! +1 from me.
-
This is too cool! I remember back in 2005 how terrible Battlefield 2's ragdolls were, and here we are just 5 years later and you have a ragdoll that looks 100x times better.
-
Keep in mind that this is still a beta version, and I haven't optimized anything yet. Quite a few assets have large textures that will be downsized slightly in the end, and about there are almost no LODs created for my assets yet. All of these will be present in the final version.
-
Is anyone else getting weird behavior with "blend=alpha" is version 2.32? I'm not seeing anything directly behind the alpha blended object be rendered at all.
-
If you're like me, you've always used Twisted nematic (TN) manufactured LCD screens because they're fast, good for games, and they're relatively inexpensive. The problems with TN style LCD screens include terrible viewing angles and downright horrific color accuracy (TN panels are only 6-bit color, and they dither pixels to render the other 2-bit range of colors). For anyone that does anything with 2D or 3D artwork, this just won't do.
So what's the solution? Many designers go for IPS style LCD screens. These have extreme viewing angles and fantastic (and true 8-bit) color representation with no color shifting. The problem with IPS screens is the price: they can run anywhere from $450 to $1,000 for just a 22-24" LCD screen.
I've been using a pair of 22" and 23" Samsung TN LCD screens for the past few years, and I always figured that they were "good enough". I have, however, found myself struggling with darkness and color matching issues many times, even after calibrating my screens. I've always kept an eye out for a good deal on an IPS panel, and last week I found one via Slickdeals:
http://slickdeals.net/forums/showthread.php?t=2025298
These are new Dell "e-IPS" screens, with the 23" model being 16:9 at 1920x1080. Dell has a 30 day return policy, so I decided to try it out. Let me tell you, I have no idea how horrible TN LCDs were until I had one of my Samsungs next to the Dell eIPS. I'll let the pictures speak for themselves:
I highly recommend this screen! If you follow the instructions on Slickdeals, you can get 20% off of the full $300 retail price for the 23" model.
I hope this helps!
-
I'm happy to report that with the newest release of 2.32, I can save without fear once again! All of the improvements are working well also.
LUA screenshot script results in white terrain
in Programming
Posted
TGA works great. Thanks guys!