New to BGE - Need starter help - Architectual Flythourgh

Hi all

I am asked to do a 3D floor plan for a gallery showing student work and I thought instead of only having print material also using Blender for it.

  1. Walking over steps and floors
    I would like my character to move forwards sidewards like a human. When I walk to steps he will walk them up or down. When I look up he still walks forward.

This also means I need a collision detection to the ground plane and stairs/walls geometry.

  1. Moving Camera Look
    I need to be able to rotate my view with my mouse.
    How do I do that with the logic system?
    I can move with my arrow keys but that is only move no camera look.

I was reading the Blender Architecture Book but it hardly covers any useful material in it besides making the camera move with the arrow key.

Claas

no one has a tip?

Hello
if you don’t find better, download this little demo and build your environment “around” it:
http://otothecleaner.free.fr/downloads/wildhouse.zip
Bye

You are my hero!

Well, thank you, but try to find better, maybe…it’s a quite old file

Well, moodest as i am, im also working on an architectual flythough, but it’s gothic architectur.
Dont know if its to any use, but i guess it could be inspiring somehow.
link

Haha, as soon as i saw you had the latest post, i just knew it would link to your Thread…its a thing you do alot :spin: :smiley:

Good times…

/Radman

I know i do that a lot, still, were both doing kinda the same thing here, eccept for the 500 years between the architecture.

Konoha do you have a lot of experience with the GE system?

OTO I remember you file some time ago - true it is old but it works.
I also found the old blender file for that architecture but I cannot open the blend file into edit mode - it only runs (auto start).

My expectations are not that high. I have 34 days left to model and design the architecture, texture, render the floor plans and than well see what else could be done in terms of an interactive experience.

Honestly first time for me that I even touch GE and do something on my own in there. so your demo file while simple/old does the job and is what I am looking for as well.

I recently made an architectural walkthrough of a garden.

I used the mouselook script from here. It took a little configuring since I think it was for a previous version of Blender. If you have trouble then I could put together a simple .blend with the correct logic setup if you’re interested.

I parented the camera to the top of a cylinder that was the “actor” and used forces on the “simple motion” actuator, triggered by keyboard input to move the cylinder around.

The horizontal control from the mouselook script affected the rotation of the cylinder so the motion from the keys stayed consistent from the camera viewpoint (rather than the camera being completely independent), and the vertical motion from the mouselook script affected only the camera.

Since the cylinder was affected by forces and physics it was less likely to accidentally move through walls, as can be a problem when using the simpler dLoc options on the motion actuator (that can potentially set a position on the far side of a wall and skip the collision detection). Another benefit of using forces is that the object will more smoothly move up stairs without a jerking action or simply getting stuck.

Did you have trouble getting the example to work? It wouldn’t take too long to set up a simple example if you need it. Though I am by no means accomplished with any aspect of 3d content and representation, I’ve been learning for about 2 years right now and I welcome any opportunity to learn myself, especially if my learning helps others out.

I’m enjoying the realtime architectural applications of Blender myself, and the recent improvements in the game engine mean that you can get more realistic GLSL effects and have larger scenes. Previously I had severe slowdown issues with scenes of more than 50,000 polygons, but my garden walkthrough had upwards of 200,000 polys and was very usable. I know that 200,000 is very high for a small garden, but the emphasis was on the many plants and I didn’t want to use alpha planes.

I started messing about in the middle of posting this and came up with a very simple setup for looking around and moving.

MouseLook.blend (156 KB)

Things to take into account that aren’t usually an issue with static images are:

The Dyn options for materials (near where you set the colour). These control bounce, friction etc.
The mass of objects and their general damping values, found in the logic panels.
The gravity setting in the world material buttons. (Shouldn’t need to change this, but might be fun)

Note that I set the collision shape to be a sphere rather than a box. This enables the object to travel up stairs due to the rounded nature of the base of the sphere.

The steps in the .blend are pretty steep (0.4 blender units so equivalent to 0.4 metres at the scale of 1BU = 1m), just me being lazy and wanting to get a bit of height into the scene. :wink:

Good luck with your project.

Edit: Oh yeah… keys are my preferred WASD instead of the arrow keys, seems more natural with the mouse in the right hand and those keys. You could get this information directly from the logic bricks, but I thought I’d mention it.

FunkyWorm

thank you so much for the genius help. When I was asked to help I of course
said yes and did not think about what I need to learn first … ah well that’s me.

The demo file you gave me works great. This project is based on volunteering
since this is for our students and I am trying to set this up to actually beat the
3D digital media department - kinda like some competition.

You said you made that garden scene.
To use the GLSL you only need to turn on the setting and that’s it?
I opened your test file and it all worked - but when I played with some older
demos it seemed not to work. The materials went lost.

