Jump to content

flachdrache

Members
  • Posts

    397
  • Joined

  • Last visited

Everything posted by flachdrache

  1. Look on the material i use on my icon model
  2. I also like the comic style you show in your pieces.
  3. "reMeshing" complex models to its primitive(s) for physics (boundingBox) is something i have to do atm. -> in Ultimate Unwrap3D Pro i have to "break" the models into parts before i can convert them to its bbox or bsphere.
  4. seawater.mat -> environment_seaplane.lua reflectionlightbuffer - on texunit 2 lightbuffer - on texunit 3 gbuffer - on texunit 4 ??? cant Paint the waterpatch in the lua file ... Savvy? i dont messing up thee lake ... do i
  5. thanks for the reply - seams like i cant reproduce my issue with loosing the directional light in my scene.sbx on change.
  6. Please take a look, have no idea if/how i have to reload the framework or whatnot : #include "engine.h" #include <algorithm> #include <vector> using namespace std; // possibleResolutions vector<POINT> gPossibleResolutions; unsigned int gCurrentResolution = 0; bool operator==(const POINT& lhs, const POINT& rhs) { return lhs.x == rhs.x && lhs.y == rhs.y; } int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd ) { //intro MessageBoxA(NULL,"Controls: Press ENTER to switch to next resolution possible on your system.", "Welcome to the Leadwerks Resolution Change Demo",MB_OK|MB_ICONINFORMATION); // Ask The User Which Screen Mode They Prefer bool fullscreen = (MessageBoxA(NULL,"Would You Like To Run In fullscreen mode?", "Fullscreen Mode?",MB_YESNO|MB_ICONQUESTION)==IDYES); // get possible resolutions bool success; int i = 0; do { DEVMODE devMode = {0}; devMode.dmSize = sizeof(DEVMODE); success = EnumDisplaySettings(NULL,i,&devMode); i++; if(success) { POINT resolution = {devMode.dmPelsWidth, devMode.dmPelsHeight}; if(find(gPossibleResolutions.begin(),gPossibleResolutions.end(),resolution) == gPossibleResolutions.end())gPossibleResolutions.push_back(resolution); } } while(success); Initialize() ; RegisterAbstractPath("Path-To-SDK"); SetAppTitle( "LE_Resolution_Demo" ) ; Graphics(gPossibleResolutions[gCurrentResolution].x, gPossibleResolutions[gCurrentResolution].y, fullscreen * 32); SetFocus(GetActiveWindow()); AFilter() ; TFilter() ; TWorld world; TCamera camera; world = CreateWorld() ; if (!world) { MessageBoxA(0,"Error","Failed to create world.",0); return Terminate(); } // TBuffer renderbuffer = CreateBuffer(GraphicsWidth(), GraphicsHeight(), BUFFER_COLOR0|BUFFER_DEPTH|BUFFER_NORMAL); // recreating the font ?? TFramework framework=CreateFramework(); TLayer layer = GetFrameworkLayer(0); camera=GetLayerCamera(layer); CameraRange(camera, .1f, 10000); PositionEntity(camera,Vec3(0,0,-2)); //Set Lua variable BP L=GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1); SetStats( 0 ); SetBackgroundMode(1); SetBackgroundColor(Vec4(0.12f, 0.12f, 0.12f, 1)); SetHDR( true ); SetGodRays( true); SetFarDOF( true); SetFarDOFStrength(0.025f); SetFarDOFRange(100, 1000); /* // is lost on init SetContrast( 1.2f ); SetSaturation(.8f); SetBrightness(.96f); */ /* // is in the scene ... // is lost on resolution change sun = CreateDirectionalLight(); RotateEntity ( sun, Vec3(33, 45, 0) ); */ TModel scene = LoadScene("abstract::default_terrain.sbx"); TBody spectator = CreateBodySphere(); SetBodyMass(spectator, 1); SetBodyGravityMode(spectator, 0); SetBodyDamping(spectator, 1.0); SetBodyElasticity(spectator, 1.0); PositionEntity(spectator, Vec3(0, 0, -25) ); float mx=0.0,my=0.0; float move=0.0, strafe=0.0; float mincamXangle=-89, maxcamXangle=89; TVec3 camrotation; HideMouse(); MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); // Game loop while( !KeyHit() && !AppTerminate() ) { if( !AppSuspended() ) // We are not in focus! { // change resolution? if(KeyHit(KEY_ENTER) || gCurrentResolution == -1) { gCurrentResolution++; if(gCurrentResolution >= gPossibleResolutions.size()) gCurrentResolution = 0; // reset graphics and recreate // FreeBuffer(renderbuffer); //??? Graphics(gPossibleResolutions[gCurrentResolution].x, gPossibleResolutions[gCurrentResolution].y, fullscreen * 32); SetFocus(GetActiveWindow()); // renderbuffer = CreateBuffer(GraphicsWidth(), GraphicsHeight(), BUFFER_COLOR0|BUFFER_DEPTH|BUFFER_NORMAL); } //================================================================ //Camera looking mx=Curve(MouseX()-float(GraphicsWidth()/2),mx,6); my=Curve(MouseY()-float(GraphicsHeight()/2),my,6); MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); camrotation=EntityRotation( camera ); camrotation.X+=my * 0.1f; camrotation.Y-=mx * 0.1f; camrotation.X=Clamp(camrotation.X, mincamXangle, maxcamXangle); RotateEntity(camera, camrotation); //Camera movement move=float(KeyDown(KEY_W)-KeyDown(KEY_S)); strafe=float(KeyDown(KEY_D)-KeyDown(KEY_A)); TVec3 force = Vec3(strafe*13.f, 0, move*13.f); force = TFormVector(force, camera, 0); AddBodyForce(spectator, force); //Position the camera where the spectator body is PositionEntity(camera, EntityPosition(spectator) ); //================================================================ // Update timing and world UpdateFramework(); // Render RenderFramework(); // FPS and some other on screen info /* char s[256] ; SetBlend(BLEND_ALPHA); SetColor(Vec4(.9f, .6f, .4f, .7f)); sprintf_s(s,"FPS: %.0f",UPS()); DrawText (0, 0, s); sprintf_s(s,"%d polys",TrisRendered( true )); DrawText (0, 15, s); sprintf_s(s,"Pos (%.2f,%.2f,%.2f)", EntityPosition(camera, 0).X, EntityPosition(camera, 0).Y, EntityPosition(camera, 0).Z ); DrawText (0, 30, s); SetColor(Vec4(.95f, .64f, .43f, 1)); sprintf_s(s,"Current resolution: %d, %d",GraphicsWidth(), GraphicsHeight()); DrawText (0, 45, s); SetBlend(0); SetColor(Vec4(1)); */ // Send to screen Flip(1) ; } } // Done return Terminate() ; } thanks ... [edit][bug] Beware - I used to use (haha) this code to debugg my postprocessing effects but came to the conclusion that its causing bugs in conjunction with a LUA world e.g. makes SweptCollision FOBAR. Again - its an on/off behavior which makes debugging very annoying. At least drop everything between RenderFramework() and Flip(1).
  7. mixed something up for an icelake kind of thing - however, i didnt get the alpha right "refraction2.frag" #define amplitude 0.125 uniform sampler2D texture0; uniform sampler2D texture1; uniform sampler2D texture2; uniform float AppTime; //-->uniform float apptime; varying vec3 T,B,N; varying vec4 projectSpace; varying vec2 texcoord; varying vec4 ModelVertex; void main(){ vec3 normal; vec4 bumpcolor; bumpcolor = texture2D(texture1,vec2(texcoord.x*4.0,texcoord.y*4.0 - 0.00015 * AppTime)); bumpcolor *= (bumpcolor+texture2D(texture1,vec2(texcoord.x*4.0,texcoord.y*4.0 - 0.00025 * AppTime)) )/2.0; normal = normalize(2.0*bumpcolor.xyz - 1.0); normal = T * normal.x + B * normal.y + N * normal.z; normal = cross(normal,N); vec4 color = texture2DProj(texture0, projectSpace + amplitude * vec4(normal.x,normal.y,normal.z,0.0) ); // * gl_Color; color *= texture2D(texture2,vec2(texcoord.x*4.0,texcoord.y*4.0 - 0.00015 * AppTime) ); gl_FragColor=color; gl_FragColor.a=color.a; } material file : texture0="abstract::glass_diffuse.dds" texture1="abstract::wobbleDot3.dds" texture2="abstract::glass_diffuse.dds" blend=0 depthmask=1 depthtest=1 overlay=0 zsort=0 cullface=1 castshadows=0 shader="abstract::refraction.vert","abstract::refraction2.frag" shadowshader="abstract::mesh_shadow.vert","" hth and OK to post it here [edit] PS: Iam aware of the fact that i expose the refraction.frag in a incorrect way. because of that i used to add 2x -> "refraction2.frag"
  8. Iam slowly getting into lua too and i suggest to take a look in the driver and monstertruck scripts. The speed adds to all four tyres and for the (hand) brake you could throw an anchor or use counterforces.
  9. iirc the tutorial is working from a glass "shader" as sample to explain ... You could stress the material editor with the wobbleDot3 and alpha value textures, it maybe gives good results but it would not "bend" the view behind the surface. That is youll need to capture and obscure the currentscreen with a normal. Hmmmm, try a [edit] texture insteed the wobbleDot3 e.g. use a posterise filter on a normalmap. [edit] removed a link to external DuDv map.
  10. ? the instance - i mean to pick a target on a surface and move the object in question to the picked x/y/z coords. Not the camera to an object in the list. [edit] Niosop typed faster PS: its kind of mean to show screenshots with completely shadowed characters
  11. Maybe you could use a constant value like 5mph*bodyType, which 1,8m height is a default bodyType of 1.0.
  12. Somekind of "move to target" would be helpfull indeed - atm i would look into the x/y coords in the heightmap preview and use "align to terrain" for large objects. For small objects i distribute it over the terrain like foliage.
  13. Plus dynamic lighting costs plenty of gfx power - however, if we go a generation back (like the original xbox) it still looked very good. On my little card i still got 60FPS to 120FPS if not having silly expectations which are leading to flood my memory with a bunch of 2048 diffuse + localmaps. So, even if the gfx Card does need a certain set of "arb" extensions for GLSL by simply good old faking and less dynamic shadows (just character shadows etc.) one can spare the newest generation. Guess a check for shader model Vs. terrainshadowing etc. might be an idea anyways. I wonder why people forget about the XNA if developing for the PC. If one is capable of and willing to spend the time to write tools like a worldeditor for XNA it is a very nice option too.
  14. The WoW data you noticed seams to be a hint of splitanimations e.g. many small *.gmf`s which are just contain one single animation. If the characters are sharing the same skeleton and one can call the animation "clip" from that specific gmf to use on a (all) character i dont see a reason why not using split animations - guess its more a question of maintaining/sorting a lot of animation clips w/o having to look into a text file for which clip starts/ends where and for what character etc..
  15. I noticed that the tires of the leadwerks_monstertruck are called in a wrong order - assuming its left-left, right-right : vehicle_monstertruck.lua require("scripts/class") require("scripts/loop") require("scripts/math/math") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function object:UpdateMatrix() self:UpdateTires() end function object:UpdateTires() local speed for n=0,3 do if self.tire[n]~=nil then self.tire[n]:SetMatrix( self.vehicle:GetTireMatrix(n) ) if self.emitter[n]~=nil then self.emitter[n]:SetMatrix(self.vehicle:GetTireMatrix(n)) self.emitter[n]:Pause() if self.vehicle:TireIsAirborne(n)==0 then speed = math.abs(self.model:GetVelocity(0).z) speed = (speed - 4) * 20.0 speed = Clamp( speed, 0, 1 ) * 0.5 if speed>0 then self.emitter[n]:Resume() self.emitter[n]:SetColorf(1,1,1,speed) end end end end end end local pivot local suspensionlength=0.1 local springconstant=25.0 local springdamper=115.0 object.vehicle=CreateVehicle(object.model) object.tire={} object.emitter={} pivot=object.model:FindChild("tireL1") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[0]=LoadMesh("abstract::vehicle_monstertruck_tire_left.gmf",object.model) pivot:Hide() end pivot=object.model:FindChild("tireR1") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[2]=LoadMesh("abstract::vehicle_monstertruck_tire_left.gmf",object.model) pivot:Hide() end pivot=object.model:FindChild("tireL2") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[1]=LoadMesh("abstract::vehicle_monstertruck_tire_right.gmf",object.model) pivot:Hide() end pivot=object.model:FindChild("tireR2") if pivot~=nil then tireradius=pivot.aabb.h/2.0 object.vehicle:AddTire(TFormPoint(pivot.position,pivot.parent,model),tireradius,suspensionlength,springconstant,springdamper) object.tire[3]=LoadMesh("abstract::vehicle_monstertruck_tire_right.gmf",object.model) pivot:Hide() end object.emitter={} object:UpdateTires() if world_transparency~=nil then if world_main~=nil then SetWorld(world_transparency) for n=0,3 do if object.tire[n]~=nil then object.emitter[n]=CreateEmitter(50,2000,Vec3(0,1,0),0,object.tire[n]) object.emitter[n]:SetPosition(Vec3(0,-object.tire[n].aabb.h/2.0,0)) object.emitter[n]:SetParent(model,1) object.emitter[n]:SetRadius(1,6) object.emitter[n]:SetWaver(1.0) object.emitter[n]:Paint(LoadMaterial("abstract::roaddust.mat")) object.emitter[n]:SetRotationSpeed(0.1) object.emitter[n]:Pause() end end SetWorld(world_main) end end object.model.buoyant=0 object.model:SetKey("collisiontype",COLLISION_PROP) object.model:SetKey("mass",1.2) object:UpdateTires() end which makes the driver_Truck.lua : require("Scripts/constants/keycodes") require("Scripts/constants/collision_const") require("Scripts/linkedlist") require("Scripts/filesystem") require("scripts/math/math") require("scripts/constants/engine_const") FlushKeys() HideMouse() local camera = fw.main.camera chassis=LoadModel("abstract::vehicle_monstertruck.gmf") carobject=objecttable[chassis] truck=carobject.vehicle if truck==nil then Notify("Vehicle object not found.",1) chassis:Free() return end chassis:SetPosition(TFormPoint(Vec3(0,-1,15),fw.main.camera,nil)) chassis:SetRotationf(0,camera.rotation.y+180.0,0) --Variables local dx=0.0 local dy=0.0 local camerapitch=camera.rotation.x local camerayaw=camera.rotation.y local move=0.0 local strafe=0.0 local steering = 0.0 local torque = 0.0 local steerlimit = 30.0 local steerrate = 2.0 local steerangle=0.0 MoveMouse(Round(GraphicsWidth()/2),Round(GraphicsHeight()/2)) while KeyHit(KEY_ESCAPE)==0 do --Camera look gx=Round(GraphicsWidth()/2) gy=Round(GraphicsHeight()/2) dx=Curve((MouseX()-gx)/4.0,dx,3.0/AppSpeed()) dy=Curve((MouseY()-gy)/4.0,dy,3.0/AppSpeed()) MoveMouse(gx,gy) camerapitch=camerapitch+dy camerayaw=camerayaw-dx camerapitch=math.min(camerapitch,60) camerapitch=math.max(camerapitch,-10) fw.main.camera:SetRotationf(camerapitch,camerayaw,0,1) local tirespeed=-(KeyDown(KEY_W)-KeyDown(KEY_S))*2.0 truck:AddTireTorque(tirespeed,0) truck:AddTireTorque(tirespeed,1) truck:AddTireTorque(tirespeed,2) truck:AddTireTorque(tirespeed,3) steermode=0 if KeyDown(KEY_D)==1 then steermode=steermode-1 end if KeyDown(KEY_A)==1 then steermode=steermode+1 end if KeyDown(KEY_SPACE)==1 then chassis:SetPosition(chassis:GetPosition()) chassis:SetVelocity(Vec3(0)) end if steermode==1 then steerangle=steerangle+4.0*AppSpeed() elseif steermode==-1 then steerangle=steerangle-4.0*AppSpeed() else if steerangle>0 then steerangle=steerangle-4.0*AppSpeed() if steerangle<0.0 then steerangle=0.0 end else steerangle=steerangle+4.0*AppSpeed() if steerangle>0.0 then steerangle=0.0 end end end steerangle=Clamp(steerangle,-23,23) truck:SetSteerAngle(steerangle,0) truck:SetSteerAngle(steerangle,1) fw:Update() local campos=TFormPoint(Vec3(0,1,0),chassis,nil) fw.main.camera:SetPosition(campos) fw.main.camera:Move(Vec3(0,0,-10)) local t=TFormVector(Vec3(0,0,1),camera,chassis) a=-math.deg(math.atan2(t.x,t.z))+180.0 chassis:Hide() local pick = LinePick(campos,camera.position,0.5,COLLISION_PROP) chassis:Show() if pick~=nil then camera:SetPosition(pick.position) end fw:Render() Flip(0) end chassis:Free() chassis=nil camera=nil ShowMouse() PS: changed KEY_UP etc. to KEY_W etc. in this script.
  16. Basically thought about night operations, thats why they are pretty dark - i need some sentinels protecting the labs and outer facilities and might use the soldier model as an npc for the matter. Did not thought about desert camo though. PS: the third guy is running away from the group.
  17. File Name: leadwerks_soldier_night_snow_textures File Submitter: TLD File Submitted: 15 Jan 2010 File Category: Materials Resolution: 2048x2048 ================================ Recolor for the Soldier character by Leadwerks ================================ Simple recolor "skins" for the leadwerks soldier model. 1x nightOps camo 1x snowcamo see here http://leadwerks.com/werkspace/index.php?app=downloads&showfile=38 and here http://leadwerks.com/werkspace/index.php?app=downloads&showfile=8 from the soldier_readMe : Licensed developers may use this model in any Leadwerks Engine game. Do not distribute this model in any format other than Leadwerks GMF. Do not distribute the image files in any format other than DDS. You may not sell or give away this model as part of a model or media pack. For character modeling contact: ilya.kachura@gmail.com // -- Ps : i just "recolored", no support, hf. Click here to download this file
  18. How about .bvh files for that matter or a skeleton that can use one of the free library(s) like - no idea how much tweaking would be needed though.
  19. With out my kind of "anger management" i clearly would be on rampage right now. //rantmode ON So this is more a rant as a question but how should one deal with a certain level of quality if simply the smallest part of a workflow gets in the way e.g. uvmapping. The program iam using does have its flaws but whatever, it allways just worked at the end - atm iam importing a good bunch of uv mapped objects to be used within my game and it simply refuses to scale uv islands proportionally to its target islands. I allways work ahead and i got these models "ready" quit some time ... but this issue holds me back. Even if these are world objects the player will just passing by (industrial lampposts, fuseboxes and stuff) i also see these simple things as promotional backdrop which makes me twice as angry tbh. The funny thing is that its not even a bug but something not implemented - the two other uvmapper aint in my pipeline just yet because they deal with organic models only or i could not took the time to learn there ins and outs untill now. So, in fact i work the weekends atm to have more freedom the rest of the time. Barbaric indeed ! //rantmode OFF
  20. Looks mighty fine to me though, now its just missing butterflys or other living things to animate the scene. I suggest to define a bunch of pprocessing setting for different time of day and weather conditions. Another reason why its difficult to compete imho, is that i can hardly implement a straight "style". While the latest screenshot looks a lot like FABLE - "we" usually paint with the engine and aint working from design sheets. Often even such simple things like a lamppost do have its root in the culture where it is living in and by materializing all these small parts a harmonising image is created.
×
×
  • Create New...