PDA

View Full Version : Issues with Terrain Paints


Srikandi
9th Aug 2009, 11:46 AM
With Inge's help I successfully made a working terrain paint clone tonight. However, there's still an issue with the brush cursors (the shape that appears on the ground as you paint).

On my first attempt, I cloned the square brush and the round brush, edited the .dds in each of them (using the same image, which is 1024x1024 and has an alpha channel, so I used DXT5 compression).

Loading the square brush alone, the brush does not appear in the catalog. Loading the square brush and the round brush, the brush appears in the catalog and the round brush paints correctly; the square brush erases rather than painting.

Inge noticed a connection between the square and the round brush CTPT resources: the square brush has a value in Unknown 8 one higher than the value of the round brush (e.g. round brush is 0, square brush is 1). She suggested changing the values in this field to 98 and 99 for my round and square brushes respectively. Doing this, I was able to get both brushes to work: both square and round brushes paint the correct shapes.

However, the cursor shape is wrong: the square brush shows the round cursor, and at a smaller size than the cursor shown by the analogous size round cursor (e.g. the large square brush shows a circle cursor smaller than the large round brush cursor, but it still paints a large square).

Inge Jones
9th Aug 2009, 11:50 AM
Srikandi found various problems cloning Terrain Paints.

For a start Unknown8 in CTPT has some meaning to it - it has to have a unique number, with the large square brush being value+1 from the large round brush.

Secondly, both round and square natively point to the same texture DDS

Thirdly, large round for all paints point to the same brush shape DDS, and similarly for large square etc.

Therefore cloner needs to treat terrain paint cloning in a very special way, preferably treating both CTPTs as a pair, and not bringing in (by default) the brush shape. Also needs to make a hash for the Unknown8, incrementing by one for the square

pljones
9th Aug 2009, 04:24 PM
So...

If the resource type selected is CTPT, only list those with ShowInCatalog set (so we only show one of each terrain brush pair).

When generating the resource list, search through all CTPT resources for the other half of the pair, i.e. with Unknown8 set one higher than the selected resource. Include that CTPT, too.

By default, do not clone the brush shape.

-edit- When making unique, set Unknown8 in the ShowInCatalog CTPT from the hash of the unique name and in its pair to one higher. -/edit-

I think that should be what you're asking for.

Inge Jones
9th Aug 2009, 04:40 PM
Yes because of course the actual pattern resource will only come into the package once, even though it is asked for by both CTPTs.

And don't forget the uniquing of Unknown8 in the first place

pljones
10th Aug 2009, 12:47 PM
OK, should be in the next release.

lemoncandy
20th Aug 2009, 09:13 PM
Hello.
I tested making terrainpaints with the newest version of the Cloner (Aug 19 release).
Made 7 different ones and they seem to work perfectly except for one. That one works with the round brushes, but if I choose a square brush, it will paint a different pattern, the one next to it in the catalog. It will also display the name/description/thumbnail of that next paint if a square brush is selected.
I created a new clone from another default paint and made this package again. Same results.

I don't really understand much of how these tools work, and I suspect I must have made an error in the process somewhere. Or maybe not. No idea :lol:
Any help is appreciated.

Inge Jones
20th Aug 2009, 09:23 PM
No, it's not you. We know the terrain paints are not working right. This isn't a tool problem so much as we just don't know what the game expects to find in the package yet.

lemoncandy
20th Aug 2009, 09:38 PM
Cool thank you :)

