Jump to content
The Dark Mod Forums
Sign in to follow this  
Epifire

Parallax Corrected Cubemaps?

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?

Share this post


Link to post
Share on other sites

Could you whip up a test map for this?

 

Yeah I probably could. Just could do a glossy floor mtr or something like the other tests did.


You need a model? Epi does you a model.



Toss me a PM I promise I don't bite.



Share this post


Link to post
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.

Share this post


Link to post
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.


You need a model? Epi does you a model.



Toss me a PM I promise I don't bite.



Share this post


Link to post
Share on other sites

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.

Let's start with that

Share this post


Link to post
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)?

Share this post


Link to post
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.

Share this post


Link to post
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...)

Share this post


Link to post
Share on other sites

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

On a second thought, mirrors show player's model by default. Not sure if it's a problem in this case though. If it is, we might want to add a noplayer flag or something.

Share this post


Link to post
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...)

Share this post


Link to post
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.


You need a model? Epi does you a model.



Toss me a PM I promise I don't bite.



Share this post


Link to post
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

WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Share this post


Link to post
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

You need a model? Epi does you a model.



Toss me a PM I promise I don't bite.



Share this post


Link to post
Share on other sites

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

 

post-496-0-32564500-1508152525_thumb.jpg

Edited by Bikerdude
  • Like 1

Share this post


Link to post
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.


You need a model? Epi does you a model.



Toss me a PM I promise I don't bite.



Share this post


Link to post
Share on other sites

Might wanna adjust the monitor contrast? but you're certainly free to download and inspect the scene for yourself.

I tried on a PC and Max laptops at work, both were too dark. And yep doing that now, as I wasnt able to at work.

Share this post


Link to post
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

Share this post


Link to post
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.


You need a model? Epi does you a model.



Toss me a PM I promise I don't bite.



Share this post


Link to post
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

Share this post


Link to post
Share on other sites

In the video posted above, they use 3 "cubemap samplers" so they cover the whole street area. Unity uses "reflection probes". Maybe it would be better to take a look how it's done in other engines, and try to copy that solution.

 

Share this post


Link to post
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.

 

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.


You need a model? Epi does you a model.



Toss me a PM I promise I don't bite.



Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...