SC4 Devotion Forum Archives

SimCity 4 General Discussion and Tutorials => SimCity 4 General Discussion => General Custom Content Discussion => Topic started by: thingfishs on May 25, 2010, 10:55:39 AM

Title: How do I correct this?
Post by: thingfishs on May 25, 2010, 10:55:39 AM
Hi,
I have a problem with one of my BATs. See how the goal posts (red arrow) look fine but the goal posts (blue arrow), suddenly gain weight about a quarter of the way up (they are clones of the same posts). It seems to be when it extends over the top of BAT itself. Does anyone know what's going on here and what I could do to correct it, thanks.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimgur.com%2Fm8pEW.jpg&hash=6c92f1b2f4ef9c15b6434e3945fdd5c3b2699eb3)
Title: Re: How do I correct this?
Post by: cogeo on May 25, 2010, 11:04:35 AM
Are they separate models (props), or they are part of the main model? (I assume this is the oval area...)
Title: Re: How do I correct this?
Post by: thingfishs on May 25, 2010, 11:18:50 AM
the oval, posts and cricket pitch are all one model which is a prop in the schoolyard. Would having them as separate props change things?
Title: Re: How do I correct this?
Post by: Diggis on May 25, 2010, 11:21:54 AM
I would think this is because the ones with the red arrow have the playing field in the background, but the blue ones have no background above that point.
Title: Re: How do I correct this?
Post by: thingfishs on May 25, 2010, 11:24:31 AM
Quote from: Diggis on May 25, 2010, 11:21:54 AM
I would think this is because the ones with the red arrow have the playing field in the background, but the blue ones have no background above that point.

Agreed, but is there anything that can be done about it?
Title: Re: How do I correct this?
Post by: cogeo on May 25, 2010, 11:30:26 AM
How is the LODshell like?

Btw the ones pointed by the blue arrow (the top ¾) look better imo (well they need some adjustment). The other ones look like mixed with the grass model.
Title: Re: How do I correct this?
Post by: thingfishs on May 25, 2010, 11:36:49 AM
Quote from: cogeo on May 25, 2010, 11:30:26 AM
How is the LODshell like?

Btw the ones pointed by the blue arrow (the top ¾) look better imo (well they need some adjustment). The other ones look like mixed with the grass model.

The LOD is normal (automatically generated). The blue arrow ones to me look too fat and untextured, maybe there is a happy medium...  :-\
Title: Re: How do I correct this?
Post by: Diggis on May 25, 2010, 11:49:30 AM
Quote from: thingfishs on May 25, 2010, 11:24:31 AM
Agreed, but is there anything that can be done about it?
Render them separately as per Cogeo's comment earlier.
Title: Re: How do I correct this?
Post by: thingfishs on May 25, 2010, 11:52:18 AM
Quote from: Diggis on May 25, 2010, 11:49:30 AM
Render them separately as per Cogeo's comment earlier.

I read cogeo's comment as a question, not necessarily a suggestion, but I'll try it.
Title: Re: How do I correct this?
Post by: cogeo on May 25, 2010, 12:05:40 PM
Mmmm..., could you post a better (larger) pic? I'm not sure if this is caused by JPEG compression and/or resizing, or if it is how exactly it looks ingame.

Btw this kind of "bleeding" of colours and textures is a known problem of the BAT renderer.
Making it separate models will solve this problem, but it may create another: shadows cast on the LODshell of another model cause an awful, grille-like effect.
I don't think that making a custom LODshell will solve the "bleeding" problem, but it will make it possible to put other props (like people automata) on the field.

For solving this problem (and get really better results), I would consider two radically different solutions:
- Make the oval area a set of (overlay) textures, instead of modelling it (the posts will need to be props, of course). You will have to make a (large) texture and partition in to 128x128 pix -large tiles.
- Use a flat (planar) model  with one Zoom/Rotate view, instead of 20 BAT-generated ones. The process involves no modelling (only texturing). The model must be assigned the material (texture) manually. Take a look at my PedMall-Compatible Transit-Pack (http://www.simtropolis.com/stex/details.cfm?id=13147) on the STEX, to see how this is done (check the "pavement" props/models). I used this technique in order to make the pavement looking identical to the ped-mall tiles. Transit textures look different to lot textures, because the former are displayed through a model. The pavement models in my pack use the very same textures that NAM does, so they look really identical. The model will have to be modified as needed (enlarged).
Don't get very angry with me if this doesn't work though... :-\
Title: Re: How do I correct this?
Post by: thingfishs on May 25, 2010, 12:37:35 PM
thanks cogeo :thumbsup:

Here is an uncompressed zoom 5 of the oval:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimgur.com%2Fgq4dQ.png&hash=0a10099f7bfefc8a2161e7f4633abde4dd2d2525)

Quote from: cogeo on May 25, 2010, 12:05:40 PM

Btw this kind of "bleeding" of colours and textures is a known problem of the BAT renderer.

Does this mean that if it were exported via MAX that this same issue wouldn't occur? I do have MAX but have had to reinstall Windows 7 so it's not currently setup, and thus I've been using gmax. (plus this oval was originally done as a gmax model).

What's the best (easiest) way/program to create overlay textures with?

Also I guess I would like to have automata on the field... there aren't any footy animations but there are cricket ones. Would custom LODs or overlay textures be better as far as these are concerned?
Title: Re: How do I correct this?
Post by: cogeo on May 25, 2010, 02:28:52 PM
I don't know if the 3DSmax renderer works better, as far as the "bleeding" is concerned.

Overlay textures can be made using any if the texturing tools (FiSHman, SC4Tool and null45's tool - this has a batch-processing feature too). You just need to supply an additional image (the alpha) in addition to the texture (colour), this is the only difference. Request a range of texture IDs from Barby, if you haven't already.
The only concern in using textures, is that they can't be moved in LE, a texture is placed on a lot tile, so you need to partition it carefully, so that the textures are placed exactly where they should be.

Making custom LODs, using textures, or the planar model I mentioned in my previous thread, isn't "better" as far as automata (or small static props) are concerned, it's simply... required! Use the method you prefer.
Title: Re: How do I correct this?
Post by: thingfishs on May 26, 2010, 11:51:22 AM
Well I made the oval and posts separate props but rather than help things it's actually made them worse. ;)
Now both sets of posts look the same, and wrong. All of these posts have identical radii (0.45m) and yet are appearing to be of different thicknesses.  ()what() (to my eye as well, the fat ones are also untextured)

Also I'm assuming custom LODs are only necessary if they are over 20cm high (which the ovals' aren't)?

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimgur.com%2FfUnIY.png&hash=f0bef00c0ecc905b0c8a8d70e8180d3593efada3)





Title: Re: How do I correct this?
Post by: jmyers2043 on May 26, 2010, 02:45:21 PM
You'll see the same thing if you look close at some of my bats. The earliest barns I did had tall lightning rods that I had to shorten. I did some homes and I positioned the TV aerials at the center of the roof so the loss of detail (or extra thickness) will not be a seen.

You could do the posts as an HD prop. I did some signs for some motels and rendered them as HD. That helped with the extra thickness issue. BUT - The problem with the second effort (for me) is that the prop post will not cast a shadow on another prop (field) ... so you have to decide which of two evils  :-\

My suggestion would be to both shorten the posts (A Maxis Sim is a smidgen under 4 meters tall anyway) and you could also move the posts into the field of play a bit more. I (being from the states) would not notice and would enjoy the bat for what it is ... a sports field of some sort and would not be critical of the posts position.

Good Luck

Jim





Title: Re: How do I correct this?
Post by: thingfishs on May 26, 2010, 03:03:27 PM
Quote from: jmyers2043 on May 26, 2010, 02:45:21 PM
You'll see the same thing if you look close at some of my bats. The earliest barns I did had tall lightning rods that I had to shorten. I did some homes and I positioned the TV aerials at the center of the roof so the loss of detail (or extra thickness) will not be a seen.

You could do the posts as an HD prop. I did some signs for some motels and rendered them as HD. That helped with the extra thickness issue. BUT - The problem with the second effort (for me) is that the prop post will not cast a shadow on another prop (field) ... so you have to decide which of two evils  :-\

thank you very much for the info Jim :thumbsup:

- So this is an unpreventable issue with tall skinny things?

- I will try it as a HD prop, thanks.

Quote from: jmyers2043 on May 26, 2010, 02:45:21 PM
shorten the posts (A Maxis Sim is a smidgen under 4 meters tall anyway)

Does shortening them help the situation? What does the height of the sims have to do with it?


Quote from: jmyers2043 on May 26, 2010, 02:45:21 PM
and you could also move the posts into the field of play a bit more. I (being from the states) would not notice and would enjoy the bat for what it is ... a sports field of some sort and would not be critical of the posts position.

Why? Will this help also somehow or are you just talking from an aesthetic POV?

Title: Re: How do I correct this?
Post by: RippleJet on May 26, 2010, 03:16:03 PM
Quote from: thingfishs on May 26, 2010, 03:03:27 PM
Why? Will this help also somehow or are you just talking from an aesthetic POV?

If you go back and render the field and the posts as one model again,
it would help if the posts in all views are completely within the green background of the field.
Title: Re: How do I correct this?
Post by: cogeo on May 26, 2010, 04:15:31 PM
Well, there's something strange here, none of the models really appears to cast any shadow (eg take a look at the trees and the sheds) - the shadow shown in the first pic is a BAT-generated one (part of the model) rather than game-generated. Make sure you haven't turned them off (check your display options); I would also recommend selecting hardware rendering. And the Is Ground Model property in the prop exemplar must be set to 1 (true), otherwise no shadow is cast. For the oval field (and such low models in general) it should be set to 0 (false), because the shadow shown is unimportant, and the model is in danger of being burried under its own shadow.

For the posts, you can see the problem, the constraint is clearly the game's resolution (if they are some 2 pixels wide, adding or removing a single pixel makes a huge difference). And of course the quality can't be great either. Definitely, HD will help, but it may not be enough either. Try something else: make them 2 or 4 times larger, and then scale them down using the Model Tweaker (this way you will effectively have even higher resolution), but beware, there are limitatations as well.

As for the field, I would say try the planar model proposal. it could be a good solution.

EDIT: Forgot to mention, if you are going to release this, it must be tested with both software and hardware rendering. Also, if you look at the 2nd (uncompressed) image carefully, you will see that the sahdows are cut-off at the edge of the field (this is evidence that no game-generated shadow is really cast). If you test this model with shadows turned on, I guess the result will be hideous, because of the different shadow generation techniques. This alone should rather rule-out the solution of making the field and the posts a single model.
Title: Re: How do I correct this?
Post by: thingfishs on May 26, 2010, 04:36:34 PM
thanks cogeo, I've got some options to try now. :thumbsup:

As for the shadows, yes I have got them turned off but I haven't been thinking about the shadows, just the width. I always set my models to "is ground model - true" but I'll try turning it off for the oval.
I'm going to need some more info regarding the planar model thing. Also what benefits does this have over just having low (sub 20cm) regular LODs? (which seems by far the easiest solution)


Quote from: cogeo on May 26, 2010, 04:15:31 PM
(if they are some 2 pixels wide, adding or removing a single pixel makes a huge difference).

but why are the posts that have had the same tiny amount added/removed ending up with different thicknesses?

Title: Re: How do I correct this?
Post by: jmyers2043 on May 26, 2010, 05:48:00 PM
If that were my project? I'd do the Cricket Pitch as a ground texture (like the Maxis Soccer Field) - then do the posts as an HD prop to get them skinny. Then you'd have shadows where shadows are supposed to be and the posts would not be too thick.

Look at the Maxis golf course. The greens are props. So trees and other things do not cast shadows on the greens. The same thing will happen to your cricket pitch. 

QuoteIf you go back and render the field and the posts as one model again,
it would help if the posts in all views are completely within the green background of the field.

That's what I meant to say but RJ said it better ...    :D 

Title: Re: How do I correct this?
Post by: thingfishs on May 27, 2010, 11:34:23 AM
thanks Jim, after turning on my shadows I am convinced of the logic of your argument.  ;)

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimgur.com%2F9FgTv.jpg&hash=4a6cc698d565fcae557ab3f593a86c05c14ccd34)
(nothing weird about that at all...) ???

As for the posts I have tried them as HD props and as large (SD) props then reduced in scale via model tweaker, with mixed results.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimgur.com%2Fer5Me.png&hash=8048a9b9f3d5afd1411a0c0789117d2d45e34961)
The HD version, when compared to the original above, is a marked improvement. There is still some inconsistencies in detail though.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimgur.com%2Fb6G2T.png&hash=0e68a3b08ace4cad954ca884ddbca2a17ec9c50d)
With the model tweaker version the results were highly contrasting, by far the best and worst of the experiment. This first set is almost perfect...

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimgur.com%2FDbfxf.png&hash=6c6430bcd7bc2b6e570db1a152007da01f5ab034)
Whereas this one (the same model placed at the other end of the field), now has a post with an eating disorder... ()what()

Now I am going to learn how to make the oval into textures... I already have my range. Any advice to make that process less painful would be great.




Title: Re: How do I correct this?
Post by: cogeo on May 27, 2010, 11:41:33 AM
Yes, there are benefits in using the planar model (in comparison to a BAT model):
- BAT rendering, with all its known problems (blurring, pixelation, loss of detail, colour shift etc) is not involved in the process (all your work is basically texturing). As a result, the final quality is superior. You can see amazing details, without having to make it HD.
- You don't need to wait for exporting, and manipulate your texture, wondering what BAT will finally export, instead you see the result of your texture adjustments immmediately.

And it's not really hard to implement it, what you have to do is make a prop referencing a 1-Z/R model. Check my SC4 Automata as Props tutorial, it's about automata, but actually can be applied to any 1-Z/R model. Making a texture and partitioning it to 128x128-px-large tiles looks much more labourious to me.

The reason why the (exported) posts are different width is because of "flaws" of the exporting algorithm. The BAT objects, although identical, are projected on the LODshell (and its textures). The projected object may not fall exactly on the pixels' boundary, it may be half between, and then the algorithm has to "decide" whether to render a pixel or not, so differnces of +/-1 pixel may occur, even if the objects are identical. Moving an object a few cm can cause the algorithm to include or exclude a pixel.

But instead, it may be caused by your system. Make a short test: plop more instances of your lot, say five. If the posts look different in some lots, then it's the game's rendering actually (models are projected on the 2D screen), and of course nothing can be done for this, except maybe running the game in high(er) resolution.
Title: Re: How do I correct this?
Post by: Diggis on May 27, 2010, 11:50:40 AM
Why not just make them lot textures?
Title: Re: How do I correct this?
Post by: thingfishs on May 27, 2010, 12:02:15 PM
Quote from: Diggis on May 27, 2010, 11:50:40 AM
Why not just make them lot textures?

What's the difference between lot textures and what cogeo's referring to here?

Quote from: cogeo on May 27, 2010, 11:41:33 AM
Making a texture and partitioning it to 128x128-px-large tiles looks much more labourious to me.

Title: Re: How do I correct this?
Post by: Orange_o_ on May 27, 2010, 12:09:44 PM
I does not understand where is your problem. You just have to create textures with a software like Photoshop and after integrate them with SC4Tool.

I think that Cogeo, wanted to create S3d?
Title: Re: How do I correct this?
Post by: cogeo on May 27, 2010, 01:03:19 PM
Basically I suggested using a very simple planar model (S3D), with only 4 vertices (the four corners). This can easily be resized in the reader, or moved in LE (just like all other props). It's just like a panel carrying the field texture.

The alternative method (making a set of overlay textures) requires positioning of the texure in advance (before partitioning it) as in LE these can only be moved in multiples of 16m (whole tiles). And of course it must be scaled to the correct size (16m=128pix). So it is a procedure that must be carried-out very carefully. But you could use this one too, if you find it easier (imho it's not).
Title: Re: How do I correct this?
Post by: Orange_o_ on May 27, 2010, 03:46:46 PM
It is rather simple to create a precise overlay. Look how I work.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fnsm03.casimages.com%2Fimg%2F2010%2F05%2F28%2F100528124453846486116861.jpg&hash=39941d62cf9f5dd81e099668c2c780850d130ef1)


Title: Re: How do I correct this?
Post by: callagrafx on May 27, 2010, 04:19:52 PM
If you go that route, you MUST get your own texture ID range by requesting one here:
http://sc4devotion.com/forums/index.php?topic=2101.220

This then needs to be used with SC4Tool to make game overlay textures
Title: Re: How do I correct this?
Post by: mattb325 on May 27, 2010, 04:48:18 PM
Just to throw my two cents in....

The others have the texture argument with the oval spot on; with the goal posts I can offer two suggestions which have worked for me in the past with skinny little things....

1) I assume you have made your posts from the cylinder option? Try making a box instead and add more vertices when converting to an editable mesh: then, pull in the corners to slightly simulate the roundness of the cylinder, experiment with chamfering the corners, and about half way up the post start uniformly scaling the vertices to achieve a more tapered top. Secondly, make sure your texture is very clean - in fact I would probably avoid a uvw map and just use one of the colour selections available.

2) Make an alpha map (which is incredibly easy as it will be a single white line) and then make four seperate skinny little post splines/meshes/shapes. Attach your alpha and texture to each of the sides (usually phong/double sided) and it should work. You may need to make a small top to avoid the cutaway look that alpha maps can bring.