Hahah this is too funny I just made the camera fly.

So I do not yet fully understand what the difference between Loc and Force is.
When I jump with Force the object gently also slides down - with Loc it is more harsh.

Do you know how you could set up interactions like clicking on a door and opening it
so you can walk through or clicking a button and let music play?

Since we have two DJs on that location I thought it might be nice to also have sound.
I have to figure out how I could set up lights so they could glow - I guess I have to
animate them with IPO curves.

Did you also use the old Radiosity engine? OTO’s example looks pretty good and I found
that old walkthrough demo and for such an application that system delivers decent results.
I am glad they still have it in Blender.

Oh and did you use normal baking? I never looked into it. The outside and inside of the house
has bricks and wooden floors and I thought when I texture that I could also create the normals
and with GLSL have a better look and feel.

Boy what did I put myself into …

I’ll just say that I’m not a pro (yet ;)), but I’ve learned a bit about Blender, 3d and a little of coding in the last couple of years. I’ll try to answer some of your questions…

To use the GLSL you only need to turn on the setting and that’s it?

Basically, yes. But GLSL materials require a bit more work to set up. You need the diffuse texture for the colours and a normal map to give it a nice 3d look as a basic material setup. It also adds realism to add a specular map so for example you can have a worn metal object that is tarnished and unreflective in places and worn to a shine in other places. It depends on the time you have and the level of realism you’re going for. For ultra realism you could add a parallax occlusion shader like here, but blender GLSL materials don’t currently support this and you’d need the script from the .blend posted on that page to use a shader like this. I find normal maps to be quick and easy to set up and sufficient for most tasks.

The gimp has a fully functional script for creating normal maps from images that I’ve used fairly succesfully. I find that greyscale images tend to give better results, but this might just be me. You can also bake normals from a high poly mesh to a lower poly one. There is an explanation of the workflow in the wiki, also this page.

You can find some good tutorials relating to materials in the information from the Apricot “Yo Frankie!” game project that relate to realtime representations. Baking ambient occlusion to diffuse textures, texture splatting etc. (Though you’re probably familiar with this from rendering 2d images)

To use GLSL materials in the game engine, all textures need to be UV mapped to the objects. This may be why your materials disappeared? Also, procedural textures will not work (I don’t think… they didn’t used to anyway). To use a procedural texture, I render it to a flat plane and save the rendered image to use as a texture.

So I do not yet fully understand what the difference between Loc and Force is.

Just like in the real world, force will gradually accelerate a dynamic or rigid body object. The settings for “damp” and friction will exert an opposing force that will gently slow the dynamic object to rest. The movement of the object is calculated effectively constantly. When using force, the location of the object between frames is extrapolated based on it’s velocity and so can register collisions betwen frames.

Loc simply changes the location of the object and so moves the object in discrete jumps of the same size (resulting in instant acceleration and deceleration). The illusion of constant motion is created by making a jump every frame. This discrete nature as opposed to constant motion leads to issues with collision detection because the object may make one of the jumps straight through a wall or other object.

For ultra-fine control you could consider using the servo motion actuator, but this seems overkill for most applications. Wikipedia explains it well here. (Almost too well, but it made interesting reading for me ;))

interactions like clicking on a door and opening it so you can walk through

In your previously defined setup, the mouse was used for turning the camera so an on-screen pointer wouldn’t work, but you could set up an action for the door object with a 1 bone armature that rotates the door around the hinges through 90 degrees. This action could be triggered by having a near sensor on the door connected to the action actuator by an “and” controller. This would open the door when you’re within a certain distance of it.

In order to preserve usability it might be best to avoid having the user click the mouse to open the door, but this could be achieved by adding a mouse sensor to the “and” controller that recognises a left click (for example), therefore opening the door only if the user is within range and the mouse is clicked.

Since we have two DJs on that location I thought it might be nice to also have sound.

I’ve not messed with sound much, but I’ve read that Blender’s game engine has poor sound support :(. Most people considering including sound in their games seem to recommend PyGame, a Python API that supports more advanced features like playing sound files from hard disk, analog controller support and other stuff. If you can integrate this, it might take the walkthrough to another level, but may take some effort.

[edit]
As far as I know, the game engine only supports .wav files, which are ok for short samples that are reused frequently, but have huge file sizes for anything like music.
[/edit]

Did you also use the old Radiosity engine?

I’ve never used radiosity in the game engine, and didn’t think it was possible. I’ll have to check this out.

Maybe it’s possible to bake the radiosity into the diffuse texture? Since only the camera (and maybe doors) will be moving, this might be a good option in terms of processor overhead and frame rate anyway.

Hmmm… this post just kind of kept growing. I hope it’s pretty accurate and fairly easy to understand.

Good luck.