-
Posts
24,627 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Josh
-
I think Facebook deleted the app, and it won't let me create a new one. So confusing. On the plus side, I don't believe your status updates will go from Facebook to Werkspace anymore.
-
I don't have any plans to implement a paged terrain system any time soon.
-
You need mountains that are more than a kilometer high?
-
This script will fix the heat haze emitter: require("scripts/class") local class=CreateClass(...) class.sound=LoadSound('abstract::campfire_01_15.wav') function class:CreateObject(model) local object=self.super:CreateObject(model) --[[object.model.aabb.x0=-5 object.model.aabb.x1=5 object.model.aabb.y0=-5 object.model.aabb.y1=5 object.model.aabb.z0=-5 object.model.aabb.z1=5]]-- --Create light object.light=CreatePointLight(4,model) object.light:SetColorf(1,0.6,0.25,1,1) object.light:SetPositionf(0,1.2,0,0) object.light:SetShadowOffset(0,0.91,0) object.light.castshadows=3 --Create emitters if fw~=nil then SetWorld(fw.transparency.world) object.heathaze=CreateEmitter(10,600,Vec3(0,1,0),0,nil) object.material_heathaze=LoadMaterial('abstract::heathaze.mat',0) object.heathaze:Paint(object.material_heathaze,0) object.heathaze:SetRadius(0.5,0.5) object.heathaze:SetWaver(0.5) object.heathaze:SetOrder(1,0) object.heathaze:SetVelocity(Vec3(0,1,0),Vec3(0,0.05,0)) object.heathaze:SetRotationSpeed(0.01) object.heathaze:SetArea(Vec3(0.2,0.0,0.2)) object.heathaze:SetPositionf(0,0.25,0,0) object.fire=CreateEmitter(25,750,Vec3(0,1,0),0,nil) object.fire:SetPositionf(0,0.25,0,0) object.fire:Paint(LoadMaterial('abstract::fire.mat'),0) object.fire:SetRadius(0.4,0.1) object.fire:SetColorf(0.2,0.2,0.2,1,1) object.fire:SetWaver(1) object.fire:SetVelocity(Vec3(0,1.5,0),Vec3(0,0.05,0)) object.fire:SetRotationSpeed(0.01) object.fire:SetArea(Vec3(0.2,0.1,0.2)) object.sparks=CreateEmitter(5,800,Vec3(0,1,0),0,nil) object.sparks:Paint(LoadMaterial('abstract::fire.mat'),0) object.sparks:SetRadius(0.01,0.01) object.sparks:SetColorf(1,0.6,0.25,1,1) object.sparks:SetVelocity(Vec3(0,1.5,0),Vec3(0.05,0.5,0.05)) object.sparks:SetRotationSpeed(0.1) object.sparks:SetArea(Vec3(0.4,0.0,0.4)) object.sparks:SetWaver(5) object.sparks:SetPositionf(0,0.25,0,0) --object.heathaze:SetMatrix(object.model.mat) object.fire:SetMatrix(object.model.mat) object.sparks:SetMatrix(object.model.mat) SetWorld(fw.main.world) end --Emit fire sound if class.sound~=nil then object.model:EmitSound(class.sound,10,1,1) end --Declare initial values object.fluctuation=1.0 object.smoothedfluctuation=1.0 function object:SetKey(key,value) if key=="color" then elseif key=="intensity" then else return self.super:SetKey(key,value) end return 1 end function object:Free() self.heathaze:Free() self.fire:Free() self.sparks:Free() end --Force the bounding box to be bigger --[[function object:UpdateMatrix() object.model.aabb.x0=object.model.mat.tx-5 object.model.aabb.x1=object.model.mat.tx+5 object.model.aabb.y0=object.model.mat.ty-5 object.model.aabb.y1=object.model.mat.ty+5 object.model.aabb.z0=object.model.mat.tz-5 object.model.aabb.z1=object.model.mat.tz+5 object.model.aabb:Update() end]]-- function object:UpdateMatrix() self.heathaze:SetMatrix(self.model.mat) self.fire:SetMatrix(self.model.mat) self.sparks:SetMatrix(self.model.mat) end function object:GetKey(key,value) if key=="color" then elseif key=="intensity" then else return self.super:GetKey(key,value) end return value end function object:Draw(camera) self.fluctuation=self.fluctuation+math.random(-100,100)/1000.0*AppSpeed() self.fluctuation=math.min(1.8,self.fluctuation) self.fluctuation=math.max(0.2,self.fluctuation) self.smoothedfluctuation=Curve(self.fluctuation,self.smoothedfluctuation,5.0/AppSpeed()) self.light:SetColorf(1.0*self.smoothedfluctuation,0.6*self.smoothedfluctuation,0.25*self.smoothedfluctuation,1,0) end end
-
You can use this for the firepit script to get rid of the heat haze emitter. I'm not sure yet why it is not working correctly: require("scripts/class") local class=CreateClass(...) class.sound=LoadSound('abstract::campfire_01_15.wav') function class:CreateObject(model) local object=self.super:CreateObject(model) --[[object.model.aabb.x0=-5 object.model.aabb.x1=5 object.model.aabb.y0=-5 object.model.aabb.y1=5 object.model.aabb.z0=-5 object.model.aabb.z1=5]]-- --Create light object.light=CreatePointLight(4,model) object.light:SetColorf(1,0.6,0.25,1,1) object.light:SetPositionf(0,1.2,0,0) object.light:SetShadowOffset(0,0.91,0) object.light.castshadows=3 --Create emitters if fw~=nil then SetWorld(fw.transparency.world) --[[object.heathaze=CreateEmitter(10,450,Vec3(0,1,0),0,nil) object.heathaze:SetPositionf(0,0.5,0) object.material_heathaze=LoadMaterial('abstract::heathaze.mat',0) object.heathaze:Paint(object.material_heathaze,0) object.heathaze:SetRadius(0.25,0.25) object.heathaze:SetWaver(0) object.heathaze:SetOrder(1,0) object.heathaze:SetVelocity(Vec3(0,0.375,0),Vec3(0,0.05,0)) object.heathaze:SetRotationSpeed(0.01) object.heathaze:SetArea(Vec3(0.2,0.0,0.2)) object.heathaze:SetPositionf(0,0.25,0,0)]]-- object.fire=CreateEmitter(25,750,Vec3(0,1,0),0,nil) object.fire:SetPositionf(0,0.25,0,0) object.fire:Paint(LoadMaterial('abstract::fire.mat'),0) object.fire:SetRadius(0.4,0.1) object.fire:SetColorf(0.2,0.2,0.2,1,1) object.fire:SetWaver(1) object.fire:SetVelocity(Vec3(0,1.5,0),Vec3(0,0.05,0)) object.fire:SetRotationSpeed(0.01) object.fire:SetArea(Vec3(0.2,0.1,0.2)) object.sparks=CreateEmitter(5,800,Vec3(0,1,0),0,nil) object.sparks:Paint(LoadMaterial('abstract::fire.mat'),0) object.sparks:SetRadius(0.01,0.01) object.sparks:SetColorf(1,0.6,0.25,1,1) object.sparks:SetVelocity(Vec3(0,1.5,0),Vec3(0.05,0.5,0.05)) object.sparks:SetRotationSpeed(0.1) object.sparks:SetArea(Vec3(0.4,0.0,0.4)) object.sparks:SetWaver(5) object.sparks:SetPositionf(0,0.25,0,0) --object.heathaze:SetMatrix(object.model.mat) object.fire:SetMatrix(object.model.mat) object.sparks:SetMatrix(object.model.mat) SetWorld(fw.main.world) end --Emit fire sound if class.sound~=nil then object.model:EmitSound(class.sound,10,1,1) end --Declare initial values object.fluctuation=1.0 object.smoothedfluctuation=1.0 function object:SetKey(key,value) if key=="color" then elseif key=="intensity" then else return self.super:SetKey(key,value) end return 1 end function object:Free() --self.heathaze:Free() self.fire:Free() self.sparks:Free() end --Force the bounding box to be bigger --[[function object:UpdateMatrix() object.model.aabb.x0=object.model.mat.tx-5 object.model.aabb.x1=object.model.mat.tx+5 object.model.aabb.y0=object.model.mat.ty-5 object.model.aabb.y1=object.model.mat.ty+5 object.model.aabb.z0=object.model.mat.tz-5 object.model.aabb.z1=object.model.mat.tz+5 object.model.aabb:Update() end]]-- function object:UpdateMatrix() --self.heathaze:SetMatrix(self.model.mat) self.fire:SetMatrix(self.model.mat) self.sparks:SetMatrix(self.model.mat) end function object:GetKey(key,value) if key=="color" then elseif key=="intensity" then else return self.super:GetKey(key,value) end return value end function object:Draw(camera) self.fluctuation=self.fluctuation+math.random(-100,100)/1000.0*AppSpeed() self.fluctuation=math.min(1.8,self.fluctuation) self.fluctuation=math.max(0.2,self.fluctuation) self.smoothedfluctuation=Curve(self.fluctuation,self.smoothedfluctuation,5.0/AppSpeed()) self.light:SetColorf(1.0*self.smoothedfluctuation,0.6*self.smoothedfluctuation,0.25*self.smoothedfluctuation,1,0) end end
-
I like the C++ version of the engine even more. You can do stuff like this in C++ or Lua: a = b + Vec3(1) entity.SetPosition(1,2,3) entity.SetPosition(Vec3(1,2,3)) b = TFormPoint(1,2,3,src,dst) b = TFormPoint(Vec3(1,2,3),src,dst) p = Plane(1,0,0,1) p = Plane(Vec3(1,0,0),Vec3(-1,0,0))
-
Just curious.
-
No, but it is possible to write a shader that chooses a skin to show on a single instance. Put two or four textures in one texture, then store a "skin" key value that gets stored in the instance color, which the shader uses to choose a skin. There is an example of this somewhere on the forum.
-
Sorry to hear that. I'll try to produce a problem. It is probably related to the save/load script stuff.
-
As far as I know, DOF is fixed in 2.32.
-
I cannot find any record of an upgrade order for version 2.3 with any of the three email addresses you provided. I cannot find any sent email for this order, any order in Google Checkout, and my records show your registration key to be valid for version 2.2x only. Can you please send the order number? Are you sure you ordered this through leadwerks.com?
-
-Save and Load script functions added. Roads are saved and loaded in the SBX file, so they don't have to be rebuilt when they are loaded. -An octree with a hierarchical rendering routine has been implemented. -Entity view distance has been changed from an arbitrary float value to a categorical value of near, medium, far, or infinite. This allows much more efficient culling. -Performance may be up 100% faster or more, under some conditions under demanding scenes. -Vegetation rendering completely rewritten since version 2.31, with a significant increase in performance. -Collision with vegetation is supported. (Newton .phy files need to be reserialized.)
-
Awww, they just want a hug!
-
You can do that, but it increases texture bandwidth usage. Hardware antialiasing achieves the same effect by performing the pixel shader on more than one pixel, and averaging the results, so you don't have the bandwidth issues. Hardware antialiasing will be supported in version 3.0.
-
Or this: require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object = self.super:CreateObject(model) object.model:SetShadowMode(2,1) end Since class.lua uses the direct castshadows value to return a key, it's safe to call SetShadowMode() directly.
-
I don't have any record of an upgrade to version 2.3 for you.
-
I have never seen this occur. It looks as though you may have shaders mixed up from different versions?
-
I'd like to see a working demo.
-
I can't tell what is going on in that image. Please post an example that produces this.
-
Leadwerks Soldier Animated Entity & Game Script (3rd Person Cam)
Josh replied to Masterxilo's topic in Game Artwork
You can use the entire lua command set with the lua state and program it directly. -
The grass mesh radius encompasses the whole volume of the grass, unless it is placed on a cliffside or something extreme like that.
-
He's not available.
-
Leadwerks Soldier Animated Entity & Game Script (3rd Person Cam)
Josh replied to Masterxilo's topic in Game Artwork
Nice work, although I would not use the entity messaging system. -
Run this script: Notify(fw.main.camera.position:ToString())
-
Solids are the way to handle triggers and volumes. They will be exposed soon. These are better than physics-based triggers because they can be set to call an action either on a collision, or each frame, or when an entity leaves the volume.