Jump to content

Flexman

Members
  • Posts

    916
  • Joined

  • Last visited

Posts posted by Flexman

  1. I was wondering if anyone had any ideas on how to blend walls of an impact crater against different terrain textures. Alpha test/blending doesn't work so well as you can see 'under' the crater mesh.

     

    Using the vertex shader to contour it to the terrain works fine (below used as "mesh_contour.vert")

     

    #define LW_DIFFUSE texture0
    #define LW_UPNORMALS
    #define LW_MESHLAYER
    
    Include "mesh.vert"
    

     

    It's the texture blending that's got me a bit stumped. Any suggestions folks?

    post-52-1273329743701_thumb.jpg

  2. It's been a long time coming. It look fantastic. The cloth simulation seems so natural. Flapping jacket, folds. Don't care much for more zombie shooting though. I guess someone said they needed to have a shotgun or it would bomb.

  3. Sometimes you'll see a screenshot from a game needs a double-take. Is it real or is it....well the ocean and sky rendering in Silent Hunter 5 (or V if you're into esoteric numbering) is one of those.

     

    Sometimes a game will come along that makes you want to give up programming and take-up a new career as a plumber. Ocean rendering has never looked so good.

     

    sh52010050202073526.png

     

    sh52010050201550572.png

     

    sh52010050223243232.png

     

    Screenshots by "BKHZ_Furbs" at SimHQ

  4. I think adding a callback for LoadScene() would be a nice to have, something like "CallBackLoadSceneFlip()" to keep the window alive instead of Windows thinking the app is "not responding".

     

    Loading map layers and veg can take a few seconds, long enough to 'grey' a window making a user think it's crashed.

  5. It's all about the presentation. Sure, it doesn't really matter, because the engine works fine without the logo. But the way I see it, the logo represents everything that Leadwerks is. Its power, its surrounding, its editor and its community. It is a feeling that you unconsiously use every time you start working on a project.

     

    Getting a bit ahead of myself, but thats just my opinion.

     

    I see your point. I get a feeling everytime I see this logo. Sensitive people may want to have a bucket standing by.

     

    2012Logo_LondonOlympics.jpg

     

    When logos go BAD. That cost 400,000 pounds and took a year to develop.

  6. I'm with Joh, it's just a flippin logo. Nothing more than watercooler chat.

     

    I quite like it. It's not like it's something really important like the Joel vs Kevin debate on Mystery Science Theater.

  7. Just to chime in. If you use the LE shaders for glow such as "mesh_diffuse_glow.frag" then you need to provide a glowmap in texture stage 2 and use the glow post-filter. The glowmap can be the same texture as your colourmap if you want.

     

    Look at the example "cagebulb" which is part of the cagelight in the underground level...

     

    texture0="abstract::cagebulb.dds"
    texture2="abstract::cagebulb.dds"
    castshadows=0
    collisiontype=0
    color=1.0,0.9,0.6,1.0
    shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse_glow.frag"
    

     

    Glow is rendered as a post-process, so unless you're using a glow post-process effect that you won't see any glow effects from these materials. Just try it in the editor, turn the glow option on and off with the object in front of you.

     

    If you don't want to do that for whatever reason you might have to fake it the old fashioned way using a corona or an additive blended version of your laserbolt.

    • Upvote 1
  8. Stages sounds like a nice way to do things like Megaparticles which I was having a look at recently.

     

    mega_particles.JPG

     

     

    Plus it would make my cockpit problems go-away if you could reset the camera matrix back to zero for a final stage.

     

    camera.Render(1);// draw transparent objects

    MatrixReset(camera);

    camera.Render(2);// draw cockpit object

    camera.EndRender();

  9. Maybe you've fallen through the ground? When you run the script and the camera is positioned close to the terrain it can drop through.

     

    It's a great script, quite complex. I just added a third person cam to my game and using a place-holder but I might try using this with the soldier for now.

     

    I notice that LODs in Leadwerks don't like animating in LUA, I suspect you have to interrogate the currently used LOD level and animate that mesh instead.

     

    You can try it yourself by commenting out the call to the 3rdPersonCam function and move the character away. I have the same behaviour in static vehicles/objects that rotate child entities (tank turrets and such).

  10. Just to add, this is a post-process technique that blurs the edges a little.

     

    I was wondering about a technique that uses a buffer larger than the viewport, then drawing that buffer into the viewport. Wouldn't that achieve sub-pixel accuracy? I think this is how Gran Turison 2 on PS2 handled full screen AA. The disadvantage is the bigger memory requirement when all the various buffers are quite large already.

     

    The different buffer stages don't need to be the same size though do they?

     

    Just a thought.

  11. Thanks for sharing. It's nice and simple and demonstrates camera picking, using pivots and a 3rd person camera, all in a few lines.

     

    I never thought to use a pivot as a waypoint entity either. Cheers.

  12. Its all looking great Flexman, really nice work m8, but I wanna see the guns !!!!!! :D

     

    Did I see Ross Kemp in one of those compounds? :)

     

    Ross Kemp? "OI! SHART-IT", boy I had to sit through a lot of **** for research purposes. I don't take this subject lightly, I've had a few friends out there, one has just gone out for another tour.

     

    Guns are coming in their own time. I only just added the arming procedure, on reflection I should have added that to the video as it's a good demonstration of using game states, hand rolled cheap and cheerful menu system and entity messaging. But it involves a player (would also work multiplayer) running around the outside the vehicle selecting weapons that lay on the ground. I was keen on a console like left/right/up/down menu thingy with panning camera moving from pylon to pylon. As one of our advisors was a farmer Apache weaponeer he likes the idea of other players arming choppers on foot. So I added that as an extension of the on-foot mode.

     

    There's a picture of him here loading flechette rockets (web site currently a placeholder for testing the autopatcher software and gamehost server)...Combat-Helo UK Site

  13. It does seem like a face full of billboards, it's using the settings saved to the map. My intention is to have them extend out with altitude, closer to the deck extend the LOD but reduce the view distance based on a user detail setting. Not going to play with that until we get an idea of performance with the new veg system.

     

    The video shows the viewpoint from the gunners seat up front who mostly is looking at instruments and the HUD indicators. Longbow 2 fudged it a little and moved it down in the 2D version of the pit. Bad Company 2 has the head position mashed up against the canopy glass. Sitting back or raising the seat position helps. With TrackIR, mouseview and the ability to turn off the pit and use pop-up repeaters it's not a big deal. Plus I would face the wrath of hardcore flight sim nutters if it went AWOL. It creates a sense of cockpit space.

     

    The rotors really do get on your nerves after a while, the rotor disc needs to pitch forwards another 4 degrees but cone upwards a bit more. I want to add a fake rotor, the early Apache I used had an alpha-blended "Iron Cross" shape which I might resurrect and offer as an end user option. (Make it the default and have the current 3D blades as a realism option, using FRAPS makes it worse, not so bad when the FPS is 30+). That should be easy to do apart from the coning effect. It's currently an animated mesh and the amount of cone is simply picking an animation frame. LUA handles that.

     

    Good to know I can rely on good constructive feedback, it is appreciated.

  14. http://www.youtube.com/watch?v=hNvqRM0lT04



    Some of the billboards look a bit broken, lot of polishing to do later. But the core game is coming together. Some of the cockpit shows the polygon jiggle with having it positioned at the viewpoint location. I plan to have the pit in it's own world located at the origin later and draw it to the main buffer. If that makes sense. It's the only way I can think of to get rid of those artefacts.

    Weapons should be ready in a few more weeks.
  15. You wouldn't be able to use a TTerrain object for that. Translate, Move or SetPosition doesn't work on it (so even if you could have multiple TTerrains, there's no way to position them for a treadmill system). And then the Vegetation system wouldn't work as that's tied to using a TTerrain object.

     

    As soon as you get more than a few thousand units from world origin anyway, polygons begin to wobble. You need to periodically reset the world origin to fix that.

     

    Please correct me if I'm wrong, I'd love to be able to do what you'd like to do. Sometimes you have to scale back our wants and work with what you can do. Sometimes less is more and it works out better.

     

    Regards,

  16. I only just came upon this topic as I was working on the problem of trying to position the terrain entity, so apologies if this is not news or is a little late.

     

    For our helicopter combat sim (emphasis on combat rather than being a fully fledged flight simulator), 10m per tile with 4096 heightmap resolution. 40km2 seems about the right size for a combat zone, other games of this type used the same size (Janes Longbow 2 for example).

     

    But for a jet sim or any kind of large open world it's (probably) not going to be good enough.

     

    If you're embarking on creating a flight simulator or any kind of large world there's the inherent problem of dealing with floating point errors with 32 bit math. OpenGL and LE uses 32 bit math. It's the same with many other 3D engines. As soon as you move more than a few thousand meters away from the origin you'll begin to see polygons wiggling around when the camera or object moves due to imprecision. This is what we see in our helicopter project, it's pretty ugly and I'm still trying different ideas to make the problem go away.

     

    Flight simulators (such as Microsoft Flight Simulator X) get around this by periodically resetting the local origin.

     

    Their approach is documented in part 7 of this document... Microsoft ACES Game Studio Terrain System

     

    In Leadwerks Engine you can't translate or move the terrain entity, it locked to world origin. So you can't employ this trick of moving the world around the viewpoint and resetting the world origin to keep things from getting wobbly.

     

    myTerrain.Translate(Vec3(0, 0, 512), 1);
    

     

    This doesn't work at all.

     

    If you create you own terrain system there's the problem of moving the scene around you. Periodically looping through all the entities to move them relative to the camera is not efficient at first glance, here's a clunky example, imagine having 1000 entities...(and is pointless as it doesn't work with vegetation or the terrain)

    'where xoff,yoff,zoff is inverse to viewpoint movement'
    For Local ent:TEntity = EachIn CurrentWorld().Entities
    	If ent <> camera Then
    		ent.Translate(Vec3(xoff, yoff, zoff), 1);
    	End If
    Next
    

     

    It's possible to do break that down so you have a duplicate world and periodically translate them but it all starts to get hideously complex which isn't what LE is about.

     

    So it's not good for really large worlds like what you'd need for a flight sim. But you'll have this problem with Unity and Ogre3D except Ogre3D has a paging terrain module and lets you do things like this to make it work but requires *a lot* of work to get results.

     

    Maybe there's some other way to stop the camera from exhibiting these wiggly float-point math issues. I wonder how Just Cause 2 does it.

  17. When used on a model, CopyEntity() will return a new instance of the model, as if it were loaded from disk.

     

    Aha, that's what I thought. But it's not the behaviour I was observing so I examined my code this morning.

     

    Turns out, that if you use CopyEntity() on a Model that's Hidden, only the visual appearance is copied. I was pre-loading the model then using HideEntity() right away. If I unhide the model then CopyEntity() it works as expected.

     

    Cheers

×
×
  • Create New...