Menu

LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod
Dependencies
Chat

Author Topic: Matching a texture  (Read 5192 times)

0 Members and 1 Guest are viewing this topic.

Offline Lowkee33

Re: Matching a texture
« Reply #20 on: February 01, 2011, 12:32:49 PM »
I have a similar question.  In the process of making Chris Adam's Gravel Paths draggable I was trying to figure out how to make good street-lot transitions.  I decided to make an off-set prop of the intersection:

To make this I followed Glenni's Alpha Tutorial.  The grays match up pretty well, but the dirt is far too bright.  I am new to batting.  I played around a little with the color map of the alpha and this seems like it could get close, but would be a ton of guess and check for me.  Any ideas?  Thanks.

Also, perhaps I am thinking wrong about the whole thing.  I would rather edit all the FSH in the model than make a TE lot, but I imagine the off-set prop idea is going to have issues on slopes (but that I can test).  I also raised the model by .05 meters to get above the street texture.  Should I bring it down a little?

Then there is the fact that this doesn't have to be a 16x16 model.  I made a rectangle the "proper" size, but the texture gets distorted on it.  Is there a way to make the texture ignore the size of the model?    
« Last Edit: February 01, 2011, 12:42:20 PM by Lowkee33 »

Offline j-dub

  • Everyday I'm just dubbing!
  • NAM Associates
  • Forums Parliamentarian
  • *
  • Posts: 1940
  • Total likes: 24
  • Reputation: 10
  • H8ting ℛeaLife
    • I blame Discord for sink holes
Re: Matching a texture
« Reply #21 on: February 01, 2011, 12:52:14 PM »
I thought what you guys need to do in order to (closely) match the textures in game is that you actually have to change the values in Photoshop or something similar with the brightness/contrast, and/or color hue saturation. All I remember is someone saying subtract the value by 3 but not much more. However, basically your stuck having to experiment until you get the value right.

Offline Lowkee33

Re: Matching a texture
« Reply #22 on: February 01, 2011, 01:07:29 PM »
Ah yes, editing the texture before I throw it into BAT makes a whole lot more sense.

Offline cogeo

  • NAM Team
  • Forums Parliamentarian
  • *
  • Posts: 1160
  • Total likes: 38
  • Reputation: 18
  • CL:
    SC4 Station Master
Re: Matching a texture
« Reply #23 on: February 01, 2011, 01:18:54 PM »
@emmotic: Don't understand, if the plane will be at ground level, then why not use the lot texture directly? I mean why this needs to be a model?

@Lowkee: You can try doing this without using gmax/BAT. Instead you can use a 1-Z/R model (a 16x16m plane) using that texture (of course the model must be offset by 16m). Take a look at my PedMall-Compatible Trasnit Pack to see such examples. There are such planar props, using directly the very same textures as the network puzzle pieces, matching their look exactly (using the network textures as lot textures instead, would require a painful brightness/contrast adjustment).

Offline Lowkee33

Re: Matching a texture
« Reply #24 on: February 01, 2011, 01:59:04 PM »
These are RKT3?  Could you explain this to me?  7 reps is not something I understand.  I would need all four rotations for the intersection.

BTW, I did some math and reduced the model and texture to the proper size.  For the slope issue I guess the best I can do is make the Occupant Size very small and have it be placed as close as possible to the edge of the lot.

:)...And, for making the smallest FSH possible, should I center the model on the axis?
« Last Edit: February 01, 2011, 02:03:20 PM by Lowkee33 »

Offline cogeo

  • NAM Team
  • Forums Parliamentarian
  • *
  • Posts: 1160
  • Total likes: 38
  • Reputation: 18
  • CL:
    SC4 Station Master
Re: Matching a texture
« Reply #25 on: February 01, 2011, 02:35:41 PM »
RKT3 is like RKT0 or RKT1, only it references models with 5-Z, 1-R views. You can use RKT0 (1-Z/R) instead; there are such models in the pack too, for the "old" NAM versions (not in the same plugin), so check those ones. And of course it will work with all four rotations, you only need to add the kSC4BuildingModelRotationProperty property. For details, take a look at my SC4 Automata As Props tutorial, it's about automata models, but it applies to most other 1-Z/R models too.

I don't think there's any need to make the model and texture smaller, this will make the whole thing harder, I'm afraid. Now about slopes, I really can't think of any solution that would make it looking right for all (or most) cases. Even if you make the Occupant Size very small and set the Orient to Slope property, the model will be conforming to the slope of the tile it is in, not the adjacent one. Maybe if you move the prop box to the edge of the lot (as far as it can go) it might be better, but I'm not sure.

And forgot to mention, shadows (from other models, like poles or subways) cast on such models look OK, unlike shadows cast on BAT-exported models.

Offline Lowkee33

Re: Matching a texture
« Reply #26 on: February 01, 2011, 03:43:40 PM »
Okay, I get it.  I just had to figure out how to go from a texture to an offset-able model.    Looking through NAM I found the model you used and saw that the FSH assigned to it were just the MIPs.  I did a simple override with the Instances and in game it works (just noticeable under a brown box).  I suppose the easiest thing to do would be to copy/paste those S3Ds out of NAM and give them my own Instances.

Even the 7 rep thing makes sense to me (one type, one group, and five zooms) now.  Thanks Cogeo, this method is much more preferable than photoshop guess and check.

I believe the shadow issue you refer to occurs when the LOD of the model is above .3 meters.  (Casting Shadows on Props.  I came across a model recently with this issue where the shape of a non-shadowed cube was very visible. 

Offline Lowkee33

Re: Matching a texture
« Reply #27 on: April 21, 2011, 03:02:04 PM »
More questions down the line.  Can these models be rotated in LE?  I am trying to make some corner lots, where the orientation is not north/south for the driveway.  Should I make a new model with the texture rotated?

Offline cogeo

  • NAM Team
  • Forums Parliamentarian
  • *
  • Posts: 1160
  • Total likes: 38
  • Reputation: 18
  • CL:
    SC4 Station Master
Re: Matching a texture
« Reply #28 on: April 26, 2011, 03:54:34 PM »
The model is a prop, isn't it? Can't it simply be rotated in LE, just like all other props? Or I don't understand the question maybe?

Offline Lowkee33

Re: Matching a texture
« Reply #29 on: April 26, 2011, 03:57:57 PM »
No worries.  It can be rotated in LE, but since model the appears the same in all rotations, I don't know if it would be rotated in-game.  I never tried it, but simply made new s3ds and rotated using your program.

Offline cogeo

  • NAM Team
  • Forums Parliamentarian
  • *
  • Posts: 1160
  • Total likes: 38
  • Reputation: 18
  • CL:
    SC4 Station Master
Re: Matching a texture
« Reply #30 on: April 26, 2011, 04:16:22 PM »
Did you add the kSC4BuildingModelRotationProperty property? This makes models with 1 rotation view (RKT0 or RKT3) rotating in-game (otherwise they display the same side in all rotations, as you mentioned).

Offline Lowkee33

Re: Matching a texture
« Reply #31 on: April 26, 2011, 05:41:58 PM »
Did you add the kSC4BuildingModelRotationProperty property? This makes models with 1 rotation view (RKT0 or RKT3) rotating in-game (otherwise they display the same side in all rotations, as you mentioned).

The driveways work great in-game.  Image Link.  All of the lots in the picture are 1x3.  There are 2 house lots (stage 2) with roads needed in the front.  The 3 house lots are stage 3, and need corner roads.  For the front roads, the driveway works as you said it would.  The corner pieces need the driveway to be in two directions (or at least not south facing).  Rotating in LE does nothing, and I can only assume the same for in-game.  The models always face south, I guess.  To fix this I now have three driveway models using the same texture, the original, and for the East side, West side corner lots.  I didn't make a north facing one (though this is an option for LotConfigPropertyRequiredRoads?).