MX Bikes Official Forum

General Category => General Discussion => Topic started by: 𝖙𝖋𝖈 on January 28, 2016, 12:09:47 PM

Title: Menu Environment
Post by: 𝖙𝖋𝖈 on January 28, 2016, 12:09:47 PM
PiBoSo, is it possible to change the menu environment? By this I mean currently it's black with a lit area under the bike / rider. Is it possible to replace this with another environment like scenery.edf does for a track or background.edf does?
Title: Re: Menu Environment
Post by: PiBoSo on January 28, 2016, 01:12:17 PM
Quote from: TheFatController on January 28, 2016, 12:09:47 PM
PiBoSo, is it possible to change the menu environment? By this I mean currently it's black with a lit area under the bike / rider. Is it possible to replace this with another environment like scenery.edf does for a track or background.edf does?

The menu background file is "misc/bg/bg.map".
It must be exported as a MAP with "TRK" for the ground name to allow shadows projection.
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on January 28, 2016, 01:41:53 PM
Thanks I'll have a play!
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on January 28, 2016, 02:53:51 PM
Hmm.. When I export as map I get a crash in FBX2EDF after 'smoothing normals'..

When I export as mesh it exports just fine.

Maybe there's something I'm missing with exporting map?
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on January 28, 2016, 03:44:13 PM
I may be missing something obvious lol.. forget my reply there I'm still playing!
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on January 28, 2016, 05:08:15 PM
OK I have it working, but the only way I could do that was by creating a track with a 0 x 0 x 0 heightmap and using the exported edf as track scenery, then renaming track.map to be bg.map.

This works great, but it doesn't seem to allow me to change the lighting which was going to be a big part of it. Any clues?

Thanks!
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on January 28, 2016, 07:19:11 PM
So it seems that changing the Params.ini works for the ambient and object lighting but it doesn't affect the bike and rider. Is there a way of changing this?
Title: Re: Menu Environment
Post by: tseklias on January 28, 2016, 11:44:30 PM
Taking a look here may bring you ideas. http://forum.piboso.com/index.php?topic=1555.0
It's really a very nice try from a gpbikes' forum member.
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on January 29, 2016, 12:03:15 AM
Oh no doubt! Thanks for the link. I managed to get it working and made a quick environment to test how it would look and work with normal maps and it looks great.

My biggest problem is being able to configure the light angle. I've tried params.ini, track.amb, and adding a bg.amb and nothing seems to work. Currently I've removed the TRK prefix from the floor so the bike and rider casts no shadows, but it would be nice to get a '12 o'clock' look to it, as if lit from above.

(http://i66.tinypic.com/mjsaqb.jpg)

(http://i68.tinypic.com/2qsap14.jpg)
Title: Re: Menu Environment
Post by: PiBoSo on January 29, 2016, 12:17:47 AM
Quote from: TheFatController on January 28, 2016, 07:19:11 PM
So it seems that changing the Params.ini works for the ambient and object lighting but it doesn't affect the bike and rider. Is there a way of changing this?

The lighting is hardcoded.
It might be a good idea to allow editing.
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on January 29, 2016, 10:20:29 AM
Would be great but good to know. Definitely not a game changer! Thanks pib
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on January 29, 2016, 12:31:43 PM
Just out of interest, what is the default light position that is hard coded?
Title: Re: Menu Environment
Post by: PiBoSo on January 29, 2016, 01:03:22 PM
Quote from: TheFatController on January 29, 2016, 12:31:43 PM
Just out of interest, what is the default light position that is hard coded?

The values are "-0.6,1,-0.4", that mean the light is coming from the left front.
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on January 29, 2016, 01:20:32 PM
Thanks :)
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on January 30, 2016, 06:08:48 PM
Weird one.. I discovered that if you give the wall object the DECAL prefix, and any other objects that have too much shadow it totally excludes them from having ANY shadow even realtime (or whatever shadow is applied after compiling). The only downside is that then you have no shadows, but a few quick adjustments to textures and it's not too noticeable!  8)

PiBoSo: The only problem I'm having now is when you add a normal texture to an object (even one that's not under the DECAL group) it crashes the menu.. Any idea why? I've had normals working in the bg.map as you can see in the above previous screenshots.. Not a big deal mind you..
Title: Re: Menu Environment
Post by: PiBoSo on January 30, 2016, 09:06:51 PM
Quote from: TheFatController on January 30, 2016, 06:08:48 PM
Weird one.. I discovered that if you give the wall object the DECAL prefix, and any other objects that have too much shadow it totally excludes them from having ANY shadow even realtime (or whatever shadow is applied after compiling). The only downside is that then you have no shadows, but a few quick adjustments to textures and it's not too noticeable!  8)

PiBoSo: The only problem I'm having now is when you add a normal texture to an object (even one that's not under the DECAL group) it crashes the menu.. Any idea why? I've had normals working in the bg.map as you can see in the above previous screenshots.. Not a big deal mind you..

The "DECAL_" prefix should force shadows even on objects that are not collidable.
Do you mean that you cannot assign a normal map?
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on January 30, 2016, 09:30:40 PM
Strange.. As you can see from the screenshots none of the walls (or toolbox on wheels / boxes) have any shadows even the ones that you can't remove. They all use the DECAL prefix.

The problem I'm having is as soon as I add a normal map with a .shd I now get a crash when entering the menu. A few of the specific points:

1. I'm not using a normal map on any textures on objects using the 'DECAL' prefix.
2. I've added normals fine before as you can see from my previous screenshots. Using a normal with spec, the right size and using a SHD text file.
3. It loads fine in Mapview.

This really isn't a major thing, probably me doing something wrong but it's driving me nutts. But in case it is a 'thing' it's worth me pointing it out :)
Title: Re: Menu Environment
Post by: PiBoSo on January 30, 2016, 09:51:22 PM
Quote from: TheFatController on January 30, 2016, 09:30:40 PM
Strange.. As you can see from the screenshots none of the walls (or toolbox on wheels / boxes) have any shadows even the ones that you can't remove. They all use the DECAL prefix.

The problem I'm having is as soon as I add a normal map with a .shd I now get a crash when entering the menu. A few of the specific points:

1. I'm not using a normal map on any textures on objects using the 'DECAL' prefix.
2. I've added normals fine before as you can see from my previous screenshots. Using a normal with spec, the right size and using a SHD text file.
3. It loads fine in Mapview.

This really isn't a major thing, probably me doing something wrong but it's driving me nutts. But in case it is a 'thing' it's worth me pointing it out :)

Objects with the "DECAL_" prefix receive shadows, but don't cast them.
The normal map problem is difficult to debug without the possibility to test the model.
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on February 02, 2016, 12:40:23 PM
Quote from: PiBoSo on January 30, 2016, 09:51:22 PM
Objects with the "DECAL_" prefix receive shadows, but don't cast them.
The normal map problem is difficult to debug without the possibility to test the model.

Just a little update, I've managed to get normal maps working, not sure if it was something to do with my local environment as it seems like a bit of a lottery whether I can get into game or not using a custom bg.map. Using the same bg.map one day it will load fine the next day it will give me crashes and I have to remove it - Try again later and it works just fine.

I've messed with my launch settings for MXB making sure it always uses 'High Performance NVidia Graphics Processor' and it seems to always work currently. Again, not sure why as before I was right clicking and choosing that option anyway to launch. Oh well!!  :D
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on April 14, 2016, 04:07:24 PM
PiBoSo:

I saw that in the changelog the ability to alter the lighting has been implemented, but how is it done? I added an .amb file to the misc folder but all it did was make the environment pitch black (very dark, could still make out the rider and bike just!)

Thanks!
Title: Re: Menu Environment
Post by: PiBoSo on April 14, 2016, 07:11:11 PM
Quote from: TheFatController on April 14, 2016, 04:07:24 PM
PiBoSo:

I saw that in the changelog the ability to alter the lighting has been implemented, but how is it done? I added an .amb file to the misc folder but all it did was make the environment pitch black (very dark, could still make out the rider and bike just!)

Thanks!

The file bg.amb must be created in the misc/bg/ folder.

light
{
direction
{
x = -0.6
y = 1
z = -0.4
}
color
{
red = 1
green = 1
blue = 1
}
}
ambient
{
red = 0.5
green = 0.5
blue = 0.5
}

These are the default values.
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on April 14, 2016, 07:27:47 PM
Thanks! I'd tried other things instead of clearsky like 'menu' but didn't think of just light..
Title: Re: Menu Environment
Post by: wattdigger on April 14, 2016, 09:24:29 PM
This game is already on another level... :o
Title: Re: Menu Environment
Post by: CSchmied986 on April 15, 2016, 02:17:37 AM
Hope you upload some of those when you get'em figured out FAT!  ;)
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on April 18, 2016, 09:33:19 PM
Will do :)

PiBoSo: Me and Damien noticed that when you view the bike on the practice track, the handlebars are turned to one side. How is this done? Can it be done in the menu? Can it be done on any track?
Title: Re: Menu Environment
Post by: PiBoSo on April 18, 2016, 11:33:03 PM
Quote from: TheFatController on April 18, 2016, 09:33:19 PM
PiBoSo: Me and Damien noticed that when you view the bike on the practice track, the handlebars are turned to one side. How is this done? Can it be done in the menu? Can it be done on any track?

The steer can be set in the "photo" section of the track INI file: -1 = right, 1 = left.
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on April 18, 2016, 11:52:49 PM
Wonderful thanks..  ;D

The example track doesn't come with a photo section in it's track.ini.. What other commands can be used?
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on April 19, 2016, 12:35:50 AM
Nope, sorry, can't get it to work ???

Can you paste the code?
Title: Re: Menu Environment
Post by: PiBoSo on April 19, 2016, 01:11:40 AM
Quote from: TheFatController on April 19, 2016, 12:35:50 AM
Nope, sorry, can't get it to work ???

Can you paste the code?

You could copy from the practice track, that has the photo section  ;)

[photo]
long = 74
lat = 42
angle = 90
steer = -1
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on April 20, 2016, 12:01:25 PM
Thank you :)
Title: Re: Menu Environment
Post by: LaxkinOD on October 26, 2021, 10:29:26 PM
Quote from: 𝖙𝖋𝖈 on January 30, 2016, 06:08:48 PMWeird one.. I discovered that if you give the wall object the DECAL prefix, and any other objects that have too much shadow it totally excludes them from having ANY shadow even realtime (or whatever shadow is applied after compiling). The only downside is that then you have no shadows, but a few quick adjustments to textures and it's not too noticeable!  8)

PiBoSo: The only problem I'm having now is when you add a normal texture to an object (even one that's not under the DECAL group) it crashes the menu.. Any idea why? I've had normals working in the bg.map as you can see in the above previous screenshots.. Not a big deal mind you..
can u give me this background???
Title: Re: Menu Environment
Post by: fridgedollar on October 27, 2021, 09:30:05 AM
Quote from: LaxkinOD on October 26, 2021, 10:29:26 PMcan u give me this background???

lol, this post is almost 6 years old
Title: Re: Menu Environment
Post by: 𝖙𝖋𝖈 on October 27, 2021, 01:51:38 PM
No.

1. I never uploaded it for anyone
2. It looks terrible
3. I don't have it anymore

And yeah, this is resurrecting the dead man!