With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
For all you mappers out there!

Moderators: Joe Kari, Pardner, TheDoctor, Breli

Postby Joe Kari » Sun Sep 20, 2009 1:55 pm

@ ReD:
Hey! I'm glad to see you the result ;)
About the door's shadow, this is not related to external lightmap.
To fix it, simply open your entity menu for the door, and add a key "_cs" (for Cast Shadow) and set it to '1'.

@ Ugly:
Unfortunately, shadows are computed at compilation time, not at runtime... Shadows will remain after blowing the watchtower and the palisade.
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby Pardner » Sun Sep 20, 2009 2:49 pm

Joe Kari wrote:@ ReD:
To fix it, simply open your entity menu for the door, and add a key "_cs" (for Cast Shadow) and set it to '1'.

Joe Kari = mapping guru !!!
Cool fix. What would really be sweet is if the door cast real time shadows... that was there would be light coming through when the door was open, and the tower shadow would disappear when you blew the tower up!! 8)

Image
Image
User avatar
Pardner
SG Team
 
Posts: 1786
Joined: Fri Nov 18, 2005 5:48 am
Location: MD, USA



Postby ReD NeCKersoN » Wed Sep 30, 2009 12:45 am

Ok, so I've been doing some more testing. The result, as you've already seen, looks fine in Alamo & Hang'em High. But those maps have FLAT ground. Here's what happens on a terrain that I made with EasyGen, which is not flat.

From a distance, notice the circled area. (Looks like a grid.)
Image
A bit closer & the wierd grid effect starts to fade.
Image
Once you are right in front of the area it has disappeared completely.
Image

Using q3map_nonplanar in the shader reduces this a lot, but not entirely. Also, the use of q3map_nonplanar causes the player to cast no shadow & no decals show up when you shoot the terrain... which I hate.
Anyone have any ideas? :?

I made a high res shader for both the blended terrain & for the stone walls. Here's the resulting q3map2 images.
Image Image Image
I didn't post the 4th image as it's just black.
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby Joe Kari » Sat Oct 03, 2009 1:07 pm

The last lightmap image is always black and can be removed from the release pk3, I don't know why q3map2 produce one extra useless lightmap...

You should use something like q3map_mergeable (I don't remember how it is spelled, q3map_mergeable or q3map_lightmap_mergeable). We can see in your lightmap texture that every single tris is processed independantly.

If it works this way, good ;)
If it still doesn't work, you should disable mipmapping for the lightmap stage.
Unfortunately, there is some chance to have FPS drop... depending on the resolution of your lightmap...
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby ReD NeCKersoN » Sun Oct 18, 2009 5:00 am

Joe Kari wrote:You should use something like q3map_mergeable (I don't remember how it is spelled, q3map_mergeable or q3map_lightmap_mergeable).

This didn't help in my testing. Searching google for this command only gives me a couple of hits.
Joe Kari wrote:If it still doesn't work, you should disable mipmapping for the lightmap stage.

Forgive me, but how do I do that? :oops:
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby torhu » Sun Oct 18, 2009 7:02 pm

I did a search inside q3map3.exe and found the string q3map_lightmapMergable. Try that. ;)
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby ReD NeCKersoN » Mon Oct 19, 2009 3:50 am

torhu wrote:I did a search inside q3map3.exe and found the string q3map_lightmapMergable. Try that. ;)

