Jump to content

macklebee

Members
  • Posts

    3,946
  • Joined

  • Last visited

Everything posted by macklebee

  1. no problem, glad i could help... you might want to use this program instead of the controller.bmx program... it allows skybox and water to be set based on your map created by the editor and set hdr, bloom, ssao, etc during runtime... there's nothing special about it, you just get a little more out of it than the controller.bmx..
  2. the problem is this line: antennalight:SetPosition(Vec3(0,model.aabb.h+0.1,0),0) if you replace model.aabb.h with an actual number, the corona will show up. So my guess is that you would need to somehow set this variable as a global value between bmax and lua... Or just do it the easy way and set it to a numerical value...
  3. eh... ive got it to work... now i just got to figure out why it works compared to your code...
  4. its in the bugtracker:MouseZ
  5. look at the fpscontroller.lua file
  6. oops i might have accidently left that at 10 when i was screwing around with the settings...
  7. Yes, until Josh shows us otherwise, then the distancefog and camera distance appear to have be loaded by parsing like I did in my program. But if you look at my screenshot for my program, I have a corona. I didn't have to do anything special in the code to just get it to work. If you add a corona to your test scene, and load it with the example program you will get the corona as well. So this leads me to believe that is something wrong with your code above... I will try playing around with it...
  8. nice! thanks for this.
  9. no problem, glad i could help. its funny you were asking that question. I added the same thing to the code for the switch just today and i had named my texture the exact same thing for the time being as place art...
  10. the x and y is the upper left hand corner of your texture... if the texture is to be drawn 50x50, then it means you have to make x = (GraphicsWidth()/2)-25 and y = (GraphicsHeight()/2)-25 if you are going to place the texture in the dead center of your screen.
  11. sure that would work... but i would load the texture before the main loop instead of in the main loop. also you need to offset the 'x' and 'y' by half the size of the image if you expect it to be centered.
  12. he said he was doing it in fpscontroller.lua... nothing about an entity. in any case he can do it in that code just like I did in the example02.lua... but aggror, i wouldn't use the mouse positions for your locations of the drawn image... the fpscontroller's "mouse" is always in the center of the screen right? so just draw the hand texture in the center of the screen.
  13. well i just did it inside the example02.lua... don't forget to add it in the main loop to be rendered each flip... just like drawtext. --Register abstract path RegisterAbstractPath("") --Set graphics mode if Graphics(1024,768)==0 then Notify("Failed to set graphics mode.",1) return end --Create framewerk object and set it to a global object so other scripts can access it fw=CreateFramewerk() if fw==nil then Notify("Failed to initialize engine.",1) return end SetGlobalObject("framewerk",fw) camera=fw.main.camera camera:SetPositionf(0,0,-2) light=CreateSpotLight(10) light:SetRotationf(45,55,0) light:SetPositionf(5,5,-5) material=LoadMaterial("abstract::cobblestones.mat") mesh=CreateCube() mesh:Paint(material) ground=CreateCube() ground:SetScalef(10.0,1.0,10.0) ground:SetPositionf(0.0,-2.0,0.0) ground:Paint(material) light=CreateDirectionalLight() light:SetRotationf(45,45,45) hand=LoadTexture("abstract::hand.dds") while AppTerminate()==0 do mesh:Turnf(AppSpeed()*0.5,AppSpeed()*0.5,AppSpeed()*0.5) fw:Update() fw:Render() DrawImage(hand,20,20,200,200) Flip(0) end as for doing it in the fpscontroller... let me look.
  14. dont know if this will work but try: hand = LoadTexture("abstract::hand.dds") DrawImage(hand, MouseX(), MouseY(), 20, 20 )
  15. so far the settings in the ini file i gave you seem to be working just fine for me... you could try using the values found in the wiki explanation examples for SetShadowmap/SetShadowdistancce etc... and see if those work out better for you...
  16. hehe... this is your post shard! someone's not reading very closely
  17. no problem... I actually liked the effect as well... maybe will try to work that in somewhere in my scene...
  18. well, I can't help you with the C++ code much... I just know what has worked so far in bmax... there's an example bmax program in my blog that shows how I parsed the skybox and waterplane. You can just open it in notepad. Also shows how I set the globalobjects needed to work with some of the lua scripted objects... I know there are some issues with the framewerk/C++ and lua framewerk integration, but all of your lights should automatically work without any issues.
  19. what you need to do is delete all of your lights in your scene and recreate them... there could be an issue of older stuff conflicting with the newer INI config settings...
  20. The INI file is just for setting the initial values. What was happening before was you were adding an object to the editor scene, and it looked good so you saved. But the properties for that object were actually blank, so the values saved to the sbx file reflected that. And yes, you can overwrite them in code, but why would you?? You are missing the whole point of the editor which is to allow you to create a scene as you want it to look. Your goal for your program should be to get it to show your scene exactly as you created it in the Editor... which is why its referred to as WYSIWYG...
  21. You need to adjust your shadowdistance, shadowmapsize, and possible the shadowoffset. Play with the numbers until you get something that works for you... but essentially, what you see in the Editor should be what you are getting in your program.
  22. 1) yes 2) add this and save as light_directional.ini inside the folder for the directional light gmf: color=255,255,255,255 intensity=1 range=10 resolution=2 linearoffset=0.31,0.4,0.7 shadowdistance=6.0,20.0,100.0 inversesquarefalloff=1 3) answered it already
  23. Does your sbx file actually have a classname listed for the waterplane? You know you can open a sbx file with notepad? Unless you added it as a property in lua or you created an environment_waterplane.INI file with classname as a key, you will not have this property to use for parsing. What I did for bmax is not actually add anything else but parse the sbx file based on another key of a waterplane, like the submersioncolor. I did the same for the skybox, using the skymaterial key instead of classname. As for lights that you mentioned in your other post, if you set the properties correctly for lights (easiest is to just to make an INI file to set all the standard properties or you have to manually set all the properties), then you do not have do any sbx parsing and they will load automatically.
  24. Looking at the switch script and the files associated with the switch, I am trying to figure out how you are switching colors. It appears that you are just setting the color of the entity from no color to red, relying on the dark coloring of the rest of the switch to not show the entity has been set red? I see that you have two other mat files in the folder for ON and OFF. Was there a reason why the two material files weren't used to toggle back and forth between the on/off? Was there a noticeable lag or something as it swapped materials? Just curious, because I am trying to make a similar device that has an on/off like setting, and I am curious what the best method would be... but unlike the switch, the rest of my model will not be a dark color that could hide the SetColor results...
  25. eh... personally like Josh's way better... its easier for me trying to follow along... but its like you said a matter of coding style. question: where is 'power' being defined at? should it be: function object:SetKey(key,value) if key=="resolution" then local power = tonumber(value) if 0 <= power and power <= 3 then object.light:SetShadowmapSize(256 * 2^power) end ... etc...
×
×
  • Create New...