Page 1 of 3

Creating exterior levels (example with Workshop link)

Posted: Sun Sep 30, 2012 11:49 pm
by Geistertanz
EDIT:
You can now find a village with severeal houses, a small market (not working at the moment), a gladiatoral pit, a temple and ogre npcs (also quite unresponsive at the moment) at the Nexus!
Look for the "Village of Ravenwood" on "Steam Workshop" or the Grimrock Nexus.

Hope you enjoy it!

#####

Hi everyone!

I am trying to figure out a good way to use the ceiling tile as a skybox. I was able to use the dungeon_floor01.model and retexture it, so that it looks like the night sky, but the effect looks really buggy once you move around.

How could it be done in a better/easier way? (I am hoping for someone skilled in 3d modeling to come up with a great village tileset sooner or later.)

Here is the workshop link.

And here is a picture of the effect ingame:
(the roof of the "house" was made with custom ceiling objects)
Image

Here is what I did:
1)
Define a new city tile set based on the temple in your mod's "wall_sets.lua".

Code: Select all

defineWallSet{
	name = "city",
	randomFloorFacing = true,

	floors = {
		"mod_assets/models/env/city_floor_01.fbx", 30,
		"mod_assets/models/env/city_floor_drainage.fbx", 1,
	},
	
	walls = {
		"mod_assets/models/env/city_wall_01.fbx", 50,
		"mod_assets/models/env/city_wall_drainage.fbx", 1,
	},
	
	pillars = {
		"mod_assets/models/env/city_pillar.fbx", 1,
	},
	
	ceilings = {
		"mod_assets/models/env/city_ceiling.fbx", 1,
	},
	
	ceilingShafts = {
		"mod_assets/models/env/city_ceiling_pit.fbx", 1,
		"mod_assets/models/env/city_ceiling_closed.fbx", 1,
	},
	
	floorDecorations = {
	},
	
	wallDecorations = {
		"assets/models/env/metal_hooks_wall.fbx", 1,
		"assets/models/env/metal_hooks_chain_wall.fbx", 1,
	},
	
	pillarDecorations = {
		"assets/models/env/metal_hook_pillar.fbx", 1,
		"assets/models/env/metal_hook_chain_pillar.fbx", 1,
		"assets/models/env/metal_ring_pillar.fbx", 1,
	},
}
2)
Copy the "temple_xx.models" from the asset pack into the new "mod_assets/models/env" folder and rename them to "city_xx.model".

3)
Rename the city_ceiling.model to city_ceiling_closed.model. (This will be the roof for the houses later on.)

4)
Copy the "dungeon_floor01.model" from the asset pack into the new "mod_assets/models/env" folder and rename it to "city_ceiling.model".

5)
Open the "city_ceiling.model" with the Model Toolkit and change its material to city_sky.

6)
Define the city_sky material in your mod's "materials.lua". Make sure you change doublesided to true and lighting to false!

Code: Select all

defineMaterial{
	name = "city_sky",
	diffuseMap = "mod_assets/textures/env/city_sky_dif.tga",
	specularMap = "mod_assets/textures/env/city_sky_spec.tga",
	normalMap = "mod_assets/textures/env/city_sky_normal.tga",
	doubleSided = true,
	lighting = false,
	alphaTest = false,
	blendMode = "Opaque",
	textureAddressMode = "Wrap",
	glossiness = 20,
	depthBias = 0,
}
7)
Create sky textures (1024x1024) and save them as "city_sky_dif.tga", "city_sky_spec.tga" and "city_sky_normal.tga".

8)
Add new objects for the ceiling shafts and the closed ceiling.

Code: Select all

defineObject{
	name = "city_ceiling_shaft",
	class = "Decoration",
	model = "mod_assets/models/env/city_ceiling_pit.fbx",
	placement = "ceiling",
	editorIcon = 104,
}

defineObject{
	name = "city_ceiling_closed",
	class = "Decoration",
	model = "mod_assets/models/env/city_ceiling_closed.fbx",
	placement = "ceiling",
	editorIcon = 104,
}
That's it! :-)

I also created some shopkeeper alcoves, but you can find out how these can be made on page 8 or 9 of the Model Toolkit thread.

Have fun and happy modding!
-Geistertanz

EDIT:
I changed some of the assets from the official pack, so I can't publish the changed wall tiles outside of a dat file. But the above description should allow you to create your own exterior wall sets without much problems.

Re: Creating exterior levels (example with Workshop link)