Thanks, that mostly fixed everything. Still have an oddity that you can see in this first screenshot. But everything else is good now.
[thumb=http://forum.smokin-guns.org/userpix/19_shot0001_2.jpg][timg]19_shot0001_2.jpg[/timg][/thumb]
You can see the oddity in the resulting image generated by q3map2. Perhaps this could be fixed in an image editor if no other solution is found.
[thumb=http://forum.smokin-guns.org/userpix/19_lm_0000_1.jpg][timg]19_lm_0000_1.jpg[/timg][/thumb]
Btw, applying the high res method to the cliff walls also yields some nice (but not perfect) results.
[thumb=http://forum.smokin-guns.org/userpix/19_shot0002_2.jpg][timg]19_shot0002_2.jpg[/timg][/thumb]
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby torhu » Mon Oct 19, 2009 4:22 am

Nice that it's working. Don't tell Sasquatch that you've tracked him to his lair, though. :P
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby Pardner » Mon Oct 19, 2009 8:52 pm

Found this on the shaderlab wiki:
-export
* Exports internal lightmaps from a compiled .bsp to external .tga images. This switch is solitary, and allows for only the path to a compiled bsp (not .map, it should be noted) afterward.

-import
* Imports external .tga lightmaps back into a compiled .bsp. Imported lightmaps will only work on the unmodified BSP they were exported from. This switch is solitary, and allows for only the path to a compiled bsp (not .map, it should be noted) afterward.


I didn't have any luck with importing a lightmap into a map. I was just courteous if I could tweak the light map, but that sounds exactly like what you need to do. If you could edit the lightmap .tga and get rid of those "stains" then import it back into the bsp, then you wouldn't have to modify any verticies.

From what I understand:
  1. Compile map to a bsp
  2. Fix up the lighmap .tga
  3. Use the -import switch (q3map2.exe -import mapname.bsp)
  4. Continue with normal compiling -vis, -light, and -bsp2aas
User avatar
Pardner
SG Team
 
Posts: 1786
Joined: Fri Nov 18, 2005 5:48 am
Location: MD, USA



Postby Joe Kari » Wed Oct 21, 2009 7:41 pm

@ Red:
Yes I mispell it, according to the shader manual, it is spelled like Torhu said: "q3map_lightmapMergable".

To disable mipmapping add
"nomipmaps"
in its own line, this is a generic shader command (see the shader manual help).

Finally, try this switch : q3map_lightmapSampleOffset distance, this could probably help you, to fix your easygen terrain.

If this still doesn't work... erf.... plant some cactus there :D



@ Pardner:
No, Q3 engine only support 128x128 lightmap, external lightmap are processed just like any other usual texture, so you can't import it into the bsp (and there is no reason at all to do that).
Probably a trick that work with RTCW, when I was searching for external lightmap information, every tricks I found was only working for that game.
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby ReD NeCKersoN » Sat Oct 24, 2009 3:46 am

ReD NeCKersoN wrote:Btw, applying the high res method to the cliff walls also yields some nice (but not perfect) results.

Multiple high res shaders for multiple textures aren't needed in the same map. A single shader does the trick. (My mistake.) Basically, I wasted my time applying another shader to the rock walls. Makes sense now that I think about it, since the generated image by q3map2 is what determines the shadows. :roll:
Also, q3map_lightmapSampleOffset 2 fixed my sasquatch footprints. No mipmapping stuff required. Thanks Joe.
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby Pardner » Sat Oct 24, 2009 3:50 am

Good deal fixing those sasquatch footprints!

Here is some preliminary work on br_mexico:
http://img18.imageshack.us/slideshow/we ... 0002cj.jpg

Image
Image
User avatar
Pardner
SG Team
 
Posts: 1786
Joined: Fri Nov 18, 2005 5:48 am
Location: MD, USA



Postby Pardner » Sun Oct 25, 2009 7:26 pm

After a little more testing I found that in some cases the highres looks really good come pared to the standard shadows, but in other cases its not even noticeable.

Case1: The ground texture has the highres shadow, while the wood fence does not. You can easily notice the difference:
Image

Case2: The ground texture has the highres shadow, while the wood floor does not. There does not seem to be a difference between the two.
Image
User avatar
Pardner
SG Team
 
Posts: 1786
Joined: Fri Nov 18, 2005 5:48 am
Location: MD, USA



Postby ReD NeCKersoN » Mon Oct 26, 2009 2:14 am

I might be confused, & probably confused you a bit too on TS the other night, but I think applying a high res shader to one surface actually applies it to all. For instance, I only applied the HRL shader to my dirt blend in HeH ...yet I get the nice shadows from my railings on the front porch of the casket shop. I don't think you can compare shadows like you're doing in a single compile. You'd really need a split screen image of two tests put together for that.
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby Pardner » Mon Oct 26, 2009 2:36 am

ok, well, I will try recompiling durango without the highres stuff. The thing is, I think most maps were compiled using -super 2 -extrawide -filter etc. This expands the shadow and blurs it to make it look more natural. The railing shadow effect may only be a result of compiling the light stage without any added switches.
User avatar
Pardner
SG Team
 
Posts: 1786
Joined: Fri Nov 18, 2005 5:48 am
Location: MD, USA



PreviousNext

Return to Level Editing

Show Sidebar
Show Sidebar

User Control Panel

cron