Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

It seems patch surfaces can catch lights easily enough on their faces, but they can't project shadows themselves, effectively messing up random ammounts of shadow area behind them.

 

Patches ( and everything else in Doom3 ) only cast shadow-volumes from their "back-faces".

To see what this means you can create a simple test scene with a small 3x3 Patch hovering in the air that has a standard material on it, and two light-sources, one above the patch and one below.

The patch will only cast a shadow-volume from the light that is "seeing" it's back-face - which is invisible for non-twosided materials.

( i hope this made sense ;) )

 

It's pretty counter-intuitive at first, since one would expect the visible surface to cast the actual shadows.

Link to comment
Share on other sites

Patches ( and everything else in Doom3 ) only cast shadow-volumes from their "back-faces".

It's pretty counter-intuitive at first, since one would expect the visible surface to cast the actual shadows.

 

Really? Are you absolutely sure about that, because I always thought it was the other way round? Or more precisely, the shadow volume is calculated by extruding the silhouette, where the silhouette includes all edges between a front-facing and a back-facing polygon (or between a front-facing polygon and nothing, in the case of a non-closed mesh such as a patch).

 

In your example, if you were walking on a hovering patch and the light was above it, I would expect the shadow to be cast underneath. Is this not what happens?

Link to comment
Share on other sites

EDIT, whoops, I misread that... anyway this might be helpful to anyone in the contest...

 

=============

 

 

nbhor1more is formatting this on the wiki for me, I've noticed a few mistakes i made that I need to clean up, but they are minor...

 

http://wiki.thedarkm...portal_Tutorial

 

Here's a full zip with all the maps, I guess we need to get those on the wiki somehow too.

http://dl.dropbox.co..._Street_Tut.zip

(sounds like stage 1 leaks but was an easy fix... I haven't had a chance to look yet.)

 

Basically you just don't want to be able to look at world spawn 'through' skybox, you need to layer up func_statics on top of it.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Really? Are you absolutely sure about that, because I always thought it was the other way round? Or more precisely, the shadow volume is calculated by extruding the silhouette, where the silhouette includes all edges between a front-facing and a back-facing polygon (or between a front-facing polygon and nothing, in the case of a non-closed mesh such as a patch).

 

In your example, if you were walking on a hovering patch and the light was above it, I would expect the shadow to be cast underneath. Is this not what happens?

 

Here's a test-map with a single-sided patch-mesh, a reddish light is "inside" of it, one light above it.

Notice how only the reddish light is casting a shadow and that there is no stencil-shadow from the light above it, only shading.

Both are standard non-ambient lights with no special settings like noshadows or the like.

 

patchshadow.jpg

Link to comment
Share on other sites

That's exactly like the DX8 demo I was discussing in the GPL landed thread. Except in that example the actual verts of the back facing polys are streched by the vertex shader to make the volume instead of generating silhouettes then extruding.

 

Meaning that it seems that Doom 3 already uses a geometry method that is friendly to the technique...

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Here's an updated image that shows models and brushes behave the same way.

The brush has one of it's faces that is facing away from the lightsources caulked, so it is removed during compile - causing light to "leak" through it.

The sides of the brush facing the lights are standard textured, not caulked.

 

( the flat grey area is the void )

 

backfaceshadow.jpg

Link to comment
Share on other sites

rebb - Thanks, that actually clears up things a lot for me; I was under the impression the patches needed to be "closed" to be casting healthy shadows (with the rudimentary tests I did), but now I see that the important thing is to have the necessary back faces turned to the light source - I tested a floating patch wall I had and the light behind it was casting a perfect shadow over the environment. That's going to save me a lot of work actually, and uneeded patches (no more patch boxes, only needed faces)! :)

 

Baddcog - I'm still studying your tutorial, now Im going to read you guys wiki page, but I just wanted to say that this is looking tremendous and is a god send for me, in fact it's almost too perfect - the original idea was to have the chapel tower on the skyline to guide the player there, but soon I decided it would simply be impossible, with the whole visportaling thing, and remade the middle of the whole map to hide the tower from any angle, untill you can actually reach it. Seeing now that you explain exactly how to pull it of, it REALLY makes me want to go back to the drawing board and see if I can still get that original effect I wanted haha. Thanks a lot (and nbohr1more too)!

Edited by RPGista
Link to comment
Share on other sites

Is there a way to increase the range of sight in Dark Radiant? The brushes clip away pretty early which is a pain in outdoor scenes.

 

The button Shadowhide points out will disable cubic clipping altogether, which will achieve what you want but might reduce performance on large scenes. If you just want to change the clip distance without disabling it, use the two rightmost buttons on the camera view toolbar.

 

Here's an updated image that shows models and brushes behave the same way.

 

Well, there's no arguing with the screenshots. I suppose for closed meshes it makes no difference either way. Is this perhaps an optimisation to avoid calculating the shadow volume inside the model/brush (which would be worthless)?

Link to comment
Share on other sites

(no more patch boxes, only needed faces)! :)

 

