Reply
Reply
 
Thread Tools Display Modes
Pioldes's Avatar
Old (#1)
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
http://www.pioldes.com
Modeling/Texture Artist. Available for freelance.
Offline , spline, 135 Posts, Join Date Jan 2012, Location Canada  
   Reply With Quote

Xenobond's Avatar
Old (#2)
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.
Kurtis Smith
Senior Artist - Petroglyph Games
Offline , dedicated polycounter, 1,885 Posts, Join Date Nov 2005, Location Las Vegas, NV  
   Reply With Quote

Pioldes's Avatar
Old (#3)
Oh, yes, I get it.

I should"ve thought of that, hahaha.

Thanks a lot!
http://www.pioldes.com
Modeling/Texture Artist. Available for freelance.
Offline , spline, 135 Posts, Join Date Jan 2012, Location Canada  
   Reply With Quote

Eric Chadwick's Avatar
Old (#4)
Some tutorials that explain the technique, including some nice tricks.
http://wiki.polycount.com/CategoryEn...ring_Tutorials
Offline , Polycount.com Editor, 6,674 Posts, Join Date Oct 2004, Location Boston USA  
   Reply With Quote

Pioldes's Avatar
Old (#5)
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.
http://www.pioldes.com
Modeling/Texture Artist. Available for freelance.
Offline , spline, 135 Posts, Join Date Jan 2012, Location Canada  
   Reply With Quote

Mark Dygert's Avatar
Old (#6)
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.
(AKA Vig) Portfolio | Lab | Brawl | Decker |
Offline , Polycount.com Editor, 13,904 Posts, Join Date Oct 2004, Location Seattle, Wa Send a message via MSN to Mark Dygert  
   Reply With Quote

Neox's Avatar
Old (#7)
You could do it in shader if you really want to.
bonus vir semper tiro.

Steffen 'Neox' Unger
It's Airborn Baby!

freelance 3d artist
for hire
Offline , veteran polycounter, 3,187 Posts, Join Date Sep 2006, Location Berlin Germany Send a message via ICQ to Neox  
   Reply With Quote

bugo's Avatar
Old (#8)
latest iphone unity test environment has a shader that does that, something called "atlas mapping"
Offline , dedicated polycounter, 1,463 Posts, Join Date Feb 2006, Location Redmond WA Send a message via MSN to bugo Send a message via Skype™ to bugo  
   Reply With Quote

Mark Dygert's Avatar
Old (#9)
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
(AKA Vig) Portfolio | Lab | Brawl | Decker |
Offline , Polycount.com Editor, 13,904 Posts, Join Date Oct 2004, Location Seattle, Wa Send a message via MSN to Mark Dygert  
   Reply With Quote

Macattackk's Avatar
Old (#10)
Quote:
Originally Posted by Mark Dygert View Post
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
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
Offline , triangle, 380 Posts, Join Date Dec 2010, Location California  
   Reply With Quote

Eric Chadwick's Avatar
Old (#11)
The benefit is reducing 3 materials into 1. This reduces draw calls, which usually improves the frame rate.
Offline , Polycount.com Editor, 6,674 Posts, Join Date Oct 2004, Location Boston USA  
   Reply With Quote

equil's Avatar
Old (#12)
Quote:
Originally Posted by Neox View Post
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:
Offline , triangle, 292 Posts, Join Date Oct 2008, Location gbg sweden  
   Reply With Quote

commander_keen's Avatar
Old (#13)
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..
Offline , polygon, 616 Posts, Join Date Jan 2005, Location Los Gatos, CA  
   Reply With Quote

equil's Avatar
Old (#14)
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.
Offline , triangle, 292 Posts, Join Date Oct 2008, Location gbg sweden  
   Reply With Quote

iniside's Avatar
Old (#15)
Quote:
Originally Posted by Eric Chadwick View Post
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.
Offline , triangle, 392 Posts, Join Date Sep 2010,  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 1998-2012 A. Risch