Yogi-Tea
23rd Aug 2009, 08:12 PM
Got it! ... almost. :(

I've been working on this for about a week or so - with s3oc 0908-08-1553. Just like lemoncandy I don't fully understand tools like s3oc and/or s3pe but I like to try out new things and to learn things by doing. Making recoloured fences, gates and roofs worked quite fine so I've wanted to try my luck with new terrain paints.

I made screenshots to show you the last results I got with the s3oc 0908-08-1553. I cloned the terrain paint "sand" (new:"pebbles") and "dark sand" (new: "cobblestones"). At first I had problems with original and new terrain paint mixed up in the catalog (picture, text and paint brush mixed) then everything looked okay except the known problems pointed out by Srikandi regarding the square brush shape and the brush cursor.

To be honest - I could live with a wrong brush cursor as long as the result is okay at the end, however, what annoys me is that I can't manage to make the terraint paint name and description show up correctly.

I changed the Unknown8 of both CTPTs manually and so the new terrain paints have no longer been mixed up in the catalog with the original terrain paints. The only problem here has been that the pebbles paint name and description for the round shape is displayed as a number while the cobblestone paint name and description is displayed as a number for the square shapes. I really have no idea why this is so and how this could be changed.

Any idea ... anyone? :help:

I found this thread a few hours ago when I was looking for help and so I learned that there is a new version of s3oc - 0908-19-1854. I made a complete new clone of the sand terrain paint (for the pebbles) and at first it really looked as if it worked fine, however, I only have been able to choose the pebbles paint with the round shape but not the square shape. I see the pebbles paint thumbnail also in the list for the square brush but I can't click on it to choose it. Maybe I did something wrong when I saved the package? I tried several options to see if it changed anything in the result but nothing helped.

I'd prefer going back to the old version of s3oc if a solution for this problem can't be found. I hope anyone of you has an idea - I'll let you know if I can come up with something useful myself.

PS: Sorry if my english is a bit weird to read - my german is much better...

Inge Jones
23rd Aug 2009, 08:30 PM
Sorry we have had no further information from anyone analysing the ingredients of a working terrain paintbrush. The tool cannot make progress in that particular issue until someone has that eureka moment.

pljones
23rd Aug 2009, 09:12 PM
The strings being wrong sounds a bit odd, though. Was that reported before? That could be something silly in s3oc.

Inge Jones
23rd Aug 2009, 09:32 PM
No, it was definitely ok once upon a time. But the trouble is when someone has been experimenting over a period of time it become more and more likely they may have deleted something and added it back *after* renumbering, which would definitely cause this type of effect.

Yogi-Tea
24th Aug 2009, 05:46 PM
Okay, now I really got a working terrain paint - the texture is displayed correctly in both categories round and square terrain paint and name/description also shows up correctly.

There's is, however, still the problem that the cursor for the square terrain paint is round and the square terrain paint is a bit smaller. This is something I can live with - and most other people too, I believe.

The solution:

I went back to the older s3oc version, made a clone of one texture (= two package files), edited both files as usual and saved that. Then I used s3pe to compare both of my new files with their original versions (= I clicked on the grid button to have the resources displayed of each CTPT).

We already know that the Unknown8 of the square brush is +1 (btw. I changed that number in both new files) but there are also parts that obviously need to be the same - in the original files the numbers of the Texture were the same (= Instance, Ress.Group. and Ress.Type) and the numbers of the shape were the same at Ress.Group and Ress.Type but not at shape instance. Furthermore the Desc.Guid were the same in both original files and same with the Name and NameGuid. Can't explain that in english (and I don't understand all that, anyway) so I made screenshots and highlighted the important parts.

As I said before I did all that with the older version -the newer version still doesn't allow to choose the square brush for the new terrain paint (I tried it several times with different settings).

Should I ever come across a solution for the wrong brush cursor of the square terrain paint brush I'll let you know (there's not much hope, though, unless I'll find the solution accidentally :blink: )

Inge Jones
24th Aug 2009, 06:08 PM
Well to the best of my knowledge, cloner already handles the bit about "We already know that the Unknown8 of the square brush is +1 (btw. I changed that number in both new files) " so I am puzzled by you saying you changed that number yourself. Was it because cloner didn't do it, or because you needed it to be something else?

Yogi-Tea
24th Aug 2009, 06:39 PM
Was it because cloner didn't do it, or because you needed it to be something else?

I said so because I used the old version (0908-08-1553) of the cloner which does not change that number - the new cloner (0908-19-1854) does indeed change that number but I haven't used it because of the issue with the square terrain paint (which can't be chosen in the catalog).

Sorry, I should have explained that more clearly in my first post.

pljones
24th Aug 2009, 07:23 PM
The new version only shows one of the brushes because it's meant to handle the other one at the same time for you. You don't need to treat them separately. It treats the two CTPTs as a single item.

