Jump to content
The Dark Mod Forums

Parallax Mapped Visportal Patches


nbohr1more

Recommended Posts

In a previous thread Serpentine showed that placing a triggered patch with a Cube Map in front of a Visportal could be useful to extend the illusion of depth beyond regular textured Visportal patches:

 

 

 

Obviously you two are on the same strange wavelength because it is not obvious what you are talking about. As MD says, a visportal can't be an entity. If you use any other texture on it then it's not a visportal. If you use a cubemap texture on its other surfaces then they won't show anyway. If you mean create a cubemap patch in front of a visportal that is linked to it in some way to show/hide along with the visportal being open/closed then theoretically that might work.

 

I am uncertain about the cubemap inside an inaccessible building. It might work. It would be like the windows in Chalice. Try it with a suitable sky like the industrial. But whether it would be effective or any problems like lighting from outside or worth the effort I don't know.

 

 

To clarify, I presume that Serp and I are both aligned on this excerpt...

 

 

 

Visportal switches: func_portals

The preceding section Visportals and doors makes clear that doors can function like switches to enable and close visportals in contact with them. func_portals can be used to enact further control over portals. You can place a func_portal entity so that it intersects with a visportal, and then trigger the func_portal to close or open the visportal. A second control method is had by using the portal_dist and distcheck_period properties on the func_portal. They control the distance to the player and how frequently (in seconds) this distance should be checked, respectively, and make explicit triggering of the func_portal unnecessary. As with doors, even if enabled the visportal will not be open even if it is in the player's view.

 

Another clever trick exists with regard to func_portals: you can also build a func_static over the visportal, and target it with the func_portal as normal. Now, in addition to opening and closing the portal, this will also toggle the drawing of the func_static. This means you could place an appropriate texture (perhaps a low resolution image of a room's interior, drawn over a window) and have it turn on or off based on the player's distance away.

 

 

Yup, that's the idea - I was going to use it in my 'performance' version of Return to The City, but after realising I was still using an old beta version of the map to build off I got annoyed and left it. But I did test this before stopping and it was working fine.

 

Test Map

 

When you walk into the hall the cubemap should hide and the portal should be unsealed. You could do the same with a brush.

 

Adjusting the func_portal changes the distance and check period - check period should be quite high, 1 is fine, lower if you are using the portals around sudden corners, but higher is better for performance. The patch/brush that is to be hidden has to be a func_static and should have "hide = 0", else it will not work as expected.

 

 

Again. Wicked Awesome... :D!

 

 

As a variation of this idea, I thought that a very deep parallax map on the Visportal patch might be even better???

 

(I understand that parallax maps would not be available until Id Tech 4 goes GPL....

Edited by nbohr1more

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

OK

 

I'm just going to ramble away with my goofy broken logic and hope that some gems of insight come tumbling out :laugh:...

 

The reasons for looking into this idea:

 

1) Visportals will likely still be beneficial even after the Id Tech 4 source is fixed-up by the TDM team

 

2) It may initially be difficult to reduce the CPU overhead for Id Tech 4's Unified Lighting model and any technique that moves geometry (in the case illusory geometry) to the GPU is beneficial.

 

(Which brings up my ultimate curiosity: "Are current GPU's programmatically flexible enough to pull-off Carmack's Reverse or would moving the Shadow Volumes to the GPU mean the old bulldozer approach?")

 

3) We can test this now at the expense of the fixed ambient

 

Downside of the technique:

 

If you go crazy and put a visportal real close it'll look weird when a Guard walks through the patch (unless you can somehow trigger the visportal to react to AI's?)

 

Any thoughts are welcome, including some stern scolding if necessary :laugh:

 

(feel free to say "so many wrong ideas it's not worth the effort to explain" :laugh:)

Edited by nbohr1more

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

To clarify further, this technique would involve performing a renderbump operation from the View field geometry of a Visportal against flat surface. (Or approximating the effect manually).

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

I see the trick here:

 

If you tried to renderbump the view-space it would only collect the line-of-sight. So you would have to distort the geometry in a similar fashion to how Disney World has a small castle that looks like a big castle far away (foreshortened perspective). So artistically deepening the normal map of a texture of the view would be the only practical way unless this is easier than I think it is:

 

1) Create Map

2) Slice out the view solid (pyramid?) past the visportal and export to Blender (etc)

3) Squeeze the view solid into a rectangular solid shape (line-of-sight)

4) Create the Normal map of this distorted geometry against a flat surface

Edited by nbohr1more

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

I'd be (knee-jerk) skeptical about that in practice if it's a working visportal you can ever get through because not sure the illusion would hold, and other issues like AI as you mention (I'd be happy to be proven wrong, though). But if you can't go through it, it's a window or like the area over a roof, then you really wouldn't even have to bother with the visportal. Just have a wall and throw the patch over it, even if you can get to that area through another way (like the door). Then you might have big windows overlooking grand vistas without the performance hit. My intuition is that's where this kind of setup might be really shine, if we can convincingly get it working at all.

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

I red recently an article where they guy invented using a pixelshader to fake the inside of rooms, applied to windows in skyscrapers. But I can't find it again, all keywords I try like "windows" "cityscape" etc are too generic. Damn you google!

"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

Interior Mapping?

 

Interior Mapping Article

 

Yeah, that was it! Damn, I searched for like 20mins... thank you :)

"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

(sheepishly admits that this is the source of both my speculation posts :blush:... but grateful to Serpentine that he implemented approximately the first one :D... trying to take the concept to it's extreme logical conclusion... :huh:...)

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

One gameplay element to keep in mind is that in a game like Dark Mod the player might expect to be able to get inside a building where he can see an interior. "Mmm... open window up there and I can see inside" < spends an hour finding and stacking crates to climb up>

Link to comment
Share on other sites

I agree with you. But I think like my window example in reverse, the idea is that there is an interior, the same one even, but this shader trick let's you show it without rendering any new geometry (and the entrance would be from another route). I don't know if the performance tradeoff is much net benefit compared to just an open window (or many of them); it may be... It made even more sense to me in the exterior window example where it's a huge space. (This is also reminding me of the skybox trick of putting little buildings on the sky walls.) Anyway, it's worth some experiments and playing around with in any event.

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

This is kinda like filling your map with doorways that dont open.

 

(BTW... Someone should make an April 1st FM that has no doors that open . :laugh: Or infinite lock picks :laugh:)

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

Extreme Old Crumbling Castle Technique:

 

Ingredients:

 

Id Tech 4 Engine (as is)

Cube Maps

Normal Maps

Infinite time and patience

Artistry

 

Step 1: Create a basic Castle with (perhaps) some low-poly gaps representing damage

(Texture the Castle make it look as good as possible)

 

Step 2: Export the Castle into Blender

 

Step 3: Clone the Castle then modify the cloned copy into an extreme high-poly version with tons of little cracks and separated blocks/bricks making sure that some of the original texture work is still present

 

Step 4: Cut the High-Poly and Low-Poly Castles into components and create Normal Maps for the most detailed portions where things are crumbling

 

Step 6: Identify the deepest cracks in the High-Poly Castle

 

Step 7: Enlarge the Geometry of these cracks to the point where you can noclip into them when imported into Doom 3

 

Step 8: Fly into the Giant-Size cracks and capture an Environment Shot (part one of the Cube Map process)

 

Step 9: Shrink the Cube Map in Gimp (etc)

 

Step 10: Replace some of the texture work with the more detailed texture and normal map work

 

Step 11: Replace the deepest cracks with the Cube Maps (Interior Maps)

 

Step 12: Oh No! The Cube Maps look "wrong"!

 

Step 13: Stretch the proportions of the 6 environment shots so that the central "shot" is pinched a bit (lots of fiddling)

 

Step 14: After an eternity... Great crumbling castle with Cube Maps providing the illusion of deep detailed cracks

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

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

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • 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 )
      · 3 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
       
      · 7 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...