Jump to content
The Dark Mod Forums

Parallax Corrected Cubemaps?


Epifire

Recommended Posts

This has a very powerful result and seems rather straight forward after implemented. I for one would use this to the fullest extent were it available to me in TDM. I guess that really comes down to what people think about this and really, is it a viable feature that can be implemented?

Could you whip up a test map for this?

Link to comment
Share on other sites

I'd definitely use this as well. Haven't tried a regular cubemap on the floor yet, and it would probably need to be a static mesh floor to have a proper point of origin. It's definitely something worth checking.

 

Currently I've been using cubemaps for generic sky reflection to windows and exterior reflective surfaces that don't need localized sources. I gotta figure out the correct method I asked about a while back to have proper projections in env_shot, though I think I can manage once I try that again.

 

 

Could you whip up a test map for this?

 

I imagine a simple room with pre-captured cubemaps shall suffice? I'm very curious how many captures a larger room would need as I usually see newer engines sample out multiple capture nodes along a single, long surface.

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

Do I understand it right that this effect is only applicable to an absolutely horizontal floor?

Also, can't it be implemented as a mirror instead of floor with some sort of addition (transparent geometry on top)?

It should work with the existing mirror function for single flat surfaces.

Link to comment
Share on other sites

Hmm.

 

I wonder if we have the map from this wiki around:

 

http://wiki.thedarkmod.com/index.php?title=Cube_maps

 

and how much of a test case it could be used for.

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

Lol.

 

Mirrors already do this and more but require "full scene rendering".

 

This is for "faked reflections".

 

That said, for mirror surfaces we don't want the player to be seen in (such as water):

 

http://bugs.thedarkmod.com/view.php?id=800

 

there is the suppressSurfaceInViewID call.

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

Lol.

 

Mirrors already do this and more but require "full scene rendering".

 

This is for "faked reflections".

 

That said, for mirror surfaces we don't want the player to be seen in (such as water):

 

http://bugs.thedarkmod.com/view.php?id=800

 

there is the suppressSurfaceInViewID call.

 

Is there ever a time where cubemaps can be used to draw the majority of the scene (all excluded) with only moveables referenced in real time reflections (such as NPCs or torches)? It's the consideration if perf friendly cubemaps could be combined with only flagged entities to grant less costly dynamic reflection capture. A hybrid if you will.

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

It should work with the existing mirror function for single flat surfaces.

Mirrors are very performance-intensive, though. So unless one really need a real-time reflection it is preferable not to use it.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Could you whip up a test map for this?

 

Here it is! I kinda went a little nuts and decided to make some marble stuff from scratch just for a fun day project. It should all be there (minus the parallax correction obviously) but anyone can crack this open to have at it. Hopefully my envshot reference position will suffice, otherwise you can certainly capture another if need be.

 

https://www.mediafire.com/file/3n19ri43bxs2raa/parallax_cubemaps.pk4

 

rmQpcbs.jpg

  • Like 4

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

@Epi, the image is very dark fella. So corrected and it can sorta see, maybe make a short vid..?

 

attachicon.gifrmQpcbs (2).jpg

 

Might wanna adjust the monitor contrast? :P

 

The brights get pastie at that level, as it's intentionally dark with the lit paintings to pop the threshold for the cubemap reflections. People can record videos on that if they like but I had nothing else to show besides the screenshot. Obviously we'll be seeing videos if someone gets a parallax corrected reflection working though, but you're certainly free to download and inspect the scene for yourself.

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

Very impressive work, Im hoping someone can crack the parralax correction as that would awesome (Calling Obsttorte..?).

 

post-496-0-83724700-1508190670_thumb.jpg

 

How did you take the ENV shot, what args did you use..? and could this ENV image be place on a single flat surface? Im thinking of this as faking the interiors of building as the player walks around a map for example..

Edited by Bikerdude
Link to comment
Share on other sites

They're fairly expensive to create as it's a a series of six images it prints off. Quoting AluminumHaste's console line from the newbie thread I basically used the following (envshot cubetest 2048 24). 4:3 aspect ratio with 640x480 screen resolution and that's it. It's fairly user intensive as you've gotta have a different mtr reference to handle each instance of when a unique cubemaps keyname is used. So capture, and then create a new mtr instance that probably works best as optional skins. Granted the skins naming convention is only relative to the map it's used in, it's probably the best method right now.

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

I did not have time to look at the map yet due to RL issues but can you try this light:

lights/mountain_sunset
{	
	ambientCubicLight
	lightFalloffCubeMap env/skyboxes/skybox_mountain_sunset/mountain_sunset
	{
		cameraCubeMap makeIrradiance(env/skyboxes/skybox_mountain_sunset/mountain_sunset)
		colored
		zeroClamp
	}
}

lightFalloffCubeMap is specular and cameraCubeMap is diffuse.

Replace env/skyboxes/skybox_mountain_sunset/mountain_sunset with your cubemap here.

Will only work with 2.06/svn.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

I did not have time to look at the map yet due to RL issues but can you try this light:

lights/mountain_sunset
{	
	ambientCubicLight
	lightFalloffCubeMap env/skyboxes/skybox_mountain_sunset/mountain_sunset
	{
		cameraCubeMap makeIrradiance(env/skyboxes/skybox_mountain_sunset/mountain_sunset)
		colored
		zeroClamp
	}
}

lightFalloffCubeMap is specular and cameraCubeMap is diffuse.

Replace env/skyboxes/skybox_mountain_sunset/mountain_sunset with your cubemap here.

Will only work with 2.06/svn.

 

Sorry hadn't seen your reply since I apparently hadn't set notifications on the thread like I thought I did. I'm not working out of the SVN so that might take a little bit to move this over, I suppose if it's just the PK4 I might be able to manage that. I've never actually used cubic lights as I wasn't sure what all they did but it would definitely be worth looking into.

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

  • 2 years later...

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

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
    • Ansome

      Well then, it's been about a week since I released my first FM and I must say that I was very pleasantly surprised by its reception. I had expected half as much interest in my short little FM as I received and even less when it came to positive feedback, but I am glad that the aspects of my mission that I put the most heart into were often the most appreciated. It was also delightful to read plenty of honest criticism and helpful feedback, as I've already been given plenty of useful pointers on improving my brushwork, level design, and gameplay difficulty.
      I've gotten back into the groove of chipping away at my reading and game list, as well as the endless FM catalogue here, but I may very well try my hand at the 15th anniversary contest should it materialize. That is assuming my eyes are ready for a few more months of Dark Radiant's bright interface while burning the midnight oil, of course!
      · 4 replies
×
×
  • Create New...