Inge Jones
24th Aug 2009, 08:33 PM
She means she can't use the terrain paint in the game - she can't pick the square brush for it from her ingame catalog.

Yogi-Tea
24th Aug 2009, 08:39 PM
@Inge: It took me ages to write my answer and just when I was about to hit the "submit" button you came up with your (much shorter) answer. Thank you. This is exactly what I wanted to say.

ellacharmed
16th Sep 2009, 09:26 PM
I think I figured this out, well unless you guys have done so and the solution is imminent in the next release...but just in case...

Using s3pe 0909-12-1009, s3oc 0909-13-1134.

The square brush unknown8 value is set with -1 lower than the circular brush. It needs to be +1. A -1 value lower than the circular brush seems to be set as the eraser.

When I set Unknown8: 0xA8786E3C (was 'A'), I could get the square brush as shown in pic.

Inge Jones
16th Sep 2009, 10:16 PM
Well I knew about the difference in the number between the square and round brush, and I thought the cloner was taking care of that. It was in my tests. Are you saying that the reason they're having problems is they needed an erasor resource too?

ellacharmed
16th Sep 2009, 11:08 PM
No, I meant at the current settings of s3oc, the square brush is set -1 (Unknown8: 0xA8786E3A) when it needs to be +1 (Unknown8: 0xA8786E3C).

When I tested with the Unknown8: 0xA8786E3A, I get the circular eraser instead of a square brush (which previous posts here have indicated).

Oh! And I had to change the "BuildBuyProductStatusFlags: 0x21" of the square brush, too. It was set 0x20 originally by s3oc. Didn't test if this is why the square brush cannot be "picked up".

Inge Jones
17th Sep 2009, 08:49 AM
We tried to copy how the others were set. Cloner won't change that flag itself. Thanks for your details I shall investigate further.

Inge Jones
17th Sep 2009, 02:08 PM
Thank you very much ellacharm, you have solved the problem. Cloner was trying to do what you said but for some reason had it in reverse - as you pointed out. However, setting the ProductStatus flag to 21 is not required. Hopefully the next release will have this fix.

pljones
19th Sep 2009, 08:08 PM
Thanks for the report. Latest version should fix the problem.

Marina
20th Sep 2009, 11:24 PM
Thanks a lot Inge and PlJones for the work and time you spend making and fixing the tools to mod our game.
I made 8 terrains after reading this thread and only 2 were correct. The other six work ok (round and square brushes), there is only a problem with the description and name in the thumbs in game, even after cloning them new. I'll try the new update and I hope that it will allow me to fix the problem.

Fire~
23rd Sep 2009, 04:38 AM
Great to have this working, Thank you Peter, Inge & ellacharm3d.

Question maybe someone here can answer? when i clone the file and make the image how do i remove the funny border lines i am seeing? is it caused by the game? or is it graphic? i have tried fixing it in the graphics and exporting using all different dds settings, i expect i am doing something that is easily corrected but am not seeing my mistake? Thank you if anyone has an answer?

http://i299.photobucket.com/albums/mm294/RickBoyle/Misc/Screenshotlines.jpg

oh and if this is the wrong place to post this, my apologies,
i am not sure where else to ask.

Srikandi
23rd Sep 2009, 07:15 AM
Terrain paint has to be a seamless tiling texture... that's the most obvious source of your problem. If your image tiles seamlessly, I don't know what it is.

Easiest way to make a terrain-type texture tile seamlessly is to use the offset filter to put the seams in the middle of the image, and then use the clone brush to paint over them.

Fire~
23rd Sep 2009, 03:37 PM
Thank you Srikandi, that was the problem, Sometimes you just need a nudge to know what you are doing,

Thank you again.

<Fire>

KICKRamone
30th Mar 2010, 03:57 AM
Forgive me for posting in a thread that as not had a reply in 6 months. I am trying to make a terrain paint package for the first time. I am using s3oc_0912-13-1531. I had just finished using s3pe, and came back to finish off the package with s3oc. I ended up not being able to and I got this message.

