Results 1 to 9 of 9

Stencil Shadow Help

  1. #1
    Member Reaper R66's Avatar
    Join Date
    Aug 2009
    Location
    Australia

    Stencil Shadow Help

    Recently I've been trying to figure out how to get stencil shadows working on the SoB and DE buildings, but I've had no luck so far. So does anyone know how to apply stencil shadows to a building?

    I know its been achieved with custom buildings (Inquisition Daemonhunt & Steel Legion) and I've tried contacting those who made them, but again there's been no success. I've read elsewhere on the forums about performing STL checks and making sure there's no gaps in buildings (which I've tried with no luck :/), so if anyone has anything else they can offer I would greatly appreciate it.

  2. #2
    I'm half asleep man...
    Are you talking about the shadows cast in the lua within the troops/structures folder?
    The shadow function in that file that allows for multiple shadow styles.

    Edit:
    http://www.gamedev.net/page/resource...-volumes-r1873

    Edit:

    Eg.

    art\ebps\races\Necrons\structure\blah_blah_blah.lua

    -- Shadow Types:
    -- 0 = None
    -- 1 = blob (rotated by light dir)
    -- 2 = blob (rotated by object dir)
    -- 3 = shadow map
    -- 4 = stencil shadow volume
    shadow_type = 4,
    -- shadow_scale = 0.0275

    occluder = 1,
    persistent_body = 0 ,
    distance_game_mesh_lod = 80,
    distance_nis_mesh_lod = 80,
    What have I been upto?

    "I want to be your Jackhammer...
    ......Why don't you call my name...
    .........You'd better call the Jackhammer."

  3. #3
    Member Reaper R66's Avatar
    Join Date
    Aug 2009
    Location
    Australia
    Yes that's exactly what I mean. I know adjusting the shadow type to 3 works, but I want to be able to get 4 working like with all the other vanilla races' structures.

    I'll give that article a read later; looks handy

  4. #4

  5. #5
    Member Reaper R66's Avatar
    Join Date
    Aug 2009
    Location
    Australia
    Interesting... I'll see if I can contact Brother Santos about this. Thanks for the link Fuggles

  6. #6
    Good luck with accessing memories fro 6 years ago.

  7. #7
    Member Reaper R66's Avatar
    Join Date
    Aug 2009
    Location
    Australia
    Yeah I didn't pick up on that... If I don't get much out of it then I'll just have to keep looking into it myself.

  8. #8
    it is a welded everything in max,

    did you ffe the using the file structure listed on the above linked page? :P

    As it looks like the shadow(4) uses a undocumented hex change in the WHM. :P

    Go for the needle in the haystack, it would be much faster. :P

    EDIT:

    Try specifying a simvis file for each of your structures (Guard_HQ.lua, Guard_Barracks.lua, etc). The solution can be that simple (stencil shadows cannot be invoked with a default simvis file)
    Well this is how this data looks:

    4 bytes - number of vertices

    number of vertices * 12 bytes (x, y, z of a given vertex)

    4 bytes - number of faces

    number of faces * 24 bytes
    First 12 bytes contain face normal (x,y,z) and last 12 - indexes of vertices that create a given face.

    4 bytes - number of edges (divided by 2 compared to max)

    number of edges * 40 bytes
    First 16 bytes seem to contain face indexes (4). For the rest i have no idea yet but these are some float values.

    EDIT: All right i got it.
    8 bytes - indexes of 2 vertices that build a given edge
    8 bytes - indexes of 2 faces that share a given edge
    12 bytes - position of first vertex (x,y,z)
    12 bytes - position of second vertex (x,y,z)

    Now let's see what we can do with this stuff :3dcool:
    Last edited by RT2; 5th Sep 12 at 7:52 PM.

  9. #9
    Member Reaper R66's Avatar
    Join Date
    Aug 2009
    Location
    Australia
    I've given every SoB structure a .lua file and that didn't solve the issue.

    On another note, it seems importing then exporting the SM Sacred Artefact without changing anything caused the structure to be unable to project stencil shadows. Seems all my playing around in 3ds Max was pointless so far :/

    I've only just begun to use the File Format Editor, so I'm not exactly sure where to find this data to be honest.

    Thanks for posting the information for reference btw.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •