’Swipe’ – Nyphoon’s Upcoming Stealth Game

Lightmapping is burning shadows, lights, etc into the textures rather than calculating them every frame.



You can either directly burn them into the texture or use more advanced techniques that overlay a lightmap over the colour map.

Thanks zarch. Will look into it as soon as possible.



Also, how do you add it to a material in jME?

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:materials_overview



like any others



[java]material.setTexture("LightMap", assetManager.loadTexture("")); [/java]

I don’t think this will work for me, unfortunately. I plan on using a day/night cycle probably (not set in stone.

That’s why separate lightmaps are good. You can do a “night” lightmap and a “day” one and then blend between them (you might need a shadow processor as well but at least you can do things like lights in scene (for example fires, street lights, etc).

Well, by day/night cycle, I mean something like real life. Sun moves slowly across the sky, moon rises, sets, sun rises. So the shadow direction would change every few real-time minutes. I hope I understood you well.

Yes. But the thing is there are other lights too.



For example look around your room - there is a light in the ceiling, the light from the monitor in front of you, maybe from a clock or table lamp, etc.



All those lights can be pre-calculated and then you just dynamically calculate the sun light/shadow on top of it.







Having said that unless you really need a moving sun you will find it much simpler to go with a static one (and it actually opens up more artistic options too - for example few games are set at noon as it makes for very boring lighting).

So what you’re proposing is to use just two hours (for example 10AM and 12PM)?

Without knowing your game design I’m not proposing anything :smiley:



Just making a few suggestions to factor into your planning - static timing is both easier to do and gives more controllable results (and hence with limited resources better results)…



…so unless you need dynamic I’d recommend static :slight_smile:

Thanks a lot for your input :slight_smile:



PS Do you recommend using displacement apart from light maps?

@memonick: I’ve got some old assets from a game I tried to make years ago (and failed epically ^^). If you want I could give you some of the stuff I created for it. All models are extremely low poly (it was supposed to be a strategy game).



http://i.imgur.com/1hhqf.jpg



The models are created with 3ds max and photoshop. At least for 3ds I can export it to a format blender can read.



greets



ceiphren.



btw. wasn’t there a jme-asset-library-thing?



edit: oh, just read that you use 3ds and ps, too.^^

2 Likes

I wouldn’t mind looking through them :slight_smile: Thanks!

@ceiphren said:
@memonick: I've got some old assets from a game I tried to make years ago (and failed epically ^^). If you want I could give you some of the stuff I created for it. All models are extremely low poly (it was supposed to be a strategy game).

http://i.imgur.com/1hhqf.jpg

The models are created with 3ds max and photoshop. At least for 3ds I can export it to a format blender can read.

greets

ceiphren.

btw. wasn't there a jme-asset-library-thing?

edit: oh, just read that you use 3ds and ps, too.^^

Cool, yeah, why not make them an asset pack? :) https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:asset_packs
@memonick said:
Thanks a lot for your input :)

PS Do you recommend using displacement apart from light maps?


It's not my field of expertise and we are at the edge of my knowledge so I'm not going to give you any potentially misleading answers, sorry :)

Hopefully someone else can answer.

You can still use lightmaps with day/light cycle. Just bake the ambient occlusion data and not direct lighting. In fact if parts of the mesh do not reuse UVs, you can just multiply the lightmap by the diffusemap and get the same result as having a separate lightmap.

Also 3DSMax supports lightmaps, especially since it is supposed to be better than Blender …

Here’s an example of ambient occlusion lightmap:

http://i.imgur.com/w2AUn.png



As for displacement maps, jME3 only supports normalmaps, and heightmaps with parallax. If you plan on using something like a stone texture on these houses, you can use parallax mapping to create a pseudo-3D effect. E.g. the rocks in this screenshot are actually done using a parallax map:





As for displacement maps, jME3 only supports normalmaps, and heightmaps with parallax. If you plan on using something like a stone texture on these houses, you can use parallax mapping to create a pseudo-3D effect.


That's what I'm going to do. Thanks :)

@Momoko_Fan said:
You can still use lightmaps with day/light cycle. Just bake the ambient occlusion data and not direct lighting. In fact if parts of the mesh do not reuse UVs, you can just multiply the lightmap by the diffusemap and get the same result as having a separate lightmap.


Didn't really understand this :/

Read up on ambient occlusion - it isn’t effected by the direction of the light.

@zarch said:
Read up on ambient occlusion - it isn't effected by the direction of the light.


That's not true. If you shine a light in a corner, the ambient occlusion should go away or nearly so.

That’s something I’d really like to use actually. I’d been looking for that for some time, yet I didn’t know the terminology, nor how to explain it - apart from clay rendering which didn’t help much.



However, I don’t see how AO can take the light-map’s ‘job’.

@pspeed said:
That's not true. If you shine a light in a corner, the ambient occlusion should go away or nearly so.


I will back track slightly. I think the problem I see with so many AO implementations is that they forget that AO maps should only apply to ambient light and not direct light. AO maps calculated from proper albedo can be relatively light direction independent... the issue is that you have to scale the AO affect down as the light more directly lights the surface. Then the surface is not lit by ambient light so AO has no effect... you cannot manufacture photons, after all.

Even though we think of AO as shadows, it's not. AO simulates a brighter ambient on surfaces due to the reflection of surrounding surfaces... it's just that the center of surfaces will receive more reflected light than the corners... so we do the reverse and shade the corners. In fact, the corners are the ones that are the true ambient. But directional light will always be stronger than AO... because it's where the ambient light came from in the first place.

...and I'm late-night rambling now. Bottom line, when directional light is stronger than some ambient threshold then there will be no AO on that surface... and up to that point it will fade.