************** Exception Text **************
System.ArgumentOutOfRangeException: Index must be within the bounds of the List.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.Collections.Generic.List`1.Insert(Int32 index, T item)
at ObjectCloner.MainForm.CTPT_Steps(List`1 stepList, Step& lastStepInChain)
at ObjectCloner.MainForm.SetStepList(Item item, List`1& stepList)
at ObjectCloner.MainForm.CloneFixStart()
at ObjectCloner.TopPanelComponents.CloneFixOptions.btnStart_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4200 (NetFxQFE.050727-4200)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
s3oc
Assembly Version: 912.13.10.27943
Win32 Version: 912.13.10.27943
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3oc.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
SemWeb
Assembly Version: 1.0.6.4
Win32 Version: 1.0.6.4
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/SemWeb.DLL
----------------------------------------
s3pi.Interfaces
Assembly Version: 912.13.10.19599
Win32 Version: 912.13.10.19599
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3pi.Interfaces.DLL
----------------------------------------
s3pi.CustomForms
Assembly Version: 0.0.0.0
Win32 Version: 0.0.0.0
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3pi.CustomForms.DLL
----------------------------------------
s3pi.WrapperDealer
Assembly Version: 912.13.10.19599
Win32 Version: 912.13.10.19599
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3pi.WrapperDealer.DLL
----------------------------------------
s3pi.CatalogResource
Assembly Version: 912.13.10.19601
Win32 Version: 912.13.10.19601
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3pi.CatalogResource.DLL
----------------------------------------
System.Custom
Assembly Version: 912.13.10.19599
Win32 Version: 912.13.10.19599
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/System.Custom.DLL
----------------------------------------
s3pi.DefaultResource
Assembly Version: 912.13.10.19600
Win32 Version: 912.13.10.19600
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3pi.DefaultResource.DLL
----------------------------------------
s3pi.Extensions
Assembly Version: 912.13.10.19599
Win32 Version: 912.13.10.19599
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3pi.Extensions.DLL
----------------------------------------
s3pi.GenericRCOLResource
Assembly Version: 912.13.10.19600
Win32 Version: 912.13.10.19600
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3pi.GenericRCOLResource.DLL
----------------------------------------
s3pi.Settings
Assembly Version: 912.13.10.19599
Win32 Version: 912.13.10.19599
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3pi.Settings.DLL
----------------------------------------
s3pi.ImageResource
Assembly Version: 912.13.10.19602
Win32 Version: 912.13.10.19602
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3pi.ImageResource.DLL
----------------------------------------
s3pi.ModularResource
Assembly Version: 912.13.10.19602
Win32 Version: 912.13.10.19602
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3pi.ModularResource.DLL
----------------------------------------
s3pi.NameMapResource
Assembly Version: 912.13.10.19600
Win32 Version: 912.13.10.19600
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3pi.NameMapResource.DLL
----------------------------------------
s3pi.ObjKeyResource
Assembly Version: 912.13.10.19600
Win32 Version: 912.13.10.19600
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3pi.ObjKeyResource.DLL
----------------------------------------
s3pi.Package
Assembly Version: 912.13.10.19602
Win32 Version: 912.13.10.19602
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3pi.Package.DLL
----------------------------------------
s3pi.StblResource
Assembly Version: 912.13.10.19601
Win32 Version: 912.13.10.19601
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3pi.StblResource.DLL
----------------------------------------
s3pi.TxtcResource
Assembly Version: 912.13.10.19602
Win32 Version: 912.13.10.19602
CodeBase: file:///C:/Users/Kick%202/Desktop/Other%20Sim%20Stuff/s3oc_0912-13-1531/s3pi.TxtcResource.DLL
----------------------------------------
I would have put this as a spoiler alert, but I do not know how to do that.

I received a similar message previously, I read about what my problem might be. I thought that I should download and put the s3pi_1002-22-1731 folder into the s3oc folder. Now I don't think that was what I was suppose to do. I mostly do not understand thees tools, but I have cloned objects before. If my problem as been addressed and answered before I guess I just did not understand it. I read that making terrain paints was to easy for a tutorial, but I need so form of help to complete my package.

Inge Jones
30th Mar 2010, 09:19 AM
Please always make sure you have the latest release before posting a bug report :)