Is it reasonable: static prop model as map visual mesh +nodraw brushes as collision?

Discussion in 'Mapping Questions & Discussion' started by BANG!, Feb 8, 2011.

  1. BANG!

    BANG! L1: Registered

    Messages:
    24
    Positive Ratings:
    18
    Hi,

    I don't have much experience with hammer though I want to port a map from an xbox game (Jet Set Radio Future) to TF2.
    Yes I am able to extract models and textures from the game (http://jsrf-inside.blogspot.com/)

    From what I have searched and found, its not possible to import a model as map with collision because of how hammer/source work with brushes.

    So what I want is use a pre-made 3D model and use it as map, at least visualy, with its own textures.

    Though can I get a decent performance for such map by importing the map model as many statics props? and use nodraw brushes for collision and eventually use them as visleafs for the static props?
    The JSRF level model is around 75 758 triangles without the props though I can reduce that still a bit, its a pretty wide open map, so I don't know how much visleafs would help there.

    Here's a gameplay video in which you can see the level.

    http://www.youtube.com/watch?v=9RWzlFZUHYI



    Also how many textues can a static prop have? this JSRF map model has a lot of textures.
    That being another issue, say there's about 70 unique textures (from 128*128px to 512*512px) :O can I get enough different textures in one single prop and will this be a problem fir people to download the map and materials/textures from the server?


    I am not concerned about props not casting self shadows, as long as they can cast the shadow of a "sun light" or a pregenerated shadow from lightmap.


    So would this be feasible, or its a little too cazy, particularly for the framerate and the amount of data to download from the server hosting the map?


    Thanks for your time and advice =)
     
    Last edited: Feb 8, 2011
  2. Rexy

    aa Rexy The Kwisatz Haderach

    Messages:
    1,795
    Positive Ratings:
    2,366
    The short answer is, yes, it's reasonable.

    The more complicated answer is that you would have to break the model (entire level) into as many small pieces as possible, so that when you fully optimize the map with brushwork, it has something to break into chunks in the same way that visleafs are broken up for optimization.

    Additionally, you'd have to be very skilled in hammer and know the best methods for optimizing a level made out of models. And this is all assuming you are already and expert modeler and texturer, and can compile to the source engine. And this is going to make you a crazy person, as building collision meshes for each of these items is going to be painful and tedious. Building the collisions with nodraw is a poor solution, but a solution.

    And lastly, the thing you'd have to think about is how the source engine handles lighting on models and how it handles on brushes, which is what it was primarily designed to do. The results are going to probably make you want to tear your hair out--but it can totally be done. Here's a demonstration of what I'm talking about in lightmappedgeneric vs vertexlitgeneric using a normal map:

    [​IMG]

    Additionally, add in all the things that are going to happen you never accounted for, like prop_static limits and other crazy results you hadn't intended. And this mostly all because the source engine in the current builds is not meant to handle levels made out entirely of models. But you should try it, I would love to see how it goes.
     
    • Thanks Thanks x 1
    Last edited: Feb 8, 2011
  3. BANG!

    BANG! L1: Registered

    Messages:
    24
    Positive Ratings:
    18
    Thanks for the quick reply!

    I didn't think of static props with collision, I have only compiled some weapon models for the polycount contest and it was a pain(I do know how to model/texture) looks like statics props is pretty much the same, static props with collisions sounds like a better option indeed.

    Here's what the level looks like, each color is an independent model, this is from the game files no changes, I will no doubt split the bus station thingy(in dark pink, white and light green) into one prop because its just the same object also a static props for the road railings.

    http://i1136.photobucket.com/albums/n488/neodos/JSRF/jsrf_stage10_labels.jpg

    Is that splitted enough? I guess I could split the grey building aswell.

    As for the collision if I make it of static props it will be mostly make out of boxes to avoid problems, but what abotu stairs? isn't it better to make it with brushes? or should it just make a flat surface for the stairs as static props collision.


    Also JSRF is cell shaded, though the map models don't use that cell shading shader, its just like a lambert or a phong and there is no normal mapping at all in the game, so that's a relief, I just need one source light shadows.

    I am worried about the number of textures, around 70 textures, do you think people should connect to the server and download the map and the props automaticaly?

    Or better downloading it from a website such as tf2maps.net ?

    Thanks again, I just want to plan it well to avoid as many problems as possible, of course they'll always be problems.
     
    Last edited: Feb 8, 2011
  4. Randdalf

    aa Randdalf

    Messages:
    1,054
    Positive Ratings:
    462
    If you want to release a map with custom textures and models, use tools like PackBSP or Pakrat to put those files inside the .BSP file. This will inflate the file size, but it's really the only way to distribute custom materials/textures with a map.
     
    • Thanks Thanks x 1
  5. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,031
    Positive Ratings:
    3,975
  6. BANG!

    BANG! L1: Registered

    Messages:
    24
    Positive Ratings:
    18
    Thanks guys, also Yyler, I am just extracting the map from the xbox game Jet Set Radio Future, I did not make the model or the textures, I just want to port it to TF2 for prop-hunt or whatever, fun.

    I just have one last question, can I have a static prop with many textures/materials?
    The model has material culsters, thus parts of the model have different materials and textures.

    If its not possible I will split in models by texture :/
     
  7. EArkham

    aa EArkham Necromancer

    Messages:
    1,555
    Positive Ratings:
    2,157
    Yes, you can have multiple materials or textures on a model. I don't know what the limits are, but I've made models with 8 different textures per skin. Remember that you'll need a seperate vmf/vmt file for each material, and you'll need to compile it for source with the various textures included in $texturegroup skinfamilies.

    Kep
     
    • Thanks Thanks x 1
  8. BANG!

    BANG! L1: Registered

    Messages:
    24
    Positive Ratings:
    18
    That clears it all up, thanks a lot everyone, I'll post pictures on the WIP thread when I start or here if I have any problem =)
     
    Last edited: Feb 8, 2011
  9. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,031
    Positive Ratings:
    3,975
    I know what you're doing, BANG!, I was just saying I like that level. I hope you can make it translate to TF2 well.
     
  10. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    Or just a separate .vmt if you use the tinting method :)
     
  11. BANG!

    BANG! L1: Registered

    Messages:
    24
    Positive Ratings:
    18
    Ah sorry I wasn't sure :rolleyes: I will do my best =)

    What method is that?
     
  12. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    In short, it's the way Valve colour hats. There is only one .vtf, it contains an alpha channel. In the alpha channel, a white(ish) area is drawn over the part that will be tinted. Then, a separate .vmt is made for each skin, containing the RGB values for the desired colour.

    "$blendtintbybasealpha" "1"
    "$blendtintcoloroverbase" "1" // between 0-1 determines how much blended by tinting vs. replacing the color

    "$colortint_base" "{123 123 123}" // put the RGB value of whats being colored when no paint is present, if $blendtintcoloroverbase is 0 then put [1 1 1] here.
    "$colortint_tmp" "[0 0 0]"
    "$color2" "{98 22 22}"

    Credit for the above code goes to whoever made the tinting .vmt's for the ConPack; I'm guessing Boylee.
     
    • Thanks Thanks x 1
  13. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,465
    The lighting in the map will look a bit terrible, even if you tessellate the meshes.
     
  14. LeSwordfish

    aa LeSwordfish semi-trained quasi-professional

    Messages:
    4,102
    Positive Ratings:
    5,989
    Maybe i'm kinda dim, but isnt taking props form another game kind of... not legal?
     
  15. Fr0Z3nR

    aa Fr0Z3nR Creator of blackholes & memes. Destroyer of forums

    Messages:
    6,391
    Positive Ratings:
    4,902
    I've seen maps with cross game models, like how BM2 used the HL2 suit and other models from HL...

    Now, though, this still doesn't mean its illegal, but I think it should be okay as long as he isn't claiming them as his own or Valve's
     
  16. LeSwordfish

    aa LeSwordfish semi-trained quasi-professional

    Messages:
    4,102
    Positive Ratings:
    5,989
    Hmrrrm... I'd err on the side of caution myself. I'd DEFINITELY reccomend crediting the original author.
     
  17. BANG!

    BANG! L1: Registered

    Messages:
    24
    Positive Ratings:
    18
    Depends, I hope not, though the lighting on JSRF levels is quite simple, one sun light with shadow, some ambient lights and some lens flare for the sunlight.
    It could look decent enough even without shadows taking in account the visual style of the game, the aspect of the texture isn't that much altered by the light and have a pretty vivid color palette.


    I see it as a tribute, its a fantastic game that didn't sell enough, and today a lot of people still play it and still love it.
    The game was released in 2002, it was published by SEGA and created by the studio Smilebit which closed/splitted into SEGA sports, it doesn't exist anymore.

    Definetly will credit and put SEGA logo and Smilebit in the map along with some text and where I post the map, if I am able to pull it off with hammer.

    I am pretty sure that there should be no problem, look at all the Sonic-Mario models and many other classics and recent games such as Dead Space 2 weapons which got in gmod too available at garraysmods.com/download (down atm) and they don't seem to have any problem.

    Also there is a remake of Sonic 2 HD made by fans, SEGA doesn't mind it seems, I guess as long as you keep it "true" to the original game and don't make any financial benefits from it.

    I haven't received any complaints about my dev blog on my JSRF container extraction tool so far =)

    I just want to enjoy some more of JSRF in TF2, the "garage" level as a trade map would be pretty cool.
     
    Last edited: Feb 9, 2011
  18. Dr. Spud

    aa Dr. Spud Grossly Incandescent

    Messages:
    878
    Positive Ratings:
    800
    You should compile that model of the JSRF map, bring it into hammer, then use it as a stencil to build the level with brushes.

    You don't want to make the whole level out of models - it's not the way the engine wants to run. Not to mention it will make it a hellish process if you ever want to change something about the map.
     
    • Thanks Thanks x 2
  19. BANG!

    BANG! L1: Registered

    Messages:
    24
    Positive Ratings:
    18
    Thanks, well I want to use the model anyway, because the way the textures are, one texture can be used for buildings, ground and many other things meaning brushing and trying to setup the texture + uv map would be a pain or just not possible, so I am using the brushes for collision only. Right now the level I want to port ("The garage") has a total of 26 425 triangles, I will put the level in something around 10 parts as static props and brush out the collision with nodraw shader.

    I'll be monitoring the FPS as I add parts of the levels as static props, if it drops too much, can't I use visleafs on static props? or better use the draw distance?

    I don't know how bad it would be to have up to 32 players shooting around 26k triangles...
     
    Last edited: Feb 9, 2011
  20. Rexy

    aa Rexy The Kwisatz Haderach

    Messages:
    1,795
    Positive Ratings:
    2,366
    Spud's got a good idea there. Might be a better solution to the headache you will experience trying to compile the entire map in parts of models.