City Generator Scripting

I know I deleted some materials when I tried to reduce file size . Try this one but this one has different bugs from lamps. Each UFO is supposed to flash it’s own spot light but if you watch carefully something is not working properly.

Attachments

City Generator L.blend (754 KB)

Use this one and count how many layers can you add before your computer slows down. Use only right clicks and no spacebar. I can add at least 10 maybe more.

It’s a bug in the rasterizer and materials because it’s wasting time on drawing lots and lots of objects that are not even visible to the camera.

Attachments

City Generator L.blend (754 KB)

The only problem with your idea is you cannot walk around on the ground in firstperson or can you.You cannot explore the buildings.
Procedural generation could be used to add enemies,health packs and weapons.The procedural generator should be automatic.It would be good if people could add their own stuff to the procedural scripts.

Of course you can walk around you just need to add a ray sensor to the player to detect where the ground or the floor happens to be after you generate or regenerate the scene or terrain.

Here is another version that has a new function on left mouse button. I know it’s a very slow progress but you guys need to modify the hell out of the script and post results here. The new beautiful function is called something like, after you press spacebar to generate terrain you can now rotate the tiles randomly using LMB. I know it’s not much but this is what we have so far from amateur scripts.

I want to see what you guys are able to modify in that script. Make it do something different and post results here.

Attachments

City Generator M.blend (738 KB)

This one shows collisions are working with terrain , not all the time , but at least sometimes when you launch a cube by pressing 1 key.

You have to enable collisions. It looks like I turned off collisions and forgot to turn them back on.

Problem is that , with so many objects in the scene, the physics need to be limited or deactivated and activated only on the tile where the player is or something like that.

Attachments

City Generator N.blend (744 KB)

Here is a modified version.Press t to shoot cube.

http://www.pasteall.org/blend/36361

BTW, this shader looks similar to the grass shader by someone(forgot name, was sth like Yarbrough)

Looks like red velvet the one that Lostscience made. With 16x AA it can look pretty good. No volumetric lighting/radiosity/particles nothing ?

I have to add some texture projection from a lamp to fake some shadows.

Did you try the blend i posted on post 26?

Yeah, this one , the red velvet one right ? Or it’s a material problem again maybe missing textures ?

I fixed the mouse look so the camera is not drifting anymore but I messed up the materials.

Attachments

City Generator N Mod.blend (547 KB)

Here is another one that one stop working for some reason.

http://www.pasteall.org/blend/36364

Here is the texture for the road i used.I made it in gimp.

http://www.pasteall.org/pic/88906

For terrain we need like a meta-balls style geometry shader to fuse and merge all the tiles in realtime so it’s not accumulating so many overlapping faces and z-fighting and junk.

We also need some mods/improvements on the script.

Well, you need to optimize framerate and make LODs for it, I’d really reccomend LODs

I can’t stand LOD switching when it’s visible to the player camera. The video card is responsible for that. Maybe some other way of doing it.We need way faster video cards. 100x minimum.

This file is not a city anymore. LOL

Some kind of junk yard or construction zone maybe.

Plus a few extra bugs.

Attachments

generate a city mod.blend (748 KB)generate a city mod3.blend (693 KB)

Does the ground go on forever when you go forwards?You think you would understand dynamic terrain loading if i gave you a blend of it?

You can make this one generate more terrain or layers in whatever direction you want just make a new function for that in script.

Here is the idea with the road segments. How do I make a function that aligns one segment to the next. Let’s say you spawn/generate a lot of random road segments scattered over the terrain and then you use another function that cycles through all of them and aligns them to form a road.

I have no clue about dynamic loading all I know is this thing needs to do everything in real-time. Real time baking of shadows, projection of textures and so on. No dynamic loading allowed nor LOD switching. All those things are illegal. LOL

Dynamic loading works with static scenes last time I checked same as in GTA V.

Anybody good with scripting ? We need one function to align and snap road segments to each other.

Attachments

City Generator Road Seg.blend (544 KB)

This one is doing something when you right click but the alignment of road segments is still wrong.

Attachments

Road Seg.blend (546 KB)

This one is even closer to what I need but still not doing it. The idea goes like this:

Each road segment has a few link points or spawners that are predefined or calculated, called them children or glue points and those children can spawn other road segments randomly from a list of available segments.

Sounds simple but still not scripting it properly.

Attachments

procedural road.blend (89 KB)

What do you mean by they are illegal?You dont want to do it.Is that what you mean.You could use the same terrain and teleport north when near south edge.Teleport south when near north edge.Teleport west when near east edge.Teleport east when near west edge.Then procederally generate everything else when you get near south,north,west and east edges.You could have doorway or valley that you go through on north,south,west and east edges.Which would procedurally generate everything else except the ground after you teleport.

That’s exactly what I said. Why would you want to add LOD or stream tons of terabytes of textures when all things in that scene are already at their lowest level of detail. Maybe LOD to increase detail close to the camera but not to lower it. You can generate from script which way to extend it but I think I found a few extra bugs.

Here is an example file. Script says it should count x in range(0,4) and add one tile each time. I end up with 8 tiles instead of 4.

Is this a bug or what ?

Attachments

Tile System 001.blend (91.7 KB)