Game Development Community

Sahara Discussion Thread

by Konrad Kiss · in Torque 3D Professional · 08/16/2010 (9:06 pm) · 165 replies

Sahara is a tech extension to Torque 3D 1.1 Beta 1, 2 and 3 engines (1.1 Final soon to follow) which lets you create more realistic game environments by generating naturally accumulated dirt, snow, dust or any other material over your game shapes. It is a successor to our Cliff Construction Kit. This thread is our official discussion thread.

Sahara is now available for purchase here.




View in HD on YouTube

#141
04/26/2011 (6:32 am)
Ground cover - a little grass should do the trick and it applies itself.
#142
04/26/2011 (6:44 am)
groundcover wont go onto the object's accumulation material, it will only go on the terrains material.
#143
04/26/2011 (9:19 am)
Well, yeah - I was just thinking it'd still hide the edge since it should go right up to the object. Tall wavy grass to obstruct the camera view.... But I guess from the object side (assuming you can walk on that) it'd look weird. Um, will Forest objects sit on other objects? Haven't tried that myself....

Oooh - wonder if we could modify the ground cover by burning up one of our precious mask types so that we could make the object a CliffObject and then allow ground cover to apply to it utilizing the accumulation map..... (managed to pick a touchy subject there - hah!)
#144
04/26/2011 (9:40 am)
Actually, Sahara does not change the object type of the object it is used on like the CCK used to. If you use a TSStatic it will remain a TSStatic.

If we still had the shape replicator, that would work and it would be able to replicate onto TSStatics. But it's been deprecated, unfortunately, and there's no real alternative. IIRC Forest can use per item z offsets, so it could be possible to hack it, but out of the box it only checks terrain height, much like groundcover. It's been some time since I looked at that code, so I might be wrong.

It's possible to tune the terrain and the cliff textures to be very close to one another and look as if they were one, especially since you can scale the Sahara overlay texture, but it will never be perfect. As far as I can tell, everyone has this issue. I saw it in Crysis 2. It needs to be cheated, and there's no real easy way to go around it.
#145
04/26/2011 (4:28 pm)
The fun way? Make the whole terrain a TSStatic! Just kidding! Don't shoot....

Hey, wouldn't the ground cover just stand up through the object anyway? That might be enough to take attention off of the transition - or not, I still haven't played with it myself. I've been helping my sister with some electrical work and hardly have time for more than pestering you guys.
#146
04/26/2011 (5:32 pm)
Isn't there a flag on groundcover to allow it to sit on top of TsStatics which are over the terrain type?

Or have I gone nuts ... again ... it gets hard to tell sometimes ... :P

Quote:
I've been helping my sister with some electrical work and hardly have time for more than pestering you guys.

And your previous excuse was ... ? ;)
#147
04/26/2011 (5:46 pm)
Quote:
Isn't there a flag on groundcover to allow it to sit on top of TsStatics which are over the terrain type?

I wasn't sure so I took a look at the source and I couldn't find anything like this. There was something like that in the replicators though.

For Xenocell we had a somewhat enhanced version of groundcover that would create an influence map based on large enough objects cutting into the terrain and also water shores. So you could actually have it spawn more grass near buildings and less between them, etc. For some reason I stripped it out. I think the property map was reserving memory like crazy, but I can't remember. Perhaps that's a good way to go - after some optimizations.
#148
04/26/2011 (6:23 pm)
Nah, it was ForestEditor I was thinking of - my bad :S
#149
04/26/2011 (8:49 pm)
Quote:And your previous excuse was ... ?
I didn't have one - I'm too lazy to do more. But now I have an excuse, so I thought I'd share! ;p

@Konrad - that sounds like it would have been cool.
#150
04/29/2011 (3:03 am)
Konrad,
What about some kind of sampler that will pull properties from a terrain texture and reproduce them on the accumulation map?

Also
Would it be possible to have more directions not just up and down, I'm thinking of moss on one side of a tree or something like that?

#151
04/29/2011 (3:24 am)
@skipper:

It would be possible, and I did plan to have the accu map pick up whatever is on the terrain below the object, but in the end I let it go, since there were too many factors that could mess it up. If the size of the accu object was way too large for example. But I've also learned that most of the time it's better to use different textures for the terrain below ie. a cliff and on the cliff itself. The Sahara demo video has this showing in the beginning.

