Jump to content

Josh

Staff
  • Posts

    24,567
  • Joined

  • Last visited

Everything posted by Josh

  1. Josh

    Model request

    After that, I can add some grabbing code like Penumbra uses pretty easily to the FPS script, and that will probably help you.
  2. It's not a hacky solution. It's efficient and works really well with the way the hardware works. Non-instanced copies might someday be added, but you should be aware you are asking me to increase bugs and decrease performance.
  3. Josh

    Model request

    Make a drawer shape out of 5 boxes. Export an .obj. Run it through phygen. You now have a .phy file that contains five convex hulls forming the drawer shape. This is how concave objects are made. Maybe everything we learn during this process will make a nice tutorial.
  4. You can actually do what you describe using a shader, without losing instancing. Put four different textures on one, and use the entity color to determine the texcoord offset for which texture is used. That's how I would do it.
  5. The reason instancing is used is because right now the engine does this: -Make an array of mat4s for all the visible instances. -Set the material/shader/textures. -Set the vertex buffers -Tell the GPU "take this array of matrices and render N copies of it". This is only one draw call that draws all instances of the object. -Unset the vertex buffers -Unset the material/textures/shader. This makes it very very fast to draw lots of copies of an object.
  6. Having multiple paths is a nice idea. I really like good old Worldcraft, and how they have a million buttons and little windows for everything you do. Something like that with an ability to add paths would be nice.
  7. Generally you won't need to even open Framework.bmx or edit it, so it won't be a problem, hopefully. It's not necessarily something that has to be "fixed". It's more just a bad design decision, in my opinion.
  8. Josh

    POO1

    I don't know what format that is, but it isn't .obj.
  9. The lua state byte pointer GetLuaState() returns is the real lua state. The commands I have exposed through the DLL work on it, and they are just the raw lua API.
  10. You CAN have layers of transparent surfaces, just not when they use a refraction effect that reads from a texture and distorts the image.
  11. Right now you can set one path for everything to be loaded from, in Options>Paths>Game path. One quick way to add more paths is you could create a script in the "Scripts/start/" folder and add the lines to register those extra abstract paths. I actually always keep the editor in a separate folder from the engine, because the source code needs to be separate.
  12. Well, it won't stop there. Then we will need one for water, one for emitters, one for refractive materials...and then someone will notice two refractive layers don't work.
  13. Because the refraction shader reads a texture to refract what has already been rendered. Rasterizers can't read an underlying pixel, unfortunately.
  14. Not if they are rendered in the same pass.
  15. That's normal. Unless you want a separate buffer/pass for every single z-sorted object, it's not possible to have refraction on top of refraction. All particles are rendered in the same pass, even if they aren't using a refraction effect.
  16. Josh

    Input Console

    File Name: Input Console File Submitter: Josh File Submitted: 01 Jan 2010 File Category: Lua Scripts Here's a basic console for typing commands into your game. Click here to download this file
  17. Josh

    Networking

    I just got a basic networking example working with Lua. I'll post it soon. I was wondering if anyone was actively using the networking commands, and if you have any videos, demos, or feedback. I am very interested in getting a playable networked game running.
  18. I don't think this key exists on a Mac.
  19. Open Leadwerks Engine SDK\BMX\Framework\Framework.bmx in notepad. If the field "main" is capitalized, you have a problem. Change the field to lower-base "main" and regenerate your glue functions. After I performed these steps, your program ran fine for me. http://blitzmax.com/Community/posts.php?topic=88427
  20. Not only does heathaze not work, but setting the global "fw" variable in Lua causes your scene to not render lighting.
  21. Can you post a demo? I did a test in C++ and it worked fine. Shouldn't be any difference.
  22. No, I think we are through any changes that will occur.
  23. Try this for the firepit script and it will work: 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) --Create emitters if fw~=nil then SetWorld(fw.transparency.world) object.heathaze=CreateEmitter(10,4500,Vec3(0,1,0),0,object.model) object.heathaze:SetPositionf(-136,52,-662,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,object.model) 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,object.model) 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) 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(model,key,value) end return 1 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:GetKey(key,value) if key=="color" then elseif key=="intensity" then else return self.super:GetKey(model,key,value) end return value end function object:Render() 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
  24. You probably mean 2.1, not 1.2.
×
×
  • Create New...