Jump to content

macklebee

Members
  • Posts

    3,946
  • Joined

  • Last visited

Everything posted by macklebee

  1. File Name: Environment_Options File Submitter: macklebee File Submitted: 06 Nov 2010 File Updated: 15 May 2011 File Category: Lua Small script that just sets majority of the Editor's options that are not available in an inherent script or saved to the SBX file. It will allow you to set these options without needing to program them into your standalone program. It sets the following options and saves them to your SBX: Trilinear Filter Anistropic Filter Field of View Texture Quality Physics Quality Model Detail Shadow Quality Reflection Terrain Shadows Godrays SSAO AntiAliasing HDR Bloom DOF Enabled DOF Range Wireframe Statistics *Note some of these require framework to function Click here to download this file
  2. and you need to open up the DayNite properties dialog and set the Rate of change... its default is 0. Change it to something greater than that to see it do the day nite cycle... also, check the DeBug checkbox to see the current time and change.
  3. there are several examples in the lua forum... but here is a quick and dirty script to rotate the model: require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function object:Update() object.model:Turn(Vec3(0,1,0)) end end this assumes that you have downloaded at least the oldest version of 2.30, since there was a change from multi-state to single-state lua and inherent scripts have changed since LE 2.3 was first released
  4. Whats the command for turning the terrain shadows off and on? EntityShadowMode()? edit:nevermind... got it...
  5. sounds great... nice work. good. thats what i did already as well.
  6. yes, uu3d has always worked great for me... the only complaint that i have ever had with uu3d is the fact that the conversion to gmf will combine the mesh heirarchy to one mesh...
  7. very cool Klepto! and very generous thanks! you should put this in the downloads section though... EDIT> appears to be missing the Intensity.lua and suncolor scripts... but no matter it still works thanks!
  8. i converted what you sent to me and it worked fine... are you forgetting some export options? like maybe export multiple UV's?
  9. i think its probably that you are missing something in uu3d... send me the OBJ file you edited and i will take a look at it
  10. i thought you said it worked for you with the fixed model i provided? or are you saying it doesnt work for you now that you edited the OBJ file?
  11. i dont know what scale i ended up with... just played around until it look right to me... as far the material names shown on the right treelist of uu3d... i right clicked the material name and renamed it to Tex_ computer and the second one to Tex_computerscreen... also double-clicked both to open their properties dialog and clicked on the Maps tab and set the Diffuse to Bitmap and then selected the appropriate texture for it... if you open the OBJ in uu3d you will see what i changed...
  12. i scaled it appropriately and set the origin below the model. also changed the name of the material listed in uu3d to reflect the material filenames... and it works for me... ComputerScreen_fixed.zip
  13. if you have uu3d, then Select All, then click 3D Tools>Modifiers>Scene>Scale to scale it appropriately and the click 3D Tools>Modifiers>Scene>Move and click Center then Above Y
  14. yeah its definitely appears to be the model... do you have a copy of it in OBJ or X format? also just a side note: clamp values in mat file should be two integers not three... also im sure you know, but the computer scale is huge and the origin is about 8 meters from model itself...
  15. ok will take a look at it... in the meantime take a look at this script... it works, so it points to your model... don't forget to remove the shadowshader line from the mat file RegisterAbstractPath("") Graphics(800,600) world=CreateWorld() gbuffer=CreateBuffer(GraphicsWidth(),GraphicsHeight(),1+2+4+8) camera=CreateCamera() camera:SetPosition(Vec3(0,1,-3)) CameraClearColor(camera, Vec4(0,.5,1,1)) light=CreateDirectionalLight() light:SetRotationf(45,45,45) mat1=LoadMaterial("abstract::Tex_ComputerScreen.mat") box=CreateCube() box:SetPosition(Vec3(2,0,0),1) sphere=CreateSphere(16) sphere:SetPosition(Vec3(-2,0,0),1) drum=LoadMesh("abstract::oildrum.gmf") drum:SetPosition(Vec3(0,-.5,0),1) drum:SetRotation(Vec3(0,180,0),1) ground=CreateCube() ground:SetScalef(10.0,1.0,10.0) ground:SetPositionf(0.0,-1.0,0.0) box:Paint(mat1) sphere:Paint(mat1) drum:Paint(mat1) ground:Paint(LoadMaterial("abstract::cobblestones.mat")) camera:Point(drum,3,1,0) function SetupComputerBuffer() current=CurrentWorld() ComputerWorld=CreateWorld() cube = CreateCube() cube:SetColor(Vec4(1,.25,0,1)) ComputerBuffer=CreateBuffer(512,512,1+2+4+8) ComputerCamera=CreateCamera() PositionEntity(ComputerCamera,Vec3(0,0,-4)) SetWorld(current) end SetupComputerBuffer() function UpdateComputer() currentb=CurrentBuffer() currentw=CurrentWorld() SetBuffer(ComputerBuffer) SetWorld(ComputerWorld) RenderWorld() ComputerTexture=GetColorBuffer(ComputerBuffer) SetMaterialTexture(mat1,ComputerTexture,0) SetBuffer(currentb) SetWorld(currentw) end while AppTerminate()==0 do cube:Turn(Vec3(.1,.1,0)) UpdateComputer() SetBuffer(gbuffer) world:Render() SetBuffer(BackBuffer()) world:RenderLights(gbuffer) Flip() collectgarbage(collect) end collectgarbage(collect)
  16. looks good! the ambient sounds are a nice touch... cant wait to hear the zombies breathing and growling when they start to chase you...
  17. try removing this line from the material file... in lua it causes the shader to fail... shadowshader="","" i had removed that and was able to get the lua example working just fine, but at the time i thought maybe it was just because i was using lua... lua has issues when loading shaders sometimes... but maybe its also crashing in c++... but after removing that i was able to show that buffer rendering on any object that had the appropriate material... so if its not the material file, then its the model... assuming all things are equal between bmax, lua, and c++
  18. without testing it on the model itself i cannot say... but i would guess the problem is with the model...
  19. when in the modelviewer, click on the Surfaces shown in the treelist on the left. It will tell you what your material name is... if nothing is defined there then you do not have your textures set correctly in blender... open up a working model like the oildrum.gmf for comparison...
  20. i havent ever had the need for anything i do but there are some good examples here: http://blitzbasic.com/Community/posts.php?topic=89419#1015405 and http://blitzbasic.com/Community/posts.php?topic=91458#1040606
  21. and what do you get from this code? What I am seeing is there is no place in your code where the cube is being painted the mat1 material... and even if you did, then it would just show as black because you have nothing in the computer world to render anyways... get rid of the separate world or actually create something in the computer world to render...
  22. when are you painting the cube with the mat1 material? I have taken the code and put it into a lua example and it works like expected... but the cube is black... which is because there's nothing in that world... is this what you are seeing?
  23. Do you have the cube face as a separate texture from the rest of the cube? What do you have for a material file? without rendering the buffer to the material, does the cube show its original texture fine?
  24. whats the code? got a link?
×
×
  • Create New...