Jump to content


Photo

Spooks' Mapbook Thread


7 replies to this topic

#1 Spooks

Spooks

    Member

  • Member
  • PipPip
  • 358 posts

Posted 15 April 2016 - 01:39 PM

*
POPULAR

It's like a scrapbook, but for mapping!

 

Hello, personal threads are all the rage so it's time I made one! I plan to be posting my forays and experiments in mapping, level design, scripting and whatever else in here. Here's to many, many pages!

 

OK, let's start it off. You may remember that back in November I posted some screenshots of a cubemap slapped on some materials. Now that I'm at least a tad more educated on how materials work, I wanted to go back and see if I can improve on what I wanted to do.

 

Firstly, here is a clip of a default material without a cubemap reflection on.

 

Now here's the same material with a cubemap stage.

 

The stage was just something I found and copied off a shiny tile and it's really simple - it goes like this:

	{
        blend gl_dst_alpha, gl_one
        cubeMap     env/blueroom
        texgen      reflect
        } 

As you can see, the result looks pretty unrealistic. The odd thing here is "gl_dst_alpha". It tells the stage to take the alpha value of the destination, which would be what's on screen I suppose. For a texture like our wood there, this is useless, since it's not transparent, the alpha is always going to be constant. In this particular case "blend gl_dst_alpha, gl_one" might as well be "blend add".

 

Replace gl_dst_alpha with gl_dst_color, however, and you get this.

 

It's quite subtle, but I like it a lot. It's still not ideal, from far off it's almost invisible, I would like some way to make it a bit more pronounced but none of the other blend modes achieve the same effect. If anyone has any ideas, shoot.

 

Another thing I was wondering about while looking into the materials is this portion:

	{							
		if (global5 == 2)		
		blend add				
		program	ambientEnvironment.vfp
		...
	}

It's supposed to only work when Ambient Rendering is set to Enhanced, but there's no difference if you delete this. The ambientEnvironment program only seems to work when Ambient Rendering is set to Simple as a matter of fact, set if (global5 == 1) and you can see the actual effect. Putting a cubemap in this stage makes it looks pretty nice, actually, that would be a nice look to achieve but again, I can't get it working with Ambient Rendering Enhanced. There's another program, the bumpyEnvironment program, but it seems to just do what the envmap/texgen reflect stage does.

 

edit: here's how the cubemap looks under the ambientEnvironment stage:

 

gc0lIcc.jpg

 

Note that you don't get that Fresnel effect with the dst_color, gl_one blending stage.


Edited by Spooks, 15 April 2016 - 01:50 PM.

  • Dragofer, nbohr1more, Goldwell and 4 others like this

My FMs: The King of Diamonds (2016)

 

Visit my Mapbook thread sometimes!


#2 Spooks

Spooks

    Member

  • Member
  • PipPip
  • 358 posts

Posted 15 April 2016 - 06:20 PM

Okay, here's a question for you all. I looked around and it seems TDM has three options for Ambient Rendering, but I was never aware of that since the options menu only displays Simple and Enhanced (Enhanced being the equivalent of what I read being described as "Normal"). This stuff has been in since 1.03 and putting it in the console actually makes a difference, but hell if I know why it isn't in the menus. Can anyone give me a rundown?

 

http://forums.thedar...-ambient-modes/ Reference thread.

 

edit: hey here's a post

 

edit edit: The one reason I'm investigating this is just trying to get better looking cubemapped materials.

 

edit the 3rd: it's not worth updating the thread over this, but I'm just going to edit in this snippet I posted on Epi's thread, because I think this code's about the best I'm going to get for cubemaps for now and it's nice to have it here in one place. I suppose I'm done with env stuff for the moment.

{
maskcolor
map makealpha (textures/darkmod/tile_s_bright) //here I use the specular of the texture
alpha 0.5		//this darkens the alpha by half, modify it as you wish
}
	
{
blend gl_dst_alpha, gl_one
maskalpha
cubeMap      env/gen2
texgen      reflect
}

Edited by Spooks, 29 May 2016 - 07:02 PM.

My FMs: The King of Diamonds (2016)

 

Visit my Mapbook thread sometimes!


#3 kingsal

kingsal

    Member

  • Member
  • PipPip
  • 178 posts

Posted 30 May 2016 - 11:42 PM

Oh awesome, I was wondering how to do cube maps in TDM. The effect you've managed to get looks great.

Are those cubemaps you've created or are those stored somewhere in the default materials?

 

Thanks!



#4 Spooks

Spooks

    Member

  • Member
  • PipPip
  • 358 posts

Posted 31 May 2016 - 02:06 AM

TDM has two default cubemaps as far as I'm aware, env/gen1 and env/gen2. They're both pretty generic, so I made the cubemaps myself with the envshot console command. Right now it's a bother to be putting cubemaps directly into materials rather than having an env_light entity and if you want, say, a texture with two different cubemaps, you'd need to make/use two different materials in DR. However, I think keeping your cubemaps blurry and generic looking, and limiting yourself to about 3 max in your map might reduce the bloat in a practical scenario.

 

The code snippet from the second post is what you'd want, since masking reflection by an image's specular map is the most logical way to do it, regarding how real life light works. The gl_dst_color method is also good, however, since it ensures you won't get shiny materials in complete darkness. On the flipside, it over-brightens bright areas, so watch out for that.


My FMs: The King of Diamonds (2016)

 

Visit my Mapbook thread sometimes!


#5 Spooks

Spooks

    Member

  • Member
  • PipPip
  • 358 posts

Posted 21 August 2016 - 07:36 AM

*
POPULAR

Thread's a bit bare so here's a little update. My WIP is going slowly, got some layouts going, it's taken me the longest time to actually think up a story worth telling. Probably a dozen or so ideas thought up and trashed. Last night I did a little building mock-up of an aesthetic my FM could take. It came out alright and since it's probably not going to be in any playable mission you can feast your eyes on it here. I don't know if it's really what I want to go for, but it might be a nice new style to have in a TDM mission.

 

du6iDPn.png


  • Bikerdude, Melan, Dragofer and 4 others like this

My FMs: The King of Diamonds (2016)

 

Visit my Mapbook thread sometimes!


#6 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 11673 posts

Posted 21 August 2016 - 07:38 AM

The single lit window beckons. It says, "What's going on up here?"



#7 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 18452 posts

Posted 21 August 2016 - 07:51 AM

Ah..very pretty shot. Nice see the detail levels in your mapping style have increased!



#8 Dragofer

Dragofer

    Modeler

  • Member
  • PipPip
  • 440 posts

Posted 21 August 2016 - 08:13 AM

Quite a lot of Victorian vibes going on there.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users