Jump to content
The Dark Mod Forums

LOD models


Baddcog

Recommended Posts

Someone was saying we needed more and better plants. Still trying to get more depth from the texture. All WILL have specular map.

 

So I decided to try a little hi poly stuff and some LOD models for Tels to mess with. First time I've been up until 3:00 AM in a long time, lol/.

post-1981-128423523035_thumb.jpg

 

I plan to make a few arrangements/sizes and a few single leafs to help mix it up.

 

1: hi poly, approx 6,000 tris, diffuse only - 10 leaves.

 

2: mid poly, approx 2,000 tris, diffuse and normal

 

3: Low poly, about 650 tris, diffuse (alpha) and normal

 

4: same as 3, no alpha.

--------------------

 

These are on SVN

 

plant_bigleaf_hipoly, midpoly, lowpoly, lowest_poly.ase

 

 

 

also made a def file but I'm trying to get my SVN darkmod going so I can work in 1.03 stuff.

 

I also plan to add shadow meshes to them, basically the high will use a simpler version of the mid mesh, the mid will use the low...And they all have shadows depending on distance.

 

They can also be used seperately, the mid and low should be good enough for most spots anyway, but since I was baking down from a high I might as well use it in game. I've had some big clumps of them and alot of trees in one room and was getting pretty decent performance.

 

------

also gonna have to try translucency

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Thanks.

 

Yeah, I was pleasantly suprised in game it is pretty hard to tell. But they are just baked down form one to the next and no overcomplicated shapes.

 

(The stems are flat on all but the hi poly, probably the most notable part, but they are buried in alot of leafs. Considering MAYBE adding a bit of depth to them for the mid poly.)

 

I had to redo a few times to get there.

 

I basically made one hi poly leaf flat, then copied, deleted all but the very top layer of polys, expanded the edge a bit (to cover the bevel on the hi). Then the low is basically a rectangle nudged to the shape of the leaf.

 

Then I stacked them all and combined. Used a few bend modifiers on all at once of the shape. Coned/copied/rescaled and arranged them, connected them all. Then seperated them by materials. That way they all have the same exact placement/bends.

 

I honestly think the hi polys are overkill, but figured it would be good for Tels if nothing else. But the performance really doesn't seem bad, most likely because the material is very simple (diffuse and spec only).

Kindof hated to even use alpha on the low poly one but was the only way to get the leaf splits. (the lowest just doesn't have splits, but from a few yards away you can't even tell.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Thanks.

 

Looks very cool! I have not much time to answer tonight, but just a few comments:

 

* a very very low poly version would be cool. If you have a decent outdoor location, and the plant is far away, 740 polies is still overkill. (My grafic card can push a few million tris easily, but if you have thousands of plants far away, it is much better each of them has only a few tris, because 1000 plants with 20 tris in 200m distances look much more convincing than 100 plants with 200 tris each. At this distance, silouette is much more important than any detail.

* Also, my model combiner can combine models, but atm the max. number of indexes/vertices is limited (engine/grafic driver limit I supposes), so I have to limit the number of models I can combine. However, due to technical difficulties (updating a combined model means you have to recreate it completely from scratch), I am using the highest poly version as the limiting factor. That means, instead of combining say 1000 low poly models, I can only combine 10, because the highpoly has 6000. Oops :) I need to fix my code to overcome this.

 

I am excited by the new plant, we can always use more :)

 

Would you be willing to have a go at a few water plants (lotus etc?)? These would spice up the "pond map" :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Having recently figured out how to avoid fullbright alpha blended materials, I think we should be able to see some nice improvements in plants etc soonish.

 

I'm still trying to work out how to get lighting information from globals (i.e influenced by ambient), but for now it seems like a rather cunning and interesting hack.

 

Turns out that any alpha blended (i.e not alpha masked by alphatest) surface becomes a primitive object, a bit like a particle. These still use the quake3 rendering stuff, but since access to the ambient variables was removed in doom3, they just get multiplied by _default or _white, influence by vertexcolor (simple particles have white vertices) is possible but it's unpredictable at the best of times. Tricking the parser by using an image program as the map avoids it being multiplied. This then allows you to adjust the colour normally with rgb to match ambient, however if you try to get it to use a variable it will just go black or whatever your blend mode maxes out to :(. To get the surface to accept light you have to then decrease the alpha of the diffuse image. Which leaves you with a balancing act to get the brightness correct, but it does give you quite nicely and fine grained control over light absorption, which is great for darker foliage.

 

I'll prolly write something up on the wiki and give some sample images/materials, hopefully I can work out a way to get the ambient in tho, failing that maybe just params will work, I expect they should from the q3 material stuff I remember. An example if anyone has bright ideas/wants to play around:

 

textures/serp/serpivyleaves
{
   qer_editorimage textures/darkmod/trees/serpivy_ed
   noShadows
   noSelfShadow
   nonSolid
   noImpact
   bumpmap textures/trees/serpivy_local
   {
       blend  diffusemap
       map add(textures/trees/serpivy, textures/trees/serpivy)
       alphatest 0.95 //since you're adding the images together this needs to be quite high to pick up only the large details you want
   }
   {
       IgnoreAlphaTest
       blend  GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA
       map textures/trees/serpivy
       rgb 0.09 // insert ambient approx here
   }
}

Link to comment
Share on other sites

@Tels,

 

I'll see what I can do for a lower poly version. I forgot what the wires on my lowest look like.. Most of the leaves are V-channel shaped, so if the lowest is I can probably cut the tris in half by giving the leaves no V shape.

But the biggest thing I was aiming for was no alpha and a good silohette on that one, I think the alpha has a bigger hit than the polys. And at large distances you can't see the effects of the alpha anyway.

 

Been busy trying to get Mint 9 going the last few days. This weekend I'll get backto work though.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

@Tels,

 

I'll see what I can do for a lower poly version. I forgot what the wires on my lowest look like.. Most of the leaves are V-channel shaped, so if the lowest is I can probably cut the tris in half by giving the leaves no V shape.

 

I think if you make a quad (two tris) and just "paint" a new texture with two leaves on it, it will look ok from 100m. Try to place your plant in a map with a lot of space and just walk away, and use "r_showTris" "1" and you will see that from a certain point on the tris get smaller than 1x1 pixel anyway, so you can cut away a lot of tris.

 

I wouldn't worry about the alpha test, a new grafic card does it practical for free. In fact, if you have two tris with one leaf with the alpha test, it will be faster than having 6 or 8 tris just to avoid the alpha test. The reason is that the D3 engine has a high per-triangle overhead which will swamp the rest.

 

Or did you mean half-transparency, not the alpha-test?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      Hidden Hands: Blood and Metal is out
       
      · 1 reply
    • taaaki

      Apologies for the unplanned downtime. A routine upgrade did not go to plan, and the rollback had its own issues
      · 2 replies
    • freyk

      Got tdm 2.12 running on my android phone. For more info, read the latest post in the topic on subforum techsupport.
      · 2 replies
    • snatcher

      TDM Modpack v4.5 released!
      Introducing... The Loop
      · 1 reply
    • Ansome

      Taking a break to alleviate burnout. In retrospect, I probably shouldn't have jumped into a map-making contest so quickly after just finishing another project and especially with my busy schedule, but I do believe I have something that the community will enjoy. No clue if I'll be able to finish it on time for the competition if I factor in a break, but I'd rather take my time and deliver something of quality rather than engage in development crunch or lose part of the map's soul to burnout.
      · 1 reply
×
×
  • Create New...