As for directions - that would definitely be possible. It's a matter of passing a vector instead of a float to the shader, but I can't imagine what would be an easy way to edit that value. Another question would be whether it should be in object space or world space. To come around this limitation for now, you could use the normal map on the object and skew those rgb values slightly so that the normal map "up" would be towards the side of the trunk.
#152
06/04/2011 (7:48 pm)
Has anyone had any issues with 1.1final and Sahara?

getting ready to put it in and wanted to know if there was something I should be aware of

EDIT: seems to go in manually without any problems. Will let you know if I find any problems while testing.
#153
06/05/2011 (11:54 pm)
All I'm seeing at the moment is an issue with the "elephant's" material mapping. It seems that not all faces are mapped correctly - some look like the "shrink wrap" UVW Map modifier option in MAX, if you know what I mean. I could mail a screenshot if anyone's interested.

That and the overall material quality seems odd. I'm wondering if there were other changes in 1.1 final that have altered the shader pipeline. This isn't my area of expertise - I don't really have one (Jack of all trades, master of none) but I have done almost zero shader work.
#154
06/06/2011 (12:00 am)
Richard, could you post a pic of the shrink wrap effect that you're seeing ?
easy upload location
- I'll be puttin' Sahara into my 1.1masterbuild later this week.
#155
06/06/2011 (8:42 am)
It's there - upon restarting the "shrink wrap" effect has changed to a simple stretch. I put red circles on the most prominent and obvious faces torque.abigholeintheweb.com/public_system/useruploads/mappingError01.jpg I also used the best quality settings and left the image full size so you could see my material settings.

Edit - I've noticed that my normal map doesn't seem to save correctly between restarts. I'll have to verify this before I start whining though.
#156
06/09/2011 (2:09 am)
My elephant looks a bit wonky too, I'll have a go at re-wrapping it.

Also I have noticed that the amount of accumulation changes relative to the size of the object if the scale is changed in the world editor. Is there any way of fixing this because it makes it difficult for me to have the same material on objects of different scales?
Some have no accumulation at all and some are completely covered in accumulation whereas I would prefer it if the material was uniformly controllable across all the objects it is displayed on regardless of scale.
#157
06/11/2011 (10:25 am)
For me it seems that the accumulation is acting more like moss than actual accumulation - it seems to gather more where you would expect it to, but generally gathers evenly over the entire object. And the adjustment seems kind of twitchy, too - goes from almost unnoticeable to too much right around the middle of the slider.

On the up side, I had no problem manually installing the code at all. Although you have to go through about half of it again if you make a new project after the install. Fortunately, it's pretty quick either way.

Hey, Skipper - I was finding earlier on a different issue with parallax mapping that it worked well if I made different copies of the material for different objects when I was having strangeness like you describe. I was noticing that scaling was an issue and I wanted different parallax values per object "size" and that solution worked around the issue.
#158
06/11/2011 (2:47 pm)
Hey guys,

Sorry for jumping in on the conversation a little late. The model that was mentioned has unfortunately a few badly mapped triangles. I'll try to have it fixed, though I'm not an artist, and if anyone would be willing to remap the cliff models I could offer licenses for any of the products from the Bitgap store in return. They are pretty simple shapes, but they are still above my skill level. :)

As for supporting 1.1 - it's coming. I'm happy to hear that the code itself works, I'll prepare the patches in the coming weeks.

The way accumulation works is pretty simple. Imagine you point a directional light at your object and take it's normal map(s) into account. Wherever the light hits the shape in a way that's closest to being perpendicular to the pixel normal is where it affects the shape the most, and where the angle is further away from 90 degrees, it affects the pixel less. The sliders affect multipliers for this accumulation strength value and also add to or subtract from this value.

The scale value changes the uv scale of the accumulation material over the diffuse material - but not the diffuse itself. If your shape has varying sizes, try changing the scale of the accumulation map so it looks as if it was the same (world size). Also, make sure you use detail maps and detail normal maps, as these improve the effect greatly - especially when the effect is to be seen by the player from up close.

Hope this helps. Let me know if you guys have any questions - I'll be glad to answer.
#159
06/11/2011 (5:09 pm)
I can have a pass through them in the week to see if i can fix them up a little, theres a few i noticed before that had stretched faces on them like the elephant posted above
#160
06/12/2011 (8:42 am)
@ Konrad, would also be glad to help on redoing the UVs... :) Have not tested it yet but I'm quite interested in the plugin !