Jump to content

Davaris

Members
  • Posts

    285
  • Joined

  • Last visited

Posts posted by Davaris

  1. Okay I learned a couple of things about which frag and vert files to use, which I'll post in the pureLIGHT forum soon.

     

    However the problem with the lights remains.

     

    I did learn this though:

    Lights that work:

    Spot, Ambient

     

    Ambient has no effect.

     

    Lights that turn it black:

    Point, Directional

     

    This only affects the cactus. I have a plane and a box in the scene which work fine.

     

     

     

    EDIT:

    Could you post your normal map to dl? Maybe something wrong on it? You could also try to test it without normal map (changing the shader too).

     

    One thing I just remembered, I didn't have the normal map as active and I was still getting the black parts on the cactus. It had the same shaders as the box and the plane.

  2. You should export the leadwerks project from within purelight, and look at that mat file. It should help you understand what shaders to use, and if so, enter them yourself into your ADN created mat file. along with the texture slot and name at the top (like the diffuse texture line for example) ;)

     

     

    This is what pureLIGHT creates. As you can see, it is very basic and they said you have to create the material yourself:

     

    texture0="abstract::cactus4_color.dds"

    texture1="LMA_cactus12.dds"

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

     

    I found the "LMA_cactus12.dds" part which is the light map, is appearing in the 'bump map' channel on ADN Materials editor. I also found that when a light appears in my scene, the part of the light that intersects with my model turns it black.

     

    I just tried using the settings omid3098 approved of and it looks fine in ADN, but in the LWs Editor it appears as black when a light is on it. When there is no light shining on it it works. :) So I am a little confused.

     

     

    This is the mat file I generated using ADN:

     

    ***********************************************************************

    Material Generated by ADN 1.1

    Parameters

     

    SetShaderFloat(GetMaterialShader(mymaterial),"alphatest",0.50)

    ***********************************************************************

    texture0="abstract::cactus4_color.dds"

    clamp0=0,0,0

    texture1="abstract::cactus1_n.dds"

    clamp1=0,0,0

    texture2="abstract::cactus1_s.dds"

    clamp2=0,0,0

    color=1.00000000,1.00000000,1.00000000,1.00000000

    blend=0

    depthmask=1

    depthtest=1

    alphatest=1

    overlay=0

    zsort=0

    cullface=0

    castshadows=1

    specular=1.00000000

    bumpscale=2.19000006

    gloss=0.500000000

    shader="abstract::mesh_diffuse_bumpmap.vert","abstract::mesh_diffuse_bumpmap_specularmap_alphatest.frag"

    shadowshader="Abstract::mesh_shadow.vert",""

     

     

    EDIT:

     

    I think I understand what to do now. It is something to do with this:

     

    "abstract::mesh_diffuse_gi.frag"

     

    I just did a search on 'gi' in the shaders.zip and found this:

     

    mesh_diffuse_specularmap_gi_alphatest.frag

     

    So I will try using that instead of :

     

    mesh_diffuse_bumpmap_specularmap_alphatest.frag
  3. I have one other question:

     

    This line appears in the file:

     

    SetShaderFloat(GetMaterialShader(mymaterial),"alphatest",0.50)

     

    Should this be placed in the Lua file, for when the model is created?

     

     

     

    just as you told, you should use your normal texture (cactus1_N.dds) in bump secsion. "not height/bump texture"

    other things are correct.

    and I have no Ideas about lightmap! :)

     

    Thanks omid3098.

     

    I wonder if I should ask Josh about this one? As he integrated it with LWs.

     

    And I have this file:

     

    Quote

    LMA_cactus12.dds (Light map)

     

     

    It was generated by pureLIGHT and I want to use it. So I was wondering, which section should I put it in? There are only 4 sections available. Is 4 the maximum for Leadwerks?

  4. I was wondering if an artist can help me in understanding ADN Materials Editor.

     

    I have the following textures for a model I am using and I am guessing which channels they should go in on ADN Materials Editor.

    My guesses are on the right side of the arrow:

     

    cactus1_color.dds -> Diffuse map

     

    cactus1_H.dds (Height) -> bump map

     

    cactus1_s.dds (Specular) -> Specular/parallax map

     

    I assume the 'Cube map' section is for reflection images.

     

    I also have

     

    cactus1_N.dds (Normal) -> ? Can this be used in LWs instead of height or bump maps? Is it the best one to use?

     

     

    And I have this file:

     

    LMA_cactus12.dds (Light map)

     

    It was generated by pureLIGHT and I want to use it. So I was wondering, which section should I put it in? There are only 4 sections available. Is 4 the maximum for Leadwerks?

  5. Could you post your normal map to dl? Maybe something wrong on it? You could also try to test it without normal map (changing the shader too).

     

    I can't post it because it is commercial. However you have given me a couple of ideas to try. I'll post any progress I make soon.

  6. Thanks I found your post here.

     

    Calling C++ functions from Sandbox LUA script

    http://leadwerks.com/werkspace/index.php?/topic/208-calling-c-functions-from-sandbox-lua-script/

     

     

    What I was not sure about, is there are a couple of flavors to chose from, so I didn't know if they would be compatible. Case in point, Josh was saying they were thinking about using Luabind here:

     

    http://leadwerks.com/werkspace/index.php?/blog/1/entry-189-picking-up-speed/

     

    What I'm thinking would be better in my case, is to add the third party libraries to the C# or C++ part of my engine and use something like this to get the needed data:

     

    LUA GetKey, SetKey - How to use?

    http://leadwerks.com/werkspace/index.php?/topic/277-lua-getkey-setkey-how-to-use/

     

    The thread is pretty old now, so I don't know if it is still done this way in LWs.

  7. Hi,

    I'm having a little trouble understanding what is going on here.

     

    As you can see, when I have a light in the scene, the object appears black.

     

    http://img243.imageshack.us/img243/4549/cactusblack1.png

     

    When I delete the light, its texture becomes visible.

     

    http://img525.imageshack.us/img525/1593/blackcactus2.png

     

    The shadow you see is a light map, so there is no light source in the second image.

     

     

    This is its mat file.

     

     

    ***********************************************************************

    Material Generated by ADN 1.1 R3

    SetShaderFloat(GetMaterialShader(mymaterial),"alphatest",0.50)

    ***********************************************************************

    texture0="abstract::cactus4_color.dds"

    clamp0=0,0,0

    texture1="abstract::lma_cactus12.dds"

    clamp1=0,0,0

    color=1.00000000,1.00000000,1.00000000,1.00000000

    blend=0

    depthmask=1

    depthtest=1

    alphatest=1

    overlay=0

    zsort=0

    cullface=0

    castshadows=1

    specular=1.00000000

    bumpscale=1.00000000

    gloss=0.500000000

    shader="abstract::mesh_diffuse_bumpmap.vert","abstract::mesh_diffuse_bumpmap_specular_alphatest.frag"

    shadowshader="Abstract::mesh_shadow.vert",""

     

     

    Can anyone tell me what I should be looking at? Do I have the wrong combination of shaders?

  8. This might help. http://www.gamedev.net/reference/articles/article2275.asp

     

    I'm sure you'll need a 3rd party library.

     

    I tried that one last night. I was hoping it would get me to the stage of compiling and running Lua scripts, but by the end of the tute, you only end up with a console to type commands into.

     

    It occurred to me this morning that you probably can't integrate your own libraries into Lua with the Editor, without having access to the source code, as I assume you need to compile everything together. Or perhaps I don't understand it correctly?

     

    Anyway it would be really nice if I could call my own C# or C++ libraries from the Lua in the LWs Editor.

  9. Then again, if you don't like it, don't buy it. There seems to be some kind of mentality across this forum that I'm taking the money out of your pocket by force.

     

     

     

    No offense intended Lazlo, but you need to provide a demo for the practical reason, that we have to see if it works on our individual machines.

     

    I've tried a couple of utilities posted here and so far I haven't been able to get them to work very well on my machine and some haven't worked at all.

     

    You might want to vist IndieGamer (forums.indiegamer.com) and ask the developers there, how they protect their demos. Time limited demos are standard practice in online sales and distribution, so they will be able to give you good advice.

  10. The mesh files only really store the geometry of the mesh, they don't need to be updated with the exception of saving in vertex colors for VL meshes.

     

    As for the Leadwerks editor and transparency, you'll still have to set that up as you normally would in Leadwerks.

     

     

    Okay thanks for your help Thomas. I think I've got a working understand of it now. :)

  11. The pureLIGHT preview doesn't show any transparency atm.

     

    If you go into the object's properties and go into its material properties, you can set its transparency type to Alpha to make it transparent to the ray-caster.

     

     

    I tried that and it didn't have an effect in the Leadwerks editor.

     

    One thing I just noticed is mesh files in certain directories, are not being updated. Is there an option to make these update in the editor?

     

    The mesh files in these directories, have not updated, while the light maps have:

    BoxDemoProject\Module_Common\ExportedLighting

    BoxDemoProject\Module_Common\ExportedLighting\Obj

    BoxDemoProject\Module_Common\3diobj

     

    This one was updated:

    BoxDemoProject\Module_Common\MeshSettings

  12. I'm having trouble getting the clear areas showing (or not showing) in pureLIGHT. As you can see the spiky bits look right in the Blender render.

     

    http://img691.imageshack.us/img691/5103/cactusalphablender.png

     

    But the black part is not transparent in pureLIGHT.

     

    http://img715.imageshack.us/img715/9018/cactusalphapurelight.png

     

    Has anyone got any ideas? Is it the problem in Blender, or is it something else?

  13. I just thought I'd post some of the issues I had getting my models into preLIGHT. I'm not an artist, so some of this will be obvious to the experienced people. But for those who are like me, I hope it saves you some time.

     

     

    I had trouble getting .obj files to import into Blender correctly as they appeared black. I asked over at Blender Underground and got this answer from penix1:

     

    Wavefront objects have 2 settings in an mtl file. The first deals with non-UV data. That is where your problem is by the way. The second deals with the image mappings. Some programs don't export the non-UV data properly when a UV is involved. Worse, the program you are importing to doesn't seem to be handling it any better. You will need to adjust by hand the material's Col, Spec, and Mir settings in Blender. Then try re-exporting. Normally, non-UV stuff is overridden by the UV settings. As you can see, that isn't always the case.

     

     

    Then I had trouble exporting files from Blender into .dae format. It didn't work well at all, as it didn't export the bump map and the diffuse map had to be added manually in pureLIGHT.

     

    From what I read online the .dae exporter for Blender 2.49b is bugged and isn't worth the effort.

     

    So then I searched for an .ase exporter and found this for Blender 2.49 to 2.49b:

     

    Blender ASE Export Script

    by Thomas Pittman · in pureLIGHT · 09/16/2009 (10:36 am) · 1 replies

    For those of you using Blender with pureLIGHT, we have a modified ase export script available that is compatible with pureLIGHT.

     

    www.purelighttech.com/blender_ase_export/export_ase.zip

     

    To install it, simply unzip it and copy it into the .blender\scripts folder of your Blender installation, and it should be available next time you run it.

     

     

    Unfortunately the files it produced crashed preLIGHT. However I got this answer from support and the solution worked and now I am able to bake:

     

    I see what is happening. For some reason an extra // is being exported in front of the texture name. *BITMAP "//textures\dice_faces_COL.tga"

    I've seen this before with Blender. In the material in Blender you'll find that in the path of the texture being used, if you remove that part and export again it'll work fine. I don't know how or why that gets set sometimes.

    I've changed preLIGHT to accept such texture paths in the future.

     

    So all you have to do is delete the '//' and preLIGHT can use it.

     

    In a couple of weeks preLIGHT will be updated and removing the '//' from the file will not be necessary.

  14. This is what I have at the moment. But at the moment the load scene command doesn't tell me when the scene is done loading. Therefor I don't know were to stop displaying the loading images.

     

    From what I have read, when people can see that progress is being made via a progress bar, most of them report the time they imagine they must wait is shorter.

     

    If such a thing isn't in the engine, perhaps it could be a feature request for Josh?

×
×
  • Create New...