|
created Tiling only a part of a texture map, is it possible?
on 06-20-2012 09:36 AM
Hi, while working on a house for an iPhone game, Ive been wondering one thing... is it possible to take only part of a texture map for a tiling?
See this picture of my map:
http://i.imgur.com/RlSBS.jpg
What if I wanted to put a tileable ground texture in the yellow square to use on my floor? Is it even possible?
Thank you in advance :P
|
, spline,
135 Posts,
Join Date Jan 2012,
Location Canada
|
Yes, it's possible, but you'd just be tiling it with geometry. So, instead of a single flat plane for your ground, you'd have as many segments as you'd need to reach the desired tiling of the texture.
Hopefully, your game has support for vertex colors so you can add some variation into the tiling area.
PS- You could make that tiling area larger by combining a lot of your wooden pieces into the same texture portion.
|
, dedicated polycounter,
1,885 Posts,
Join Date Nov 2005,
Location Las Vegas, NV
|
Oh, yes, I get it.
I should"ve thought of that, hahaha.
Thanks a lot!
|
, spline,
135 Posts,
Join Date Jan 2012,
Location Canada
|
Some tutorials that explain the technique, including some nice tricks.
http://wiki.polycount.com/CategoryEn...ring_Tutorials
|
, Polycount.com Editor,
6,674 Posts,
Join Date Oct 2004,
Location Boston USA
|
Yes, I've been checking out this section a lot these days. I have nowhere near enough experience in environment modeling/texturing so yeah, I'm trying to get more into that.
|
, spline,
135 Posts,
Join Date Jan 2012,
Location Canada
|
You can also tile horizontally and have one big piece of geometry hanging well outside of the 0-1 space. That would work well for all of those pieces at the top of the texture sheet, it works great for stairs and other bits of trim, pipes and stuff like wires.
|
, Polycount.com Editor,
13,904 Posts,
Join Date Oct 2004,
Location Seattle, Wa
|
You could do it in shader if you really want to.
|
, veteran polycounter,
3,187 Posts,
Join Date Sep 2006,
Location Berlin Germany
|
latest iphone unity test environment has a shader that does that, something called "atlas mapping"
|
, dedicated polycounter,
1,463 Posts,
Join Date Feb 2006,
Location Redmond WA
|
Oh yea, also there is a maxscript that will carve geometry along tiling edges, then remap the tiling texture to an atlas map.
http://www.scriptspot.com/3ds-max/sc...tlas-generator

|
, Polycount.com Editor,
13,904 Posts,
Join Date Oct 2004,
Location Seattle, Wa
|
Quote:
Originally Posted by Mark Dygert
|
I dont really understand the benefit here. It just seems to be adding geometry at the seems. How is this better than just having things stretch outside the 0 to 1 space.
Indie Video Game Developer
|
, triangle,
380 Posts,
Join Date Dec 2010,
Location California
|
The benefit is reducing 3 materials into 1. This reduces draw calls, which usually improves the frame rate.
|
, Polycount.com Editor,
6,674 Posts,
Join Date Oct 2004,
Location Boston USA
|
Quote:
Originally Posted by Neox
You could do it in shader if you really want to.
|
I wouldn't recommend that since you can get all kinds of ugly artifacts from it;
 using this: 
|
, triangle,
292 Posts,
Join Date Oct 2008,
Location gbg sweden
|
Doing it with geometry will get you the same artifacts. You can get rid of the artifacts by modifying the remapping rectangle to be half a pixel shorter on each side. You could also do something more complicated with custom bilinear filtering at the edges if you really want it to be 100% accurate.
Edit:
Oh you mean the blocky artifacts. Thats weird, how are you remapping the uvs?
Last edited by commander_keen; 06-23-2012 at 10:11 PM..
|
, polygon,
616 Posts,
Join Date Jan 2005,
Location Los Gatos, CA
|
the block artifact arise from using fmod(). the screenspace derivative for a block where the new uvs go from 0.999 to 0 is pretty big so the shader does the "right thing" and samples a lower mipmap. the clue is in the fact that the blocks are 2x2 pixels large.
you can obviously get around it by not using mipmaps, but that's a pretty bad solution. ...come to think of it, i guess you could solve it by just using tex2Dlod() functions and compute miplevels manually.
|
, triangle,
292 Posts,
Join Date Oct 2008,
Location gbg sweden
|
Quote:
Originally Posted by Eric Chadwick
The benefit is reducing 3 materials into 1. This reduces draw calls, which usually improves the frame rate.
|
It's not that obvious as it seems. It really depends on which engine you are going to use, and how often object will be repeated over single frame.
From experience I can tell that for CryEngine3 it's almost irrevelant how many sub-materials you will have, unless you will be using highly repeatable objects like grass, or ground stones.
What's matter in this case is to keep objects within single geometry object, and not overuse molecularity.
|
, triangle,
392 Posts,
Join Date Sep 2010,
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Copyright 1998-2012 A. Risch
|