Jump to content

flachdrache

Members
  • Posts

    397
  • Joined

  • Last visited

Posts posted by flachdrache

  1. 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.

  2. ? 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 :D

  3. 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.

  4. 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..

  5. 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.

  6. 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. ;)

  7. index.php?app=downloads&module=display&section=screenshot&id=69

    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

  8. With out my kind of "anger management" i clearly would be on rampage right now. :D

     

    //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 ! :lol:

    //rantmode OFF

     

    :P

  9. 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.

  10. It a substitute for the current HOM bug on the default skybox for me and might some other ATI owners.

    There are the very basic LUA scripts, so drag and drop should work.

    I use a max view distance of 100.000 iirc since they are just like normal models atm.

    No fancy stuff added i cant maintain right now. (scripts, shaders etc)

  11. I try to convert an hlsl Sky shader to glsl and cant figure out how to do a proper NdotL calculation. :)

    So, what else for tools are usable to write/debug glshaders ?

     

    Currently iam just using the material editor and 3DLabs glsl validator and leaning from

    lighthouse3d and clockworkcoders.

     

    If you want to take a look into the shader iam messing around with

     

    #extension GL_ARB_draw_buffers : enable
    
    uniform sampler2D texture0;
    uniform float apptime;
    
    uniform vec3 lightdir;
    uniform vec3 sunpos;
    
    varying vec2 texcoord0;
    varying vec3 vertexposition;
    
    varying vec3 N;
    
    void main(void) {
    
       vec3 sunvector = normalize(-vertexposition.xyz + lightdir);
    
       vec2 TexCoord = vec2(apptime/40000.0, texcoord0.y * 2.0);
       vec4 color = texture2D( texture0, TexCoord );
    
       float glowfactor = 0.2; // 0.6
       float dotproduct = max(dot(-N, sunvector), 0.0); 
       float sunglow = pow(dotproduct, 2.0) * glowfactor;
    
       if (dotproduct > 0.0) // near to sun
       {
         float sun = pow(dotproduct, 128.0) * 0.6;  // * 0.6
         color.rgb += sun + sunglow;                // * sunglow
       }
       else // reverse side
       {
         float intensity = 0.299 * color.r + 0.578 * color.g + 0.114 * color.b;
         color.rgb -= sunglow/2.0;
         color = mix(color, vec4(intensity, intensity, intensity, color.a), sunglow);
       }
    
       gl_FragData[0] = color;
       gl_FragData[1] = vec4(1.0,1.0,1.0,0.0);
       gl_FragData[2] = vec4(0.0);
       gl_FragData[3] = vec4(0.0);
    }
    

     

    material file is calling

    shader="abstract::mesh_diffuse.vert","abstract::SkySphere.frag"
    

     

    and the image mapped to a sphere model

    skyScatter128.png

     

    [edit]

    passing vars to shader

    //pass shader
    TShader scatterShader = GetMaterialShader(scatterMat);
    
    //from Renderer::DrawEffectGodRays
    TVec3 lightdir;
    lightdir = TFormNormal(Vec3(0,0,1), sun, fw.GetMain().GetCamera() );
    
    TVec3 sunPos;
    sunPos = EntityPosition (sun);
    
    SetShaderFloat(scatterShader, "apptime", AppTime() );
    SetShaderVec3 (scatterShader, "lightdir", lightdir );
    SetShaderVec3 (scatterShader, "sunpos", sunPos );
    

     

    It suppose to look like this

    FrameLuaSampleScatterSimple

    but the sun is moving with the cameraPos atm.

     

    any help on wrapping my head around LE`s glsl very welcome.

  12. I used the older version for some time and the results are needed some good amount of "cleaning up" afterwards. :blink:

    I like to build my trees from scratch tbh. because of the more control in vertex count. Still using tree[d] for

    extracting the textured plain X since these are a pain to do by hand.

     

    There are quit some tricky parts for normalmapped trees, so my workflow goes as :

     

    build the tree trunk in silo/zbrush and UV texture those.

    build the "leafcloud" OR "leafcross" with tree[d].

    mix, scale, convert etc.

     

    with leafcloud i mean this :

    leafCloud2.png

     

    a leafcross looks like this :

    leafCross1.png

     

    The leafcloud gets Uv textured onto a spiderweb or umbrella like mesh.

    With using leafclouds i can extend the model assets because they are not part of the trunk model

    (added independent within sandbox) and of thus i got the naked winter tree with a "summer" leafsets.

     

    for the trunk i extract the plain ubersmooth normalmap from subdivided mesh and "convert" the "barktexture"

    into a bumpmap -> mixing those with ORB (OpenRenderBump) since it holds the least amount of hassle.

     

    I also once deformed the highpoly trunk ( in zbrush ) with the bumpmap but it wasnt worth the more work imo.

     

    hth, JT

×
×
  • Create New...