Mars Rover

Community Forums/Showcase/Mars Rover

Krischan(Posted 2015) [#1]
This is a small demo of a rover on Mars I made just for fun. It demonstrates the use of Improved and Ridged Perlin Noise to create a realistic looking meshterrain on the fly, infinite rock placement, gravity, a minimap, player to terrain alignment and a chase cam. Nothing special, I just enjoyed driving around. It is not perfect but I'm happy with it. The Mars Exploration Rover Model ist from 3dlenta.com.

Oh, and the blue dot keeps a secret / surprise on the map.

Download (First Version) Demo+Source+Media: MarsRoverDemo.zip [3.5MB]

Download (Current Version) Demo+Source+Media: MarsRoverUpdate3.zip [3.5MB]

Inputs:
WASD+Arrows = Moving
Q/E or LMB/RMB = Zoom
ENTER = new Landscape
SPACE = Wireframe



And the full source in vanilla Blitz3D:



Krischan(Posted 2015) [#2]
And a quick update: for more realism, the rover leaves marks now - best seen on darker ground. Up to 2500 surface-aligned sprites are used to keep track of the rovers trail - a nice demonstration of types. If there are more than 2500, the first tracks are deleted and there are always 2500 track sprites to keep the FPS low.

Just overwrite the existing files with this ZIP archiv:
MarsRoverUpdate1.zip [1.0MB]




Yue(Posted 2015) [#3]
Power Full. :)

Any suggestions for leaving footprints in the sand tire?




Krischan(Posted 2015) [#4]
I do not understand the question? My update already shows a concept how to "leave footprints" even if they are not 100% correct. I've experimented with exact footprints like in your screenshot but the maths were too complex for me so I kept the current solution.

Oh and I've updated the update as I forgot to delete the tracks when you create a new map ;-)


Krischan(Posted 2015) [#5]
Another update: now the collision check is only done against the NEAREST rock close to the player's position. A second bright green dummy rock twin is placed and rotated at the same position like the "real" rock and should be made invisible, here only scaled twice as large and visible to show the effect:



And the updated code:


Here is a small demo to show the effect and a second algorithm which is not so fast like the one I've used before:




Rick Nasher(Posted 2015) [#6]
Hmmm, looking pretty interesting but not bug free yet I guess: it didn't work on the largest rocks I came across up the mountain. It runs right through it.


Krischan(Posted 2015) [#7]
That's because of the small collision range of the rover, again it's just a simple example how to do it: KISS keep it silly simple. I'd suggest to increase the collision rock size and the collision box of the rover (which is currently a sphere only). Feel free to fine-tune it.


Rick Nasher(Posted 2015) [#8]
Ah, that explains it. Well the how to do it bit certainly succeeded. Will check it out.


Yue(Posted 2015) [#9]
Hi, There A Possibility of Putting a distance no Models rocks , If no Lod sprites ?




Rick Nasher(Posted 2015) [#10]
Very good idea. If rockdestance<threshold then position sprite at location of prev rock, but instead of sprites probably better to use quad billboards, which holds a masked image(instead of using alpha to avoid the z-order issue). Can't remember exactly why but I remember this to be a re-occurring advice: use quads instead of sprites.

Also, depending on possibilities of the code currently used, I would add a rock map, to determine where rocks should be positioned and where not. I once did a grass map routine which was fairly easy to implement.

Some lines of the grass map routine, to give you a bit of an idea.


Now I don't know how easy it is to implement, as you are using blitz tiles which is quite a bit of code.


RemiD(Posted 2015) [#11]
An alternative is to do 2 renders :
one render each mainloop for the nearest entities
one render each xms to render the far away entities and put the resulting textures on a kind of "skybox", what i call a "farawaythingsbox" (only for sides : at front, at back, at left, at right), the difficult thing is to manage to make each texture tile with the others which share an edge...


Rick Nasher(Posted 2015) [#12]
@RemiD: Wouldn't 2 renders eat up just as much time as a full single render pass then, or more even? Nevertheless interesting idea. Do you have any examples to of different methods to compare speed wise?


Guy Fawkes(Posted 2015) [#13]
Missing: "Textures/Track.tga"


RemiD(Posted 2015) [#14]
@Rick>>reread my explanation and notice the "one render each mainloop" "one render each xms", the far away entities would be rendered only xms or only when the camera/player changes too much orientation/position


Rick Nasher(Posted 2015) [#15]
Ah get it now.