yvanvds
Member
|
environmental mapping to image
Hi.
I have written this after a short discussion about how to change environmental settings for different zones in your game world. Remarks and all are very welcome.
This code will allow you to use a basic image of your game world wherein you give all your gamezones a different colour.
Together with a config file for each zone (examples are provided) you can change some settings according to the player's position in the world.
Immediate as well as gradient changes are supported, and the example still takes into account lighting adjusted to the time of day. (Provided are horizonColor, skyColor, ambientColor, fog density and toggle fog on sky.)
It's not fool proof and you'll have to change the code to what you want, but this should give a good example to start with.
Cheers,
yvan
environment.7z (Size: 5.3 KB / Downloads: 84)
|
|
12-02-2011 09:44 PM |
|
Khanser
Member
|
RE: environmental mapping to image
Thanks! This will be useful
|
|
12-07-2011 10:16 AM |
|
yvanvds
Member
|
RE: environmental mapping to image
I hope so! I have made some little changes already, so if something looks wrong just ask me.
And I don't know where my head was when i suggested to rotate the image: you should mirror it on the x-axis instead.
|
|
12-08-2011 09:21 PM |
|
Barthap
Member
|
RE: environmental mapping to image
Thanks Yvan! Your system works great! Currently I'm using only one zone, because my world is unfinished. But the Day/Night system is beautiful, I changed values of horizon and sky color (i had them set good in my old system, but there Lerp function didn't work). Good job!
P.S. How to check world size? Need it in index.txt.
I have big world and minimap images are splitting, hate this
|
|
02-07-2012 12:55 PM |
|
yvanvds
Member
|
RE: environmental mapping to image
The easiest why to my knowledge to check the world size is just show the cursor position information in the world editor and move to the corners to see the lowest and highest values.
Yes, my minimap images were splitting too. I ended up with 12 images and put them together in the gimp. You can play a bit with the number of images you want, but of course the resolution must be good enough to see the actual world or you wont be able to paint the zones very accurately.
|
|
02-08-2012 01:32 PM |
|