• Welcome to MX Bikes Official Forum. Please login or sign up.
 
March 28, 2024, 08:44:16 PM

News:

MX Bikes beta18j available! :)


Surface detail

Started by 𝖙𝖋𝖈, January 22, 2017, 10:26:05 AM

Previous topic - Next topic

𝖙𝖋𝖈

First of all, please move this to 'Bug Reports' if it needs to be. You can only have 10 layers in both the HMF and THT, and while I don't know if this is supposed to be the case or not, if it is, please allow for more or please consider the following:

I was thinking hard about how to do surface detail, and ended up figuring out a new concept for detailing track surfaces. First of all, I'm not really one for the idea of making tracks look incredibly rutted where they are actually smooth, but I would like to add what I'd call surface detail to make a track look 'ridden'.

My new concept is this:



Right now this is an experiment. The textures are probably not the best although not bad, and there is no normal mapping currently.

I'm not going to get into how I've done this just yet, will save that for a tutorial for when I have it perfected and am actually able to see it completed. But I will say that when you know how to do it, it shouldn't take any longer than an hour or two.

I would like to ask firstly, is there any chance of upping the material layers available for use in the HMF and THT files? Right now I'm trying to use 13 layers, but bigger tracks might require more.

Next, I'm wondering if you have any plans for adding this kind of detail overlay to a track?

My initial thought was perhaps you could add a method of adding 1 layer that is made up of say 4, 6 or 8 tiles, each tile being numbered 1.tga, 2.tga, 3.tga etc to make up a whole mask. Allowing each tile to be 2048 makes for some pretty big textures with genuine detail that can be normal mapped, and surely no more demanding than tiling a 2048 texture 100 times across the entire track.

I know you guys have talked about a 'track editor' at some point in the future, but if that never comes to light or is years off, maybe this will help people get the most of out track creation in the meantime.

So, what do you think?

Thanks  ;)


𝖙𝖋𝖈

Of course what would also be awesome, would be a texture that follows a path, conforming to curves. This could work similarly to the centerline, if you could create a centerline in tracked, export it as a 'texture path' to your maps folder, reference it in a texture layer to use one texture repeated conforming along the path, and masks could still control the texture bounds. This way we could use multiple on track textures for different sections referencing the same path.

Just thoughts and ideas on how to get the most from the system, if at all possible.

Asdrael

Just fyi: I don't think there is a hard limit on the number of layers. Sometimes it stops at seven, sometimes it works with twelve. No idea why.
Your pictures looks great though!
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

𝖙𝖋𝖈

Thanks.. Not sure what's going on with the layers but now you've mentioned it I do remember this from when we did the js7.. Maybe it's a certain amount of memory available.

Well I guess pib has seen this and either doesn't like the ideas so won't comment or is thinking about it, so in the meantime what does everyone else think?

Is this something anyone else would like to see?

I'm building a little sx track to test, as the heightmap is much smaller than red bud I can squeeze in a lot of detail on just 4 x 2k tiles. It will be like having an 8192 texture map.

Vortex_Damien

Idea sounds amazing, and i am very curious on how you went about doing it

BadStar

Texturing is Harder than expected for me... newb

Looks amazing...not sure how u did it before your new ideas lol

Would love a Texturing tutorial for advanced texturing ... seriouslt, I have no idea how u make the texture/ruts flow
Most Active In-Game        PM me and I may be able to race!
Mon-Fri
East Coast: 4p-10p 
Forum Time: 9pm-3am (-5)
Sat/Sun Anytime

BadStar

I wonder if the layer count (possible memory) is the same issue I am having with trees....  I got to a point and now when I add trees is selectively removes other ones.. hmmm
Most Active In-Game        PM me and I may be able to race!
Mon-Fri
East Coast: 4p-10p 
Forum Time: 9pm-3am (-5)
Sat/Sun Anytime

𝖙𝖋𝖈

Damo, I will put a tutorial together, just want to at least release one track with it first, to make sure it's viable. If it's not then it's over to pib on whether either of the other solutions I've requested are possible or if he will fix the layers / memory bug preventing us from doing it the way I have.

BadStar, good ruts are really dependant on 4k textures, which is why my new method should work well as it would break that 4k mask into say 4 x smaller 1k masks, or even 4 x 2k masks giving you essentially one 8192 mask.

