Jump to content
The Dark Mod Forums

Nosslaks stuff


Nosslak

Recommended Posts

(about fading alpha values)

 

That does sound pretty clever. I'm not sure I can come up with any scenario where I would want the model to get thinner but I can see how it work great with the inverse that it thickens with distance, but it sounds like that might be what you meant. I'll try it out as it doesn't sound like it'll add all that much work (I'll just stroke the model with a black and white gradient).

 

Here is a mockup that shows what I mean:

 

post-144-13095107927_thumb.png

 

Whether you make the model "thinner" with distance, or "thicker", or let the leaves grow over time (!), is then done by the shader, the alphamap loocks identical (as the shader can simply compute the cut-off value depending on factor X).

 

The only drawback is that you needs something that sets the right parm3 dynamically, etc. depending on distance or time. That can be scripted, or done via the LOD settings:

 

See the top of this article:

 

http://wiki.thedarkmod.com/index.php?title=LOD

 

I'll probably explain this technique and put that picture on the wiki, too.

 

I was actually considering posting that first link then I got a little unsure as it sounds like it will chew up a lot of performance as it sounds like it has to render every polygon twice but maybe D3 would draw the other side anyway even though the player can't see it? It seems like that method uses a twosided material and it seems to work fine there (you don't see the backside so I might be wrong), so I'll try this first, before duplicating the polys in Blender. I won't be able to fake any real volume or shadows with vertex colors if I use this translucency metod, but I think translucency will look a lot better anyway.

 

Twosided materials (e.g. things that are translucent, or half-opaque, but must be seen from both sides) are ALWAYS implemented in Doom by flipping one surface and flipping the normals, too.

 

If you make only one side and mark the material as "twosided", that is done at load time of the model. OTOH, if you flip the surface by yourself, you need to mark the material as "onesided" (.e.g omit the "twosided" keyword).

 

The difference is that when you flip the material yourself, than you end up with one surface, while when D3 does the flipping, you end up with two surfaces.

 

And since each surface is rendered on its own, you end up with double the number of drawcalls.

 

So flipping the surface by yourself is always preferable me thinks.

 

Do post those screenshots as well!

 

Sure. Here another, related thread that has interesting info about LOD:

 

http://forums.thedarkmod.com/topic/11760-making-lod-models/page__view__findpost__p__232746

 

Esp. from here one where it talks about twosided/onesided:

 

http://forums.thedarkmod.com/topic/11760-making-lod-models/page__view__findpost__p__232759

"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

Here are the promised screens:

 

Colored grass variants (still looking for the screens that show the alpha):

 

post-144-130951023617_thumb.jpg

 

Updated/created wiki articles:

 

http://wiki.thedarkmod.com/index.php?title=List_of_LOD_Models

http://wiki.thedarkmod.com/index.php?title=Twosided

http://wiki.thedarkmod.com/index.php?title=Alpha-fading

"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

I think 3000 is fine for an up close good looking tree.

 

Keep in mind the leaves should probably be noshadow anyway, so problem solved. Of course there are issues. Shadows and you just get poly shadows which wont look good. No shadows it might look odd in a well lit area.

Author can use a shadow decal for a softer fake shadow, but candles/lamps would be odd....

 

either way it's a toss up, drawbacks. But without leaf shadows performance will be much better.

Yeah, it doesn't sound like there any way around the problem. Should I make a shadowmesh for the trunk?

 

Here is a mockup that shows what I mean:

 

post-144-13095107927_thumb.png

 

Whether you make the model "thinner" with distance, or "thicker", or let the leaves grow over time (!), is then done by the shader, the alphamap loocks identical (as the shader can simply compute the cut-off value depending on factor X).

 

The only drawback is that you needs something that sets the right parm3 dynamically, etc. depending on distance or time. That can be scripted, or done via the LOD settings:

 

See the top of this article:

 

http://modetwo.net/d...x.php?title=LOD

 

I'll probably explain this technique and put that picture on the wiki, too.

That's pretty much how I thought it'd look like. Thanks anyway!

 

Twosided materials (e.g. things that are translucent, or half-opaque, but must be seen from both sides) are ALWAYS implemented in Doom by flipping one surface and flipping the normals, too.

 

If you make only one side and mark the material as "twosided", that is done at load time of the model. OTOH, if you flip the surface by yourself, you need to mark the material as "onesided" (.e.g omit the "twosided" keyword).

 

The difference is that when you flip the material yourself, than you end up with one surface, while when D3 does the flipping, you end up with two surfaces.

 

And since each surface is rendered on its own, you end up with double the number of drawcalls.

 

So flipping the surface by yourself is always preferable me thinks.

Oh, I'll flip them myself then!

 

Here are the promised screens:

 

Colored grass variants (still looking for the screens that show the alpha):

 

post-144-130951023617_thumb.jpg

 

Updated/created wiki articles:

 

http://modetwo.net/d...t_of_LOD_Models

http://modetwo.net/d...?title=Twosided

http://modetwo.net/d...le=Alpha-fading

Thanks!

Link to comment
Share on other sites

Good news, everyone! I managed to dramatically reduce the polycount dramatically on the leaves almost without any loss of form. I went from 24 polys to 12 on the leaves, so now it uses 1994 up polys in total instead of 3000, I also had to reduce the texture resolution by about 15% for it to work, but I think it was worth it. Here's a comparison shot for you:

Tree3.png

Which do you think is the new lowpoly?

(hint)It's not the left one!

 

Link to comment
Share on other sites

Wow, I would have guessed the left one!

"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

Yeah, I'd still do a shadowmesh for the trunk.

I'll do that!

 

thats bloody awesome looking tree Noss!

Thanks!

 

and i suppose a nodraw skin for leaves would be good for a winter/dead tree

That was what I was planning to do basically. One green skin for summer, one orange/red skin for fall, one without leaves (only branches) for winter and then a no-draw for a (more) dead version.

Link to comment
Share on other sites

Tels: Is it possible to set a dynamic upper limit for for Dooms alphatesting as well? So that it only renders f.i 40-60% gray and completely skips everything below and over that? I was thinking that if so that could be a (presumably) cheap way to animate grass and/or other vegetation.

Link to comment
Share on other sites

There are much better ways to animate textures than alphatest. You can shear, rotate or scroll textures with animated textures. The current tree models use a random pendulum effect to create swaying leaves.

Link to comment
Share on other sites

There are much better ways to animate textures than alphatest. You can shear, rotate or scroll textures with animated textures. The current tree models use a random pendulum effect to create swaying leaves.

 

@Nosslak: No, I don't think this is possible. "alphaTest" is a single threshold value.

 

@Nosslak & Springheel: Oh, yeah, I 'd like to see "swaying" grass done with a sheer animated texture. That would be very inexpensive, less expensive than entities bound to pendulums.

"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

How many polygons should I use for the shadow- and collisionmeshes for my tree? The shadowmesh is only covering 3 of the bigger branches (none of the smaller ones) and it's already taking up 170 polys. I know that there isn't any polycount limit for these kind of things but I need something to work with.

Link to comment
Share on other sites

I'd say that's pretty good for the shadowmesh.

 

Collision isn't as important really, only comes into effect when something collides, Just make it fit well to the main trunk/branches so arrows don't stick in the air, etc.. Probably 5 sides is enough(for truck - branches 3 is good imo)), if you go 4 players might notices it's not really round if they try to go around it real close.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I was getting a little tired of the tree so I decided to make a quick side-project one night and this right here is the result:

Pumpkin-2.png

Textures: 2048^2 pix ATM

Lowpoly: 303 polys

Shadow: 94 polys

Collision: 60 polys

 

I'm not sure if it should be moveable or not, if so I can simplify the collisionmesh.

 

Right now I'm working on the translucency textures for the tree and after that I'll just have to import it to the game.

 

Lowpoly: 1500 polys

Shadow: 190 polys

Collision: 166 polys

Edited by Nosslak
Link to comment
Share on other sites

Sure beats Purah's brush pumpkins from Lampfire Hills. :laugh: (Now that I remember that... how about a Jack-O-Lantern one? :ph34r:)

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

cool pumpkin Nosslak.

 

I had an idea for the trees:

for scenes like Bikerdudes startingpoint in St. Alberics or also my churchscene in the video in my box there should be trees which are only animated from below. your (fantastic) trees are created to see theme as a whole tree but for these point od views this is useless and pull the performance down...so a tree with cutted branches (upwards) ans no leaves on the topside would be a cool thing.

Link to comment
Share on other sites

Nice pumpkin, Noss. :)

 

Textures: 2048^2 pix

 

Wow, that *really* doesn't need to be that high. Even our AI don't have textures that big. Something like a pumpkin needs 256x256 at best (maybe 512x512 for the normalmap if it is particularly detailed).

 

I'm not sure if it should be moveable or not, if so I can simplify the collisionmesh.

 

Yes, something that size should be movable (otherwise, how can we have headless AI tossing flaming pumpkins? ;) )

Link to comment
Share on other sites

Sure beats Purah's brush pumpkins from Lampfire Hills. :laugh: (Now that I remember that... how about a Jack-O-Lantern one? :ph34r:)

Thanks! I was actually considering making a jack-o-lantern as well but I wasn't sure if it'd fit TDM. I can make it a jack-o-lantern pretty easily but I'd have to re-unwrap it as it is using repeating textures quite heavily, which would also lower the texel density (lower-res textures).

 

cool pumpkin Nosslak.

 

I had an idea for the trees:

for scenes like Bikerdudes startingpoint in St. Alberics or also my churchscene in the video in my box there should be trees which are only animated from below. your (fantastic) trees are created to see theme as a whole tree but for these point od views this is useless and pull the performance down...so a tree with cutted branches (upwards) ans no leaves on the topside would be a cool thing.

Thanks! I could make such a tree for you easily, but I'm not sure how good it will actually look.

 

Nice pumpkin, Noss. :)

Thanks!

 

 

Textures: 2048^2 pix

Wow, that *really* doesn't need to be that high. Even our AI don't have textures that big. Something like a pumpkin needs 256x256 at best (maybe 512x512 for the normalmap if it is particularly detailed).

I thought you would have realized this by now but I always work in at least double the size that is needed so that I can then easily downscale it to desired size. I guess I'll have to continue stating that every time I list the texture size then.

 

Yes, something that size should be movable (otherwise, how can we have headless AI tossing flaming pumpkins? ;) )

I'll make a new CM then. How high was the moveables CM polylimit?

Link to comment
Share on other sites

I thought you would have realized this by now but I always work in at least double the size that is needed so that I can then easily downscale it to desired size. I guess I'll have to continue stating that every time I list the texture size then.

 

Or you could just not list the texture size if it actually has no relevance to the final product and you don't want feedback on it. :huh:

Link to comment
Share on other sites

Moveables CM is max around a 7 sided cylinder.

 

For the pumpkin maybe try a 4 sided 2 segment cylinder and twist it 45* in the convex direction. That'll probably get you as close to the limit with a sphere as possible.

 

---------

I think if someone wants a tree with missing faces for performance/cutscenes it's probably fine to give them one.

 

But do we need to include that stuff in the mod? Seems like bloat for rarely used items that could just bloat one FM a tiny bit instead.

 

Other wise people will use it and be like WTF? this tree is broken...

 

Or maybe we'd need a 'cutscene props' folder...

 

Still, I really don't see how a tree with a few less non-shadow casting polys is going to boost performance in cutscenes all that much anyway.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Moveables CM is max around a 7 sided cylinder.

 

For the pumpkin maybe try a 4 sided 2 segment cylinder and twist it 45* in the convex direction. That'll probably get you as close to the limit with a sphere as possible.

 

---------

I think if someone wants a tree with missing faces for performance/cutscenes it's probably fine to give them one.

 

But do we need to include that stuff in the mod? Seems like bloat for rarely used items that could just bloat one FM a tiny bit instead.

 

Other wise people will use it and be like WTF? this tree is broken...

 

Or maybe we'd need a 'cutscene props' folder...

 

Still, I really don't see how a tree with a few less non-shadow casting polys is going to boost performance in cutscenes all that much anyway.

 

 

wouldnt like to use it for cutscenes...every scene in the woods, when you couldt not see the whole tree, only the lower parts, it can improve perf.

 

 

 

Link to comment
Share on other sites

But do we need to include that stuff in the mod? Seems like bloat for rarely used items that could just bloat one FM a tiny bit instead. Other wise people will use it and be like WTF? this tree is broken...

 

I agree. And I highly doubt there would be a lot of performance gain from cutting the tops off of trees in any event.

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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...