I guess most of the time with things like the arches you posted, one wouldn't run into this problem because they are usually either sitting right on a wall or theres another arch-patch on the opposite side.

 

Well, there's no arguing with the screenshots. I suppose for closed meshes it makes no difference either way. Is this perhaps an optimisation to avoid calculating the shadow volume inside the model/brush (which would be worthless)?

 

Well it is pretty unintuitive :).

 

That could be a reason yeah.

Or maybe it has also to do with floating point inaccuracies possibly causing shadow-flicker if you are for example looking at a surface that is casting a shadow away from you, but the engine still trying to figure out if there's shadow right on the surface-plane. But that's just a guess.

Actually that makes no sense because it just uses the silhouette. :blush:

Link to comment
Share on other sites

edit--- I guess I read a post about door hinges on first page?

 

 

Honestly when I made the doors I wasn't too concerned about the overlap. Players really won't notice in game if they are playing.

 

That's one of those 'game bugs' you have to be really anal retentive about to actually care...

 

There will always be 'real world' things that are wrong in game.

 

If I made the hinge point on the door then they would only swing one way, and we'd need another door model just to swing the other way... And mappers would be confused, etc...

 

In my opinion, spend time making a nice playable map and forget about the tiny insignificant details.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Hi, i have 2 questions:

 

1st: Is it somehow possible to get more vertices on a brush than those 4 corner vertices? Or is there another way to make more complex brushes? I know of patches, but they only create a flat brush.

 

Thats what i mean -> i want vertices to manipulate at the red circles:

 

brushverticstx6ex.png

 

I recently used the subtract tool and as a result ( to my surprise) a brush with 5 (vertices) corners on each side emerged, so i guess it must be somehow possible.

 

2nd question:

 

I used a doom3 texture. Is that somehow bad? I couldnt find another (bright) concrete texture than cobblestones/sidewalk_concrete, but i already used that several times and it has those "plates" in it.

Edited by jysk
Link to comment
Share on other sites

On your first question, just stack 4 smaller brushes on each other and make sure the texture is aligned so it looks seamless, or you can use the 'cut' tool twice to cut that one brush into 4 parts. Then when you're moving the verticies at the places you circled, just select the two touching verticies at the corners so they move in tandem as if one, and I think that'd add up to what you want to do. (I don't think the weld command 'w', or whatever it is, works on welding the two verticies together when they're for brushes, but it doesn't hurt trying.)

 

On your second question, I also used some doom3 textures. You can use them, but the main issue is that they don't work with the ambient light so will appear pitch black in ambient light... So you need to add something to the shader file for the texture to get the ambient light to work properly on it. I don't recall exactly what you have to do, but I think if you do a search for it on the forum or wiki you'll find it explained somewhere. In short, it can be done but requires more work on your part to edit the shader file's code and include it in your .pk4 package, as if it were a custom texture. (Try looking up using custom textures in the wiki.)

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

How do you guys align door frames?

 

I made a hole with 48x96 and tried to insert the 48x96 door frame model in this, but no matter how small I size the grid, the door frame will never fit (see picture)

post-3542-0-06114900-1325110433_thumb.jpg

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

@serioustoni,

 

I just made those frames to fit the doors. The doors were made first to fit the grid... So I just set the grid to 8 I believe and make the whole just a bit larger, then make sure your portal fits.

You can also caulk those faces, which may allow you to keep the hole in the wall 48x96 anyway (but you might get a sliver of the wall poking out), you'd see pink in the editor but nothing in game.

 

(you should caulk those faces anyway, they'll be receiving shadows from the frame and being cut up by the portal otherwise)

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

How can I group Entities?

I created a candle, a holder and a flame. I put them in one prefab but still I have to select each single object when I want to move them.

 

You could create a layer, and make them the only things in the layer. When you click on the layer name in the layers window, they'll highlight together.

 

Or you could use a single holder and let the SDK provide the candle and flame automagically at mission start. Browse the entities in the 'Lights' folder in the 'Create entity' window.

Link to comment
Share on other sites

Hm I guess there's no good work around then :(

 

The Layer method isn't that good, because I had to do it for every candle, flame, holder, sound, etc. and I had 1000 layers in the end.

Choosing the candle from the entity list is fine, but I also need to select my custom holder, sound, etc. everytime.

 

I'll select the things one by one.

Thank you though, grayman.

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

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

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...