Since right now 4k texture tracks seem to cause problems (with the exception of Paleta v2 for some reason) I've stopped doing ruts. If we get the ability to use these masks in the future I'll consider doing a tutorial :)

Snappe

Quote from: TFC on January 22, 2017, 10:26:05 AM
I would like to add what I'd call surface detail to make a track look 'ridden'.
You have certainly achieved a good result so far, but....

Quote from: TFC on January 22, 2017, 10:26:05 AM
Right now I'm trying to use 13 layers, but bigger tracks might require more.
That is far too many layers.  :o
While there technically should be no limits to the number of layers, memory probably becomes a factor when you start to add that many.

Quote from: TFC on January 22, 2017, 10:26:05 AM
Next, I'm wondering if you have any plans for adding this kind of detail overlay to a track?
We have a plan, yes. If it works, it would involve hardly any extra work for the track maker. But it's not going to be implemented any time soon I'm afraid (it's obviously lower priority than physics & netcode).

𝖙𝖋𝖈

Thanks, and that sounds great. You know I'm all for fixing core problems before anything else, when I ask things like this it's always referring to a time when you guys are free to pretty up ;)

I guess doing it the way I have will work great for supercross! Will leave it at that for now ;D

Asdrael

Quote from: Snappe on January 25, 2017, 03:02:29 PMThat is far too many layers.  :o
When you think about it, it's not that many when you factor in deformation (adding a layer below with a darker shade). (Track + offtrack + "track marks" + grass) x 2 and you are already at 8. Granted you can recycle a bit, but hitting 10 is fairly easy - JS7 is far from fancy in terms of layers, we are at 9 already iirc.
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

BadStar

Yea and newbs like me who are unskilled in texturing tend to use more layers than needed.

Texturing tutorial please peeps!

Not for first timers and none of your secretes need to be revealed..just a mid/high level of texturing track basics.

How do u make a texture follow a curve? Ahhhh. (Talking about a texture that is directional, not fully tileable..similar to your lines in the above pic)
Most Active In-Game        PM me and I may be able to race!
Mon-Fri
East Coast: 4p-10p 
Forum Time: 9pm-3am (-5)
Sat/Sun Anytime

GDUBMX

Quote from: BadStar on January 25, 2017, 08:15:03 PM
Yea and newbs like me who are unskilled in texturing tend to use more layers than needed.

Texturing tutorial please peeps!

Not for first timers and none of your secretes need to be revealed..just a mid/high level of texturing track basics.

How do u make a texture follow a curve? Ahhhh. (Talking about a texture that is directional, not fully tileable..similar to your lines in the above pic)

+1
<br />GDUBMX YouTube<br />

pacopastor34

You can time 3 layers, bright, darker and much darker and do some opacity maps to show the layer you want where you want. Geo had explained so good in their tutorials.

𝖙𝖋𝖈

Paco asked me on Steam how to do this and while I was replying I figured I'd post it here for all. I will do a proper tutorial later with images, but for now this is how it's done.

Right now I'd recommend using this on small tracks, as for larger where you might need 8 masks, you might run out of memory using too many layers resulting in map.bat crashing.

1, I import a plane the same scale as my track (i.e 380 x 380m or w/e) and use a black and white track mask as the texture.

2, I create a bezier curve path in blender following the track.

3, I make a seamless rut path texture 2k or 4k or w/e.

4. I import my rut texture on to a tile the width of my track and repeat it along the curve using the array modifier. I make sure the width of the 'rut path' is slightly wider than the mask texture.

5, I set up a camera to fit the entire track in from above and render an 8k image of the path and rut texture (hiding the track mask plane)

6, I break it up into 4 or 8 sections. You can make this as many as you want, but each one will be it's own mask layer in the HMF so for SX 4 should be enough, that will be 4 x 2048 size masks.

7, I save all 4 images as rut_1.tga, rut_2.tga etc.. or w/each

8, I then split the track mask texture into 4 pieces as a layered image, each piece on it's own layer, and I hide all but 1, export it as mask_1.tga, then hide all but 2, export as mask_2.tga etc.. or w/e.

9, in the HMF and THT, you will need to add a layer for all 4 rut masks. Each one will need to reference like: mask_1.tga, using rut_1.tga texutre repeated TWICE, as PiBoSo counts reptetion horizontally not diagonally.

That's about it.. You can make a normal map from your resulting rut_1.tga, rut_2.tga etc..

Hope that helps somebody. All I ask is that if you can't make it look good, don't do it!