Planetside Software Forums

General => Terragen Discussion => Topic started by: King Mango on March 30, 2012, 11:42:44 PM

Title: Question: UV Tiling, UV sets, and Lightmaps.
Post by: King Mango on March 30, 2012, 11:42:44 PM
I want to try my hand in the modeling market and while I understand UDK, Hammer and CryEngine, I am not so sure about apps like Terragen. My questions are regarding the best practice concerning shaders.

1.)I see that TG2 supports multiple shaders on objects. I assume this to mean that I can have separate wood/metal/stone textures on one object using completely different specular/reflective/bump textures? I usually try to keep everything to one texture sheet and handle the material types with mask values but that's not always possible.

2.) What about UV tiling? Can I make one large object say, a long wall section with a repeating brick/block image texture by running the UVs of my object outside of the 0-1 space?

3.)How about multiple UV sets? Does having a dedicated lightmap help TG2 at all? Does it even look for one?

I'm sure the answer is yes to 1 &2 but it's safer to ask. :D

Also, if anyone is interested in helping me test my workflow they can have this gorgeous Garden Monument! A bit dull at the moment but I plan to add some grunge to the concrete and a nice copper dome with some patina. Probably some sort of bronze/metal relief plate with some sort of inscription on one of the base panels. Final will have weathered concrete and a fancier clean travertine color sheet.
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: TheBadger on March 30, 2012, 11:49:32 PM
Hi KM,

Welcome to the forums. Its great that your jumping in like this (posting). Its likely that someone who can answer your questions will be along sooner rather than later, but it does get slow on the weekends.

That model looks great already, nice work. I am sure you will see in in a lot of renders once its posted.
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: King Mango on March 31, 2012, 12:06:11 AM
Well it's good to know that some of my fellow CG enthusiasts still have other things to do on the weekends lol :D

Thanks for the compliment Badger. I always get a little bit of 'stagefright' with my creations. :/

I just want implementation to be as easy as possible for the end user and my lack of experience with TG2 and OBJ in general leave me at a disadvantage.
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: Dune on March 31, 2012, 02:47:26 AM
The answer to 1 is yes. I usually work the other way, having several UV maps for different parts of the object, but for subtle gradients your method is probably better (as far as my knowledge in this goes). Your third question made me think beyond my usual 'thinkflow'. I just figured it may be possible to add additional textures/colors out of the original UV map if you make additional UVmaps like you described on one texture sheet, but as a different mask. You could import those in an image map shader , set it to UV and use it as a blender for a surface layer or PF. It's theoretical, however (and early mroning  ;)).
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: King Mango on March 31, 2012, 04:38:51 AM
Hey I totally identify with the long hours and idea self-evaluation! :cheers:

Yeah the UV 0-1 is essentially a repeating space though I wasn't sure how TG handles it. I think you would just be creating an extra step there if Multiple UV sets are possible. Each set only displays its particular coordinates in your editing software and they are totally independent of each other come render time in an engine like say, UDK. If I create a rock cliff I can have one set of UVs for the rock, another set for say grass on the top edge, each set would creep an edge loop or two into the others' so that I could use a vertex color alpha blend between the two textures within one material. In the case of multiple materials UV sets would be unnecessary as the material's designation should not conflict with another material sharing the same UV space. Unless of course you wanted to blend the materials with different UV layouts, then sets would be mandatory to prevent seams along the UV shell borders.

Now I hope I made sense...

btw try typing an italics "I" when you're tired, it's a keyboard version of a tongue-twister
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: TheBadger on March 31, 2012, 05:56:36 PM
Hey KM,

It happens that Im very interested in the same things you are right now.
I would like to ask you to document your process for the model above^^, here in this or some other thread. What I mean is, would you mind turning that model into a tut? Not the making of the model its self, or the making of the textures (although that would be nice too) But the adding the textures to the model as that process relates to objects for terragen2 use.

