Author Topic: Merricksdad's Black Hills Tileset (First Look)  (Read 12240 times)

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Merricksdad's Black Hills Tileset (First Look)
« Reply #465 on: October 15, 2015, 10:51:48 pm »


               

Good news. The sun is a plane.


 


The sun normalized face normal is:


 


[-0.483821,0.424109,-0.765539]


[-0.424109,-0.483821,-0.765539]

[0.483821,-0.424109,-0.765539]

[0.424109,0.483821,-0.765539]


 


Edit: I can also confirm that the world shadows cast in the toolset match near exactly those cast in the game engine. Somebody made sure of it.


I should be able to finish tomorrow, but tonight I feel a moderate head cold coming on.


 


HEHE, the world might not be flat, but the sun is '<img'> Don't tell the flat-world-ers though.



               
               

               
            

Legacy_3RavensMore

  • Hero Member
  • *****
  • Posts: 1153
  • Karma: +0/-0
Merricksdad's Black Hills Tileset (First Look)
« Reply #466 on: October 15, 2015, 11:18:27 pm »


               

What, with all that work your sun does track across the sky while casting realistic lengthening shadows the entire way?  '<img'>  



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Merricksdad's Black Hills Tileset (First Look)
« Reply #467 on: October 15, 2015, 11:40:54 pm »


               

I find it strange how cheaply they made the sun in NWN, but it isn't really important I guess. I only wish my current video card handled skybox transitions better. Right now it flickers between two as the box shapes are swapped out, sometimes leaving it day at night, and sometimes night at day. It can be as maddening as living in Alaska year round. Mind you I have never done that, so I retain most of my sanity, although I previously played pen and paper with three ex army who were stationed there, and loved it. It showed.


 


I'm not entirely sure if there is a serious question in your comment 3RavensMore, but this isn't making any change, and won't allow sun tracking. I think those who have installed a moving sun are relying on the other shadow system for non-static forms. I would really like to get non-static shadow casting for environment meshes, but it won't work on mine, or was never built into the engine. I don't know personally because I've never seen it on another box. What I want is to be able to cast a longer shadow of a cliff overhang with my torch, but I cannot.


 



               
               

               
            

Legacy_3RavensMore

  • Hero Member
  • *****
  • Posts: 1153
  • Karma: +0/-0
Merricksdad's Black Hills Tileset (First Look)
« Reply #468 on: October 16, 2015, 01:27:04 am »


               

I was joking, MD--completely and totally.  You're creating something that looks like it may be one of the best--if not the best--outdoor tilesets ever done, and that's a pretty high bar clear. 



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Merricksdad's Black Hills Tileset (First Look)
« Reply #469 on: October 16, 2015, 04:50:25 pm »


               

Yup, head cold. Need more sleep '<img'>


 


I'm going to try coffee first.


               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Merricksdad's Black Hills Tileset (First Look)
« Reply #470 on: October 16, 2015, 08:26:21 pm »


               

Ye olde cure was honey & lemon.


 


TR



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Merricksdad's Black Hills Tileset (First Look)
« Reply #471 on: October 16, 2015, 09:00:28 pm »


               

Hasn't worked so far. I switched from coffee to tea and water. I doubled up with "The Punisher" (2004) and then finished with "The Physics of Light" from PBS. God that is SLOW!!!! Painfully slow.


 


Feeling somewhat better. No longer bogged down by mucus demons, but now the head pain fairies are in full battle gear.


 


I would like to, once it gets dark and my eyes adjust to the land of the living (er...no that would be vampire out at night), go back and finish this whole planar sun testing business. I think I will set up my child with "Corpse Bride" and let him do his homework later this weekend. He has friends coming over this weekend, so for once, this is my chance to give other people's kids a cold. Woot! Payback!


 


b3b2_chaotic_evil.jpg



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Merricksdad's Black Hills Tileset (First Look)
« Reply #472 on: October 17, 2015, 12:39:53 am »


               

My version has an extra ingredient - scotch whiskey. You may not kill the germs, but they have to walk so carefully that they miss your head (joke).


 


He has friends coming over this weekend, so for once, this is my chance to give other people's kids a cold. Woot! Payback!

 


ON! (short for "Ooo Nasty")


 


TR



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Merricksdad's Black Hills Tileset (First Look)
« Reply #473 on: October 17, 2015, 12:47:53 am »


               

Just, wow!


 


Using tile 0022 as an example, running the shadow doctor on the walkmesh-quality shadowmesh returns the following issues, just based on location of face centers.


 