Posted: Mon Oct 01, 2012 12:02 am
by Neikun
I think this looks fine. The sky is going to look close to you because of the size of the box you're in. But done with appropriate wall and floor textures you can probably make it look more fitting.

Edit: what I mean by dungeon files is not just the .dat file, but the mod_assets folder so that we can see your work from the inside.
-like Antti did with This Rotten Place

Re: Creating exterior levels (example with Workshop link)

Posted: Mon Oct 01, 2012 12:06 am
by pulpum
if the stars don't move :) I think it's ok :) have you tried some hubble pics? they always look fantastic...

(good job by the way) :twisted:

Re: Creating exterior levels (example with Workshop link)

Posted: Mon Oct 01, 2012 12:12 am
by Geistertanz
pulpum wrote:if the stars don't move :) I think it's ok :) have you tried some hubble pics? they always look fantastic...
I did, but the more detailed the sky gets, the more fake it looks ingame because of the repeating tiles. You get the best results with a simple skybox.

I also tried a daylight version, but the default fog ingame is black, so it looks rather weird. Maybe a new version of the editor could allow custom fog colors (if it isn't hardcoded into the engine)?

A possible solution could be mist that is created near the ceiling so that you won't get a clear view of the sky. It would also create a nice gloomy atmosphere for the village. I think the creator of the Waterdeep sewers dungeon added mist, so I will check that out tomorrow.

Fog

Posted: Mon Oct 01, 2012 1:19 am
by djoldgames
Geistertanz wrote:I also tried a daylight version, but the default fog ingame is black, so it looks rather weird. Maybe a new version of the editor could allow custom fog colors (if it isn't hardcoded into the engine)?
Fog is fully customizable, it is created by particle system "LightSource" class.
I make my own dark-green fog for EOB Sewers mod.

definition in particles.lua

Code: Select all

defineParticleSystem{
	name = "sewers_fog",
	emitters = {		
		-- fog
		{
			emissionRate = 1.5,
			emissionTime = 0,
			maxParticles = 100,
			boxMin = {-6, 0.1, -3},
			boxMax = { 6, 0.1,  3},
			sprayAngle = {0,30},
			velocity = {0,0},
			texture = "assets/textures/particles/smoke_01.tga",
			lifetime = {10,20},
			color0 = {0.67, 0.58, 0.13},
			opacity = 0.2,
			fadeIn = 9,
			fadeOut = 9,
			size = {4, 6},
			gravity = {0,0,0},
			airResistance = 0.1,
			rotationSpeed = 0.05,
			blendMode = "Translucent",
			objectSpace = false,
		}
	}
}
and entity in object.lua

Code: Select all

defineObject{
	name = "sewers_fog",
	class = "LightSource",
	lightPosition = vec(1.2, 0.2, 0),
	lightRange = 0,
	lightColor = vec(0.67, 0.58, 0.13),
	brightness = 1,
	castShadow = true,
	particleSystem = "sewers_fog",
	placement = "floor",
	editorIcon = 88,
}

Re: Creating exterior levels (example with Workshop link)

Posted: Mon Oct 01, 2012 1:22 am
by Montis
Very nice. Now I only need to wait for a desert sky for my own dungeon ;)

Re: Creating exterior levels (example with Workshop link)

Posted: Mon Oct 01, 2012 1:35 am
by HaunterV
Brilliant start.

lets work with this... simple starfields will in all likelihood look outta place compared to the fidelity of everything else in grimrock but there must be a solution.

Re: Creating exterior levels (example with Workshop link)

Posted: Mon Oct 01, 2012 2:18 am
by JohnWordsworth
Hmm, this is probably unlikely to work (but possibly could, so I will post it as an idea)...

1. Make the ceiling transparent (either using a custom mesh or just a transparent texture).
2. Create a huge cube (sized bigger than the whole dungeon floor), with the faces pointing inwards and assigned a skybox material.
3. Add that cube to the centre space of the level.

As I say, I don't massively expect this to work - as I don't know if light would get there / It might be clipped by the view projection, but with the right sizes it might just work?

Re: Creating exterior levels (example with Workshop link)

Posted: Mon Oct 01, 2012 2:29 am
by pulpum
put a fog (a black and very translucent one) on top of ceiling... maybe it could blur the sky... we are near of the outside dungeons... I can smell the air :lol:

Re: Creating exterior levels (example with Workshop link)

Posted: Mon Oct 01, 2012 2:41 am
by Lmaoboat
Would it be possible to make a model for a sky tile with lots and lots of empty space at the bottom so it ends being really high up in the air? also, too bad there's no support for 3d skyboxes, you could make a whole not more interesting dungeons with them.