Jump to content

mdgunn

Members
  • Posts

    626
  • Joined

  • Last visited

Posts posted by mdgunn

  1. As you can probably imagine there are probably a few ways to do this and it probably depends on your exact situation. 

    Ultimately you probably want a flexible prefab (so you drag and drop it in and it of some sort with a flexible script but initially I'm thinking the flowgraph method may get you started quickest, particularly if you are prototyping (thought some people ultimately find the flowgraph frustrating or limited to use). It's a bit like very simple UE4 blue prints.

    A few notes to hopefully get you going down the flowgraph route....

    Get your model imported and setup the animation sets on it (you may need to split up a single animation into it's frame ranges, e.g. idle = 0-32, death=33-64 etc.)

    Create a map and drop your model in

    Create a new script for the model which has a flowgraph exposed input method that can be called to start an animation. 

    Add a CSG box to the map enclosing the area you want to trigger the animation - The script can be a modified version of an entry/exit detection script (http://leadwerks.wikidot.com/wiki:collision-enter-exit) that calls a flowgraph exposed output method. Set the CSG with the trigger material and set the physics to rigid body and trigger.

    So now you have your model in the map with a script on it, your CSG in a map with a script on it.  

    Now for the flowgraph bit.

    Drop the model from the scene into the flowgraph and drop the CSG box in as well. You should then be able to connect them up.

    Note, it is possible to pass parameters via flow graph called methods though this is not documented so well. (try multi-level lift asset in work-shop).

    It is possible to solve the issue in code and ultimately this may be the way to go. You can GetValue SetValue to a build in table as a simple property storage or set up properties on scripts.  You can then scan up parents and down children to locate items that expose a GetValue, script property or method and then call it.

    Lua tables provide simple structures that can approach OO but also allow very loose typing so non-similar things can be checked for property/method exposure and if they have it you can call it without having to compose object hierarchies. For game dev this looseness can be handy. As your game gets more complex something more structured may be useful.   See recent discussions of events raising perhaps. 

    The FPS Controller and Weapon related scripts provide a lot of information/clues on how to implement a medium complexity setup with objects talking to each other, spawning new items (bullets, debris etc.), testing method existence, having a prefab accept another prefab as an item it will use to talk to etc.

    This info may have helped or made things much more complicated.   Hopefully the former.

     

     

  2. Yeah shaders are powerful but you usually need a good understanding of some more advanced maths to write your own.

    The association between material shader slots (the UI) and the shader  (code/file) is kinda loose. E.g. I think the emission shader, or one of them, internally in its code needs you to set it in slot 4 in the material UI, though slot 4 isn't specifically named as Emission in the UI.

    For PBR shaders I think they replace the existing shaders and I think use some additional slots as there can be more maps in a PBR workflow.  Should be enough info around if you dig a bit :)

      

  3. Yeah Leadwerks is by default quite conservative in it's initial setup. Lightprobes are nice too when you're indoors (and possibly outdoors?)

    If you haven't already you may wish to check out PBR implementations.   There is one in the workshop but also one on github.  I think it is still correct that the default shipping shaders don't have PBR  (in LW5 - as we have some implementations maybe this might be soonish) but Leadwerks is open to writing your own so a couple have been done...

    Think this is PBR: https://www.leadwerks.com/workshopitem?tags=Material&queryType=1&fileType=0&fileid=658772226

    And this stuff definitely is....

     

     

  4. I think there was a fairly full example of a previous leadwerks project converted to work on Leadwerks 3/4 but I'm sorry I can't remember what it was called to help you find it.  

    If someone else reads this they may remember the name.

    Try searching the forums for 'competitions' and you might get an idea of what people have done recently. Usually there is at least an EXE version you can download. The competitions usually lasts a month. However, at least for myself I usually struggle to find much time so anything I submit is usually composed of a few hours of patchy work here and there and a couple of days of more focused time.  Basically it's usually possible to get together a basic concept in a few days with Leadwerks.  A full price style game of course takes much, much longer.

    You're right it would be good to have some more accessible and abundant sample projects.  Josh is aware of this and planning some steps to address this.  As a number of beta work has now made it into 4.4 it may be one of the next things on the list.

     

     

     

     

     

     

     

  5. Tiered idea is good.   I think it's very important that people can get a good idea of what assets are like and an actual sample is the best really.  Very glad to see you are providing the PSD's too.  It might be the thing that would push me to purchase (if the price was right).   For this community (small, often single person projects) I think being able to rework assets in some way is hugely useful.

    Could you perhaps provide a sample PSD either in free pack or off a link (in forum or workshop asset) so people can get an idea of what they might be getting in PSD's too.  Maybe a low res version or watermarked or something? If you'd rather not, no problem.

    Looking forward to your final release.

     

    • Upvote 2
  6. Not something I need but I mention it as it is something that is supposed to work well with deferred rendering engines....

    This is something I came across while reading the docs for Decal Machine (https://machin3.io/DECALmachine/) a low cost Blender Addon that I think is gaining a lot of attention right now.

    From the Decal Machine docs

    https://machin3.io/DECALmachine/docs/installation/index.html#instructions

    Quote

     The idea is to take the decal geometry into the engine and by utilizing deferred rendering techniques, have the mesh-based decals contribute to the textures of the underlying base mesh.
    This is done very successfully and prominently in Star Citizen and Alien Isolation and this is the workflow DECALmachine is aiming at.

    Currently I am hoping that I can use Decal Machine to bake out normal maps and but I'm not sure it is supported yet (development is moving quite fast though). I think there is an imminent Unreal exporter but I'm not sure if that uses this geometry rendering for decals or not.

    Thought I'd mention it in case it is something that Leadwerks is suited to implementing fast (at some point in the future) if it suits the architecture well.

  7. 1) On starting a new project and launching it seemed to me that some anti-aliasing was happening even though settings initially say none. Looked like about 2x.  Setting to 2x and back to none seemed to be result in the correct more jagged stepping to me. May already be fixed? Image attached probably not showing it (there for other things sorry).

    2) Rendering of the menu options is a bit spidery. In particular the O's in options look like there circle has almost  got gaps in it.

    3) Title would be better if not 'test test test'. Forgot what it used to say but 'test test test' for some reasons bugs me in a jarring way.  Maybe this is the intention but something a little less random would appear more professional should you want to post a quick screen grab from something in development without having to worry about 'test test test' appearing should you forget to correct it.

     

    leadwerks_4_4.jpg

  8. Unfortunately I started work on completely the wrong weapon, a portal gun! I only just realised now so no submission from me. Still the competition got me doing something I might not have challenged myself with and I hope to get it completed sometime.

     

    Hope to have something for the next challenge, which I hope continue.

    • Upvote 1
  9. Sounds like I'm doing the same thing. I'm on a laptop with integrated Intel graphics, which is very usable with LeadWerks for simple stuff, but I think this rendering to a material from a camera may not work.

     

    I can't test this on my desktop for a few more days but I suspect it will work when I retest there.

     

    Thanks for the feedback.

  10. EDIT(My post title a bit mis-leading - not sure I can edit - I'm really trying to set things in the editor with minimal code, so setting a camera 'Render Target' not setting this in code).

     

     

    I was fairly sure I'd had this working before but I can't remember if there was anything special I did to do it....

     

    I want to render to a texture like someone did here...

     

    kHjVpBC.jpg

     

     

    Here is my non-working version...

     

    6cGN0CN.jpg

     

     

    QUESTION: If you are setting the 'Render Target' on a camera in the EDITOR what else do you actually need to do to get the image appearing on a brush/model?

     

    I thought setting render target in the editor to a texture and setting that texture on a brush might be enough (though I suspected it would not be that simple too).

     

    I've seen the security cam scripts but it seems like these are doing some of the work that setting the Render Target of a cam in the editor is probably doing (i.e. rendering the texture for you).

     

    My texture stays black. I am using the standard FPS controller (which creates its own camera) and another camera set so I can set the position and the Render Target. Is this maybe the problem where maybe 2 cameras are active at once? Was thinking setting 'Render Target' on a camera handled any switching of cameras as it needed when running.

     

    Any ideas what I need to do to get this working?

  11. When using the LW emitter, do you use different materials to get your effects or just use the default?

     

    You mean just the few materials that come with the standard projects, like smoke and tracer? No, the emitters I showed above use all new materials though you can do quite a bit with the the simple default blur and smoke.

    • Upvote 1
  12. There are ways to use PBR in Leadwerks if you use some specific shaders that others have written. I think there are 2 PBR implmentations, 1 I think aimed at Substance Designer.

     

    Try here:

    http://www.leadwerks.com/werkspace/blog/101/entry-1660-substances-metal-and-roughness-and-leadwerks/

     

    but someone else also did a separate implementation I believe. Should be something in the forum. I think that one might be out in GitHub or something rather than a workshop item.

  13. Nice work md. Are they all made just with the emitter or are they spritesheets?

     

    The majority of the effect of these is just standard leadwerk emitter (usually multiple).

    One or 2 (smoke ones I think) use an animated sprite sheet to give a small time variation to the particles over their lifetime but that usually isn't giving the main effect.

     

    The spell one (red expanding circles) looks like it could be sprite sheet, and might be more efficient if it was (though limited in resolution), but it's 2 emitters and no sprite sheet at all.

     

    For a torch or candle, and possibly some projectile/spell effects, I would probably go with a sprite sheet where the size of what you want is limited, many instances would be inefficient, or the effect it difficult to create exactly with Leadwerk emitters.

     

    Most effects I would be aiming to have as proper LW emitters so you can modify them to be what you want.

     

    None of these emitters have scripts doing anything yet but that might be an option for some extra control as well.

    • Upvote 1
  14. Very awesome!! To embed a video, use the media tag [media ]youtubeURL[/ media] without the spaces and make sure you use the http NOT the https link.

     

    Thanks, got it working.

     

    I do strongly suggest hit effects like the one in Batman, shown here (video should start at 54 minutes but it doesn't seem to work with this forum):

     

    These look possible. I will take a closer look when back at home.

    • Upvote 1
  15. I had planned a good deal of the things you mention and have early versions of most of them. I have only recently begun investigating this with more seriousness (started just last weekend really), so everything is quite early at this time.

     

    Here is a screenshot and video (if I can figure out how you link a video) to show a bit of what I've done.

     

    VljmM83.jpg

     

     

     

     

     

    In addition to these I have plans for multiple types of those in the image as well as some or all of the following

    • blood impact
    • billowing dust
    • sandstorm
    • steam
    • impacts - maybe glass/metal/wood/cement/dirt (e.g. bullet hitting dirt)
    • lightning
    • gas (poison)
    • explosions
    • maybe lasers/tracer/muzzle flash
    • water - taps/fountains/rain splash etc.

    I'd probably be open to any requests.

     

    I might do some custom scripts for the prefabs to allow you to more simply control parameters or gain additional programmatic control over things.

    • Upvote 8
  16. I have been working on a set of generic emitters for my own use. I've been considering either selling for a low price of giving away for free (or a free subset). Not sure what the interest would be.

     

    There is a spark effect in the workshop by Josh and it pretty convincing. The physics interaction is nice, as long as you don't over crank this.

     

    A few tips:

     

    1) Expect to have multiple emitters for each effect (with each set as low as you can for the effect you want).

    2) For each single emitter aim to capture a single property of the item you are modelling (e.g. fire = flames + sparks + smoke)

    3) Turn on only one emitter at a time and tweak it so that it gives you the effect you want for that component.

    4) Have each emitter attached to a pivot, and then save the whole lot of as a prefab.

    5) Consider if an animated sprite sheet rather than a static material might improve the look OR help you reduce particles needed. E.g. an animated frame versus multiple particles to do the same thing.

     

    That's what came to mind first anyway.

    • Upvote 7
  17. Great!

     

    I would hope it was super accessible so you can highlight a keyword or method in IDE, hit F1 (or whatever), and it will take you to exactly the right place.

     

    If you're looking at CHM then probably yes?

     

    I personally do still use the CHM files in some software I have and certainly have occasions when I'm cursing a lack of internet for access to online docs.

     

    As it seems you are thinking of both online and off then if they can be output from a single source so it's not a nightmare managing it (at least keeping it synched).

     

    Here is my approach to finding online documentation in the absence of a good F1 on keyword assistance....

     

    1) Go to root API web site - should be simple but people (like me?) are stupid and lazy and I'll forget the quickest way in the IDE and drop back to some habitual method to get there instead.

    a) bring up desktop brower

    b) click on address bar

    c) type the FULL url in and do a GOOGLE(!) search

    d) select either leadwerks main site or API site if you see it.

    e) find yourself on the wrong page so do several more clicks and end up at the API....

    2) Hit search tab

    3) Type your search term

    4) Hit Enter

    5) Read the results

    6) Try to determine which one is probably the right one (sometimes)

    7) Click the link

    8) Finally read the item

     

    Exaggeration of course but to be honest I probably do LITERALLY ALL OF THE TIME smile.png

     

    Should be

    1) Double click method to highlight

    2) Hit F1

    3) Read 100% correct item for what you were on.

     

    I've used other software (similar to leadwerks that worked well this way). Could be some downside? I didn't see any at the time.

     

    Nice to see things moving forwards in this area.

     

    I suppose we just need to make sure the examples are good as they were before and maybe even more of them with feedback from users (comments etc.).

     

    Good stuff.

×
×
  • Create New...