tSr0qKZ.png


 


Keep in mind that this mesh was already divided into up/down/left/right/north/south face groups, and the pivots for those sub meshes were moved behind 100% of the faces with 0 double pass through. The first pass of the shadow doctor highlights with red any face which is unfortunate enough to cast a shadow on a lower face based on the 4 known solar normals. Running the doctor on those separated faces returns the yellow submesh(es), who are then unfortunate enough to cast shadows on faces already within the red submesh. A third run returned nothing. This just highlights how wrong we all were before. That is a lot of face that can cast shadows based on the world solar normal, but were supposed to have been fixed by the repositioning of the pivot point. Now I see why.


 


The problem with this is that I am only so far testing shadow casting from the face center. I tried casting from the face verts, but without removing the vert, it detects collision with itself. I need to shift the assumed vert position toward face center and test again. I assume using a ratio on the face vert in relation to the center would be a good start, as (faceVert*9 + faceCenter*1)/10 should be sufficient to capture most naughty faces, and keep the check vert within the face surface area.


I would prefer to do it in shadow polygons. I'd like to draw a triangular polygon down from the face, probably using extrusion with a set direction. Then I would test if anything existed inside the volume. But I don't know how to do that yet. Must find Yoda.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Merricksdad's Black Hills Tileset (First Look)
« Reply #474 on: October 17, 2015, 01:22:00 am »


               

Using that function, as is with just the face center checking, the new output is seen in the two photos below.


 


yWeFKoY.png


 


YqYawh8.png


 


You can see that about half of the bad faces were fixed. With face vert checking it should be nearly 100%, but I fear that without in-shape checking, I won't be able to get them all this way.


 


Another dumb-ish method I might try, if I cannot figure out in-shape checking, is to extrude the face downward at the solar angle, and then do a mesh subtraction. If the number of verts changes, then something was cut, meaning mesh below was hit by the shadow. That should be 100% accurate, but far more memory intensive than I would like. This one is bad enough.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Merricksdad's Black Hills Tileset (First Look)
« Reply #475 on: October 17, 2015, 03:48:00 am »


               

Well if nothing else, I figured out how to make realistic hair from extruding a bunch of stuff in the wrong direction on accident...



               
               

               
            

Legacy_Jedijax

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +0/-0
Merricksdad's Black Hills Tileset (First Look)
« Reply #476 on: October 17, 2015, 05:38:09 am »


               

Wait wait wait! Does this shadow doctor thingama work on creature models and placeables and armor parts and heads?




               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Merricksdad's Black Hills Tileset (First Look)
« Reply #477 on: October 17, 2015, 11:04:06 am »


               

I don't see why it won't, but the thing with non-tile shadows is that they are built differently, so it might not be beneficial. That is not to say that chopping it into 6 sub meshes won't do the same for those. I do know the character and his shadow casting parts are affected by the same solar plane at the same angle as terrain shadows, but I am not completely certain the same mechanism is being used to cast those shadow. Something to play with later.


 


If it is the same, then this will do the same on them.



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Merricksdad's Black Hills Tileset (First Look)
« Reply #478 on: October 17, 2015, 11:30:46 am »


               

Must find Yoda.

Surely that should have been "Yoda, find, must."


 


TR



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Merricksdad's Black Hills Tileset (First Look)
« Reply #479 on: October 17, 2015, 03:05:32 pm »


               

Well I am trying a custom Intersect Ray script, similar to the one the max engine uses. We'll see how it works. So far it is acting strangely, but I can return a list of the exact faces which are intersected by a shadow, and I can modify it to get both faces which are hit on the normal side and on the back side. So far, I am trying it with just the normal side. What I am left with after 1-5 iterations is a mostly fragmented model mesh, and then a clump of faces it claims all cast shadow on each other. I highly doubt the math is right, because at least one of those faces, especially the lowest one, should drop off every time I run it, but it doesn't. I could just be wrong. Anyway, it it telling me to explode that remainder clump, but I am not.


 


First export results in a crash of the toolset, but I didn't check why yet. I suspect it is the naming scheme getting really long as it iterates.


 


Second export with shorter naming scheme seems to do the trick. Unfortunately, without breaking the remainder face mesh, I see zero improvement in shadow quality over previous methods on tall faced meshes. Improvement on short faced meshes is spectacular!


 


Third export with better naming scheme and remainder of faces exploded gives no improvement, is actually detrimental, showing face seams as lightly dotted lines, and gives a serious performance hit. Checking the mesh files shows some tvert errors. Next.