Let me explain my self. I am an idiot :P And, so far where everything 3D is concerned, I need my hand held like a little baby girl :'( Its shameful and embarrassing, but admitting I have a problem is the first step towards crushing depression :-\. Anyway, if you have the time and energy it would be helpful for me (for one) if you document the steps you take and the problems you run into in a thread. I have found a ton of tuts and documents on line covering all of the things I'm interested in, but none of the people who made those materials seam to understand that I'm slower than your average internet idiot.

I just ordered this book from Amazon http://shop.3dtotal.com/books/photoshop-books/photoshop-for-3d-artists.html#t1
hopefully it will help me to fill in a lot of blanks, but step by steps in this forum have so far given me the best help of all the learning materials I have tried. We'll see.

No worries. And don't be afraid to tell me no. I just figured it couldn't hurt anything but my pride to ask.
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: King Mango on March 31, 2012, 08:30:48 PM
I could certainly do that as it seems there is a severe shortage of material regarding objects in TG2.

As for creating textures let me also share some resources I have found to be highly educational and practical:

A great set of (free!) pdf tutorials on modeling and texturing can be found at AMC Pixel Factory (http://www.amc.ro/)

I found the "Creating Next Gen Environment Textures" and "Creating Next Gen Environment Setting" tutorials by Daniel Vijoi to be geared towards real world problem solving. Once the site loads look for the tutorials under the "shares" section. I haven't made my way into the others yet.

I also use Gnomon DVDs quite a bit for my modeling with Maya, though I've never tried any of their photoshop tutorials. Most of their newer game stuff unfortunately is geared towards 3ds Max and Zbrush users whereas I am strictly Maya and Mudbox. :(

Eat3d is another good resource for training DVDs. They have quite a bit of Zbrush and Max but a few good titles for Maya and Mudbox.

Chris Albeluhn is another great artist who has a wealth of tutorials at his site: http://www.chrisalbeluhn.com/3D_Tutorials.html

Most of my resources are game-related but the techniques translate over to high-poly as well since you need good discipline at the low poly level to add more detail.



Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: Oshyan on April 01, 2012, 01:14:36 AM
In the interest of hopefully providing some info, but at the risk of possibly stating one or two things not entirely correctly, I offer the following, with hopeful corrections as needed from the dev side to come.

OBJ is the primary object input format for TG2, so at the very most TG is limited to what OBJs can represent. Most of the time you will want to assume the simplest version of the format, e.g. triangulate everything, no fancy model representations (e.g. NURBS, although these would be turned into geometry on OBJ export normally anyway).

TG2 needs a validly formatted MTL which refers to the appropriate texture maps. TG2 does not currently respect material *properties*, for the most part, only texture map references and UV mapping. So if you want e.g. a shiny texture area, you would create it with the basic texture map and UV in your modeler, then just set it up as specular with a TG2 shader.

I don't think repeating textures are respected either, so ideally you would have a single texture that covers every UV mapped area you need to cover. An alternative could be to use TG's built-in tiling for image maps, but I'm not entirely certain this will have the same results (or at least that the results would be easily duplicatable) as your modeling/texturing app.

I hope that helps a bit.

- Oshyan
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: TheBadger on April 01, 2012, 05:19:29 PM
Quote from: King Mango on March 31, 2012, 08:30:48 PM
I could certainly do that as it seems there is a severe shortage of material regarding objects in TG2.

Great!
Looking forward to further discussion on these topics.

Thanks for those links KM, they are really great, and new to me... I have some Gnomon DVDs for matte painting, by Dylan Cole, and others.

Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: jo on April 01, 2012, 09:52:01 PM
Hi,

Just to add a bit of a correction to Oshyan's post. TG2 will load diffuse and specular colours from MTLs. It does of course load diffuse texture files but doesn't support any of the optional arguments, just the path to the texture file.

Regards,

Jo
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: Oshyan on April 02, 2012, 12:35:38 AM
Jo, does it load specular *amount* or just the color? Also, it does not load specular *textures* (e.g. specular mask), does it?

- Oshyan
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: jo on April 02, 2012, 12:57:04 AM
Hi,

It loads the Ks part of the OBJ material properties. Ks is defined as a colour. It gets put in the Reflectivity parameter of the Default shader.

It doesn't load any textures apart from the diffuse colour one.

Regards,

Jo
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: King Mango on April 02, 2012, 04:42:13 AM
I'm still looking into the mtl syntax and how to best create a portable asset. I think I am going to go ahead and break the object up into three textures/shaders.
One for the entire base including the circular pedestal for the columns, one for the columns and circular entablature, and then finally one for the dome.
The first two will be 2048x2048 with an optional duplicate at half size for scene requirements, and then a 512 for the dome as that is about two pixels per unit of surface geometry and should be sufficient. I don't really intend for this to be a hero piece. It will certainly stand up to any image extents but if you start getting much closer you really need more polys on the round surfaces and as it stands, the high-res model is nearly 4,000 triangles while I have a LOD level 1 of 1200 polys for game engine rendering.

Textures are starting to fall into place now and I expect a finished result with the next few days. I also forgot to ask about LOD in TG2. Does it apply LOD adjustments to these huge forests that people are rendering?
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: Matt on April 02, 2012, 05:41:32 AM
Quote from: Oshyan on April 01, 2012, 01:14:36 AM
I don't think repeating textures are respected either, so ideally you would have a single texture that covers every UV mapped area you need to cover. An alternative could be to use TG's built-in tiling for image maps, but I'm not entirely certain this will have the same results (or at least that the results would be easily duplicatable) as your modeling/texturing app.

The Default Shader uses the "Repeat X" and "Repeat Y" features of the Image Map Shader, so if you have UVs outside the 0..1 range they will repeat the image textures. Procedural textures are not repeated - they see the raw UVW values.

Matt
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: Matt on April 02, 2012, 05:44:53 AM
Mango, the answer to 1 and 2 is yes (see above). The answer to 3 is no; we don't support light maps or multiple UV sets per polygon.
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: King Mango on April 02, 2012, 05:49:59 AM
Cool beans. Thanks for the heads up.
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: Mandrake on April 02, 2012, 09:09:57 AM
This looks like a good place for this question.
Has anyone played with the new PoseRay beta yet?
https://sites.google.com/site/poseray/home

Line one on the change list says:
Added an import filter functionality to process materials based on their names.

I'm hoping this means they have gotten away from the old dos 8 naming conventions? anyone know?
Because my latest test, fell apart, regarding the mtl, due to naming.
450meg model 400meg flat diffuse only.
http://www.kdf-computers.com/rendo/Capture4235.jpg (http://www.kdf-computers.com/rendo/Capture4235.jpg)
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: Mandrake on April 02, 2012, 11:57:23 AM
Ok, I had time to play and it looks like poseray can except any names you throw at it now.

Anyway, you may want to check out PoseRay, KM
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: King Mango on April 02, 2012, 07:37:46 PM
I'll try it out. It looks like it should help with the mtl setup? Thank you :cheers:
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: Dune on April 04, 2012, 02:13:31 AM
Thanks for the Poseray link. I thought it was abandoned.
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: Mandrake on April 04, 2012, 10:57:24 AM
Yes, you can load an .mtl file and revue it. One aspect I use is the curving or phong as they call it in c4d.
My two exporters are not always good at this and if I made that rook you've shown on the last page, I might end up with visible polys on the curved top. With PoseRay you can reacquire your curve angle.
Title: Re: Question: UV Tiling, UV sets, and Lightmaps.
Post by: King Mango on April 25, 2012, 02:59:18 AM
Hey all, sorry about my neglect here, but I am currently sidetracked on two fairly detailed Maya projects. Will be a couple weeks at least before I can re-address this topic.
I do still intend on finishing this piece and documenting the procedures.

Thanks again to everyone for the tips and info. :cheers: