Author Topic: Shadow Fix.  (Read 701 times)

Legacy_Jedijax

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +0/-0
Shadow Fix.
« on: December 05, 2010, 08:42:40 pm »


               I've been thinking about this for some time, since most of my creatures are already custom, overriding models, and I think there is a tool in the Vault specificaly named and designed for such, but I decided it would be best to post here before I tried it.

Many of my creatures' shadows are off, showing straight lines out of their heads, or definitely coming out entirely wrong, as a bunch of lines strayed towards the infinite. Since Estelindis was able to fix such issues  in an update of her KOTOR Heads pack, I was wondering, how can I fix the shadows of my very own creature and weapon models?

I appreciate any insight you may share on the matter! '<img'>
               
               

               


                     Modifié par Jedijax, 05 décembre 2010 - 11:38 .
                     
                  


            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Shadow Fix.
« Reply #1 on: December 07, 2010, 09:40:31 am »


               Straight line shadows from the head is definitely a poly problem - that is to say that your poly count is too high for the engine to actually render a shadow properly. What you need to do is make a shadow-box that is roughly the same shape as the head, but has less faces (and thus less verts).

The easiest way is to copy one of the Bioware heads, position it so it overlays the head_g node, set it to Render 0, then parent it to the head_g node. Be sure to change the name of your shadow-box to something different than "head_g" - I typically use something like "shadbox_g".


I'm sure if you look at Este's heads (or many of the models that LoW has done), you'll see that she used this method to fix the shadow issues with the KotR heads.
               
               

               


                     Modifié par Pstemarie, 07 décembre 2010 - 09:42 .
                     
                  


            

Legacy_Jedijax

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +0/-0
Shadow Fix.
« Reply #2 on: December 07, 2010, 09:20:44 pm »


               Oooh!! So basically, we would be interposing another model's shadow... cle-ver. Can the same be done with other body parts? Some of my creatures' shadows are all lines, from head to toe...
               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Shadow Fix.
« Reply #3 on: December 08, 2010, 11:06:31 am »


               You can do this little "trick" with any object. Just make sure that you turn the shadow OFF for the object you are having issues with.
               
               

               
            

Legacy_CalSailX

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
Shadow Fix.
« Reply #4 on: December 09, 2010, 06:52:00 pm »


               Didn't see it mentioned, but one thing to check is if you have verts that need welding. Doesn't always fix issues with shadows, but generally the first place I start and depending on the model may square away the shadow problem, before resorting to the above "trick".  No guarantee, but checking for verts that need to be welded has fixed the shadows of at least 40% - 50% of the shadows that were driving me buggy. Most of these were old models and the sanity check of the model would give me the list of verts that might need attention.
               
               

               
            

Legacy_Jedijax

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +0/-0
Shadow Fix.
« Reply #5 on: December 10, 2010, 02:29:07 am »


               ...err... you lost me at welding, friend! I barely know how to save models after modification! HAAHAHAHAHHAAHAHA!! Thank you nonetheless!
               
               

               
            

Legacy_CalSailX

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
Shadow Fix.
« Reply #6 on: December 10, 2010, 04:49:46 pm »


               I stink at explaining this stuff, welding might well be the wrong term. The situation I try to address is when you have two ajoining poly's in your model that should share a vert, but instead you find two verts almost side by side leaving a gap that you might not even see in the surface of the model. That gap in the surface of the model makes for wacky things happening when the engine trys to render a shadow for the object.

 

Selecting the two ajoining verts in your modeling program and collapsing them so they become a single vert shared by both polys closes the gap in the model surface and may fix a shadow issue. IE: welding/collapsing  the two verts together to make a single vert.



               
               

               
            

Legacy_Jez_fr

  • Sr. Member
  • ****
  • Posts: 460
  • Karma: +0/-0
Shadow Fix.
« Reply #7 on: December 11, 2010, 12:11:25 am »


               CalsailX you don't suck at explaining. It's just Jedijax doesn't have the modeller's knowledge to know what a vert is, or what welding means in that context '<img'>

That said, I agree with you on the welding. I've also used this holy trinity on a number of placeables with success:

- "remove isolated vertices"

- Center the pivot to the object (everytime you move or alter the model)

- Reset Xform (everytime you center the pivot)

               
               

               
            

Legacy_Jedijax

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +0/-0
Shadow Fix.
« Reply #8 on: December 11, 2010, 08:56:51 am »


               '<img'> excuse me while I go cry on my pillow...
               
               

               
            

Legacy_Lord Sullivan

  • Hero Member
  • *****
  • Posts: 671
  • Karma: +0/-0
Shadow Fix.
« Reply #9 on: December 11, 2010, 10:03:51 am »


               This...

Jez_fr wrote...

That said, I agree with you on the welding. I've also used this holy trinity on a number of placeables with success:
- "remove isolated vertices"
- Center the pivot to the object (everytime you move or alter the model)
- Reset Xform (everytime you center the pivot)


AND check to make sure you don't have isolated or double or extra inverted polygons

Pstemarie wrote...

Straight line shadows from the head is
definitely a poly problem - that is to say that your poly count is too
high for the engine to actually render a shadow properly. What you need
to do is make a shadow-box that is roughly the same shape as the head,
but has less faces (and thus less verts).

The easiest way is to
copy one of the Bioware heads, position it so it overlays the head_g
node, set it to Render 0, then parent it to the head_g node.


Total misinformation, the engine can take whatever amount of polys you thtow at it and still render shadows properly...and that aspect is mostly limited by hardware performance i.e. (Processor power, amount of system memory and graphic card power+amount of memory)

The addition of a lower poly head model to act as the shadow map is a workaround for those with a lack of experience in modeling for NWN and possibly some other games aswell.
               
               

               


                     Modifié par Lord Sullivan, 11 décembre 2010 - 10:15 .
                     
                  


            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
Shadow Fix.
« Reply #10 on: December 11, 2010, 10:55:26 am »


               

Lord Sullivan wrote...


The addition of a lower poly head model to act as the shadow map is a workaround for those with a lack of experience in modeling for NWN and possibly some other games aswell.




Really? I haven't worked with creatures, but I can see the benefit of having a low poly model with about 100 faces casting the shadow instead of 1000 faces. It is always a good idea to keep the poly count low and those 100 faces might be enough to cast the shadow and you might not even be able to tell the difference between the shadow of the low poly and the high poly version. Okay, the 100 faces are an additional 100 faces so the poly count goes up, but the number of polies that cast a shadow go down, that should speed things up, shouldn't it?

I don't see the point of what you said anyway. I thought these forums are here to encourage people to make more custom content, not to tell some of them that they lack the experience to model for NWN or even other games.
Experience is something you aren't born with. We live to learn.
A comment like that doesn't encourage people to learn, but to quit what they are doing because you told them they aren't good enough at it.
               
               

               
            

Legacy_Jedijax

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +0/-0
Shadow Fix.
« Reply #11 on: December 11, 2010, 11:01:36 am »


               I... uh... don't mean to interrupt the flow of ideas, but... uhm... is there like, a tutorial or something I could follow, step by step?...
               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Shadow Fix.
« Reply #12 on: December 11, 2010, 11:09:57 am »


               

Lord Sullivan wrote...

Pstemarie wrote...

Straight line shadows from the head is
definitely a poly problem - that is to say that your poly count is too
high for the engine to actually render a shadow properly. What you need
to do is make a shadow-box that is roughly the same shape as the head,
but has less faces (and thus less verts).

The easiest way is to
copy one of the Bioware heads, position it so it overlays the head_g
node, set it to Render 0, then parent it to the head_g node.


Total misinformation, the engine can take whatever amount of polys you thtow at it and still render shadows properly...and that aspect is mostly limited by hardware performance i.e. (Processor power, amount of system memory and graphic card power+amount of memory)

The addition of a lower poly head model to act as the shadow map is a workaround for those with a lack of experience in modeling for NWN and possibly some other games aswell.




Thanks Sully for correcting me on that. You are right - compared to a lot of others I'm still a novice in many areas, especially shadows. I was just going by what I've read in other, older posts - which were obviously posted by people that know less than you do. ':bandit:'
               
               

               


                     Modifié par Pstemarie, 11 décembre 2010 - 11:11 .
                     
                  


            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Shadow Fix.
« Reply #13 on: December 11, 2010, 11:14:33 am »


               

Jez_fr wrote...

CalsailX you don't suck at explaining. It's just Jedijax doesn't have the modeller's knowledge to know what a vert is, or what welding means in that context '<img'>
That said, I agree with you on the welding. I've also used this holy trinity on a number of placeables with success:
- "remove isolated vertices"
- Center the pivot to the object (everytime you move or alter the model)
- Reset Xform (everytime you center the pivot)


Jez, thanks for posting that. I've tried it out on a few models that were having shadow issues and have been able to repair those issues.

Very useful information, unlike some others *cough* Sully *cough* *cough*

Now back to the topic (without my brand of sarcasm):

Welding Verts in GMax
  • Select "verts" from the object rollout in the right hand pane (it'll be up at the top)
  • Click "Edit" in the File Menu then "Select All" - or you can drag your cursor over the object.
  • Hit  < CRTL > + < W >
This will "weld" all the verts in the model that need to be - and can be - welded.
               
               

               


                     Modifié par Pstemarie, 11 décembre 2010 - 12:03 .
                     
                  


            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
Shadow Fix.
« Reply #14 on: December 11, 2010, 11:17:56 am »


               Jedijax, I found some information on shadows here: http://ccg.animecafe...p?title=Shadows

Pstemarie, is there a typo in your previous post? You wrote 'Select Now'. Did you mean 'Select All'?
               
               

               


                     Modifié par Zwerkules, 11 décembre 2010 - 11:42 .