News:

SimuTranslator
Make Simutrans speak your language.

r5773 Double Heights

Started by kierongreen, June 13, 2012, 01:13:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

greenling

Thats it a cool idea what here be make!
Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

kierongreen

Any more than 2 different heights will require a different system for rendering terrain as the possible number of tiles becomes very large... 1 height gradient needs 15, 2 needs 80, 3 would need 255, 4 would need 624. The only practical way to go for that is a full 3d renderer.

Fabio

Is this a problem of climates (thus solvable with stricter rules as suggested), or light maps? 255 is a big number, but it shouldn't impact too much on memory usage.

kierongreen

Lightmaps. Drawing 255 lightmaps is quite a task! Of course there would also be an increase in textured tiles required. Overall I don't think it's worthwhile myself.

prissi

About very steep slopes: With double slopes, artifical slopes in the worst case are not possible on all tiles, since between top and bottom more than 2 level of height difference may be needed. Not sure, how to deal with this; maybe this is just a further challenge of it.

And as kieron said. Probably then just rendiring the ground is better, if you go to freeform slopes. And not only ground: all ways are affected too.

Fabio

About restricted artificial slopes: I don't see it as a problem, possibly as a feature. After all you can't just build any containment wall in real life.

kierongreen

This patch handles artificial slopes with up to 4 height difference by combining different images.

prissi

Sorry, I really have to delve deeper into the code then.

Spartanis

Regarding more slopes than HH and FH. Sure. be nice to have realistic "cliffs" but i agree, it is utterly pointless and time consuming.

Best way to acheive the Realistic Mountain look with sheer drop cliff.. is create a pak out of it. As my Pakset(in the works) is currently implementing this idea.

I made it as a CUR building, but instead of randomizing curiosity, I just build it at various places. For example. Cur_1_CliffFace would have 4 views of a str8 cliff face two tiles high. Cur_1_CliffCnr would have corner cliffs. Using this idea would allow you to build a natural realistic landscape, save the map for anyone to play with. (so long they have the appropriate pakset)

Of course, Building the SAVE.MAP may be time consuming, but least you got a nice landscape to play with!

Spartanis

#44
Quote from: kierongreen on July 04, 2012, 02:11:29 PM
All corners 1 higher than image number 0 (so you can use the same lightmap just shifted up a few pixels)

Oh, ok.. correct me if Im wrong. That line with "TODO" uses the same lightmap image, rather than us creating another flat but 1 point higher than normal?




EDIT:-


Oh hang on, you mean saying so, notifying others to USE the SAME image as used before...


eg: TODO 0 up 1 = Use the same image used in image[0]



EDITx2:=

AHHHH.. I get it now.. I had to "clean up" your dat file and saw that you used  0.14 (flat ground) as a temp image instead of a proper image (of which you havent created yet)


I shoulda seen that coming.. surely.. lol so sorry mate..  :)


EDITx3:=


Ok.. completed the TIKI WIKI page regarding Lightmapping.. *phew*.. lotta work, but i learnt alot about it tho.. should be EASY to create a Blend file now :)


Anyone is welcome to add/modify the page, so long it kept to that. The idea is to keep it simple but easy to understand....(hopefully)

kierongreen

The images with TODO actually aren't used in game :) - hence why they remained as TODO!

Spartanis

ohhh.. ok ok.. but still.. i create the appropiate image anyways..  so that i dont need to recreate the set again when ya actually done them. I'm nearly done with the pak64 lightmap (smooth slope, not triangulated).. its been fun i must say! :)

Spartanis

Kierogreen

If you be so kindly, check the wiki page if the data is correct? 

If you dont have time, thats ok :)

Sparty

Spartanis

Reason being:





Following the order of the MENU tiles... this is the result. I think i might have mis-read your dat file somewhere    O.o


While everything else, the landscape that is, is perfect, no slope errors there....

kierongreen

What slope numbers did you use for menu tile? You will need following entries in menuconf.tab for slopes:

# slope tools
toolbar[1][0]=general_tool[2]
toolbar[1][1]=general_tool[3]
toolbar[1][2]=general_tool[4],10,,36 #southslope
toolbar[1][3]=general_tool[4],11,,4 #northslope
toolbar[1][4]=general_tool[4],12,,12 #westslope
toolbar[1][5]=general_tool[4],13,,28 #eastslope
toolbar[1][6]=general_tool[4],14,,82 #all up slope
toolbar[1][7]=general_tool[4],15,,83 #all down slope
toolbar[1][8]=general_tool[5]

These are for half slope varients, for both types of slope you will need something like:
# slope tools
toolbar[1][0]=general_tool[2]
toolbar[1][1]=general_tool[3]
toolbar[1][2]=general_tool[4],10,,36 #southslope
toolbar[1][3]=general_tool[4],11,,4 #northslope
toolbar[1][4]=general_tool[4],12,,12 #westslope
toolbar[1][5]=general_tool[4],13,,28 #eastslope
toolbar[1][6]=general_tool[4],10,,72 #southslope*2
toolbar[1][7]=general_tool[4],11,,8 #northslope*2
toolbar[1][8]=general_tool[4],12,,24 #westslope*2
toolbar[1][9]=general_tool[4],13,,56 #eastslope*2
toolbar[1][10]=general_tool[4],14,,82 #all up slope
toolbar[1][11]=general_tool[4],15,,83 #all down slope
toolbar[1][12]=general_tool[5]

(but you will probable want to draw new icons also)

AP

Just wanted to post to say how awesome it is that we're able to incorporate this feature. Good job!!

Spartanis

ahh.. one need to update menuconfig as well!.. my god! lol.. *toodles off to have more fun* :)

jamespetts

I have to say, this looks very promising, and should substantially enhance the Simutrans experience.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.