Game Development Community

UV Noob / 2 textures

by Josiah Wang · in Artist Corner · 01/05/2005 (10:58 am) · 17 replies

Alrighties, so I tried my hand at UV Mapping in gameSpace, and needless to say, I suck at it. So i tried to do something else - I made my shapes, and then tried to texture each individual one before using ObjectUnion. It looked fine in gameSpace, i even reloaded it once or twice just to make sure. So i thought everything was going fine, and exported it into torque. I tried to load it up into the torque show (the normal one), and then I get this error in a popup window:

Fatal: (dgl/gBitmap.cc @ 111) GBitmap::GBitmap: in order to extrude miplevels, bitmap w/h must be pow2

the error is also the last line to show on the console.log....

I looked in my dump.dmp, and here's what the material list thing says:

Material list:
material #0: "metal4".
material #1: "greenglass".
material #2: "unnamed".

I have a metal4.bmp and greenglass.jpg in my folder....

-anyone know a workaround?
-if not, is there any way to combine the UV maps of my objects in gameSpace and create a single material?
-Or better yet, does anyone know a supported and free UV tool? (i tried lithunwrap, but I can't get it to reimport the map back into gameSpace)

thanks!

#1
01/05/2005 (11:05 am)
"pow2" is short for power of 2. This means your textures likely aren't a power of 2 in their width and height dimensions.

Lithunwrap is the tool I use, I simply save my objects as .3ds after I have unwrapped them. Then reimport these .3ds into gamespace.

-Craig
#2
01/05/2005 (12:36 pm)
So Josiah, just resample your texture bmp and jpg to a power of two, like 256x256 or 512x256 or whatever makes sense for your layout in these files. I don't think I'd use a bmp for the final model because of its size compared to jpg or png.

And I too would like to know a good way to get rid of these 'unnamed' textures. Maybe you've got a texture on some non-mesh object in your scene, like the bounds or a detail marker?
#3
01/05/2005 (12:37 pm)
Yeah gS is not a great place to unwrap/map uv's...even with the 1.6 improvemnts.
#4
01/05/2005 (12:44 pm)
Unnamed textures I believe come from the detail markers etc having NO texture (guessing, but it would make sense)

The references to bitmaps are cos jpgs and pngs are bitmap images, just with special compression types etc. TGE doesn't support .bmp afaik.

Also another thing of note, the size of your textures is irrelvent once they get loaded to your graphics card.
#5
01/05/2005 (12:47 pm)
@Paul. Unnamed textures are where you applied a color shader without a texture map. Apply a texture map and you'll not have any unnamed textures but...You really don't need to worry about the 'unnamed' textures for the bounds and col-1, LOScol-9, detail markers, etc. Since they don't need a texture map.


Edit-Craig beat me to the post:)
#6
01/05/2005 (12:50 pm)
I've been noticing this texture in my DMP files too?? On every shape exported?

ah, slow post...I see, makes sense for color shaders not having a texture...
#7
01/05/2005 (1:01 pm)
Nice to see all of the Gamespace forum activity - we're not alone... Yeah, I had noticed these 'unnamed' texture warnings like Josiah mentioned in the first post here. Eric's suggestion sounds good to me, I certainly might still have a procedural shader applied to some bit of mesh. Thanks!

@Craig, I'm pretty sure BMPs are loaded by TGE. A quick test where I took away my jpg and left a bmp resulted in the texture still displaying in showtool.

And thanks for the reminder that texture file size doesn't affect texture memory consumption! I've been thinking I should use PNGs to get an alpha channel but have to remember that file compression doesn't make a 512x512 texture any easier on the old video card. At least the overall product download will be smaller.
#8
01/06/2005 (9:27 am)
I'm pretty sure that the last time I checked Torque doesn't support bmp files only png, tga and jpg. One thing to keep in mind is that the file extention for a texture is not stored in the DTS file, only the name of the texture. Torque uses priority to determine what file type to load first.

For example if you had a texture or your model named "playerSkin.bmp" and in the directory with your DTS file you had 3 texture files: "playerSkin.bmp", "playerSkin.png" and "playerSkin.jpg"

The jpg would be used first, if the jpg was gone, then it would use the png, and if only the bmp file was there you should have no texture at all.
#9
01/06/2005 (9:40 am)
If you are using showtool Pro and move textures around make sure you either exit and reload or flush the texture cache.
#10
01/06/2005 (5:29 pm)
@Matt hrmm...well, I've been using bmp textures so far....only used one non-bmp texture, and that was a jpg....although i do agree bmp is not even close to being economical (memory-wise)

Thanks for the help, this was really needed =D I got it working now
#11
01/06/2005 (8:37 pm)
Alrighties, I got a UV map for a more complicated model into lithunwrap...here's what I did...

-modelled individual 'parts' of my plane in gameSpace
-did 'cylindrical/planar/cubic/etc projection' on all my parts so they looked somewhat editable
-exported it as a 3ds file
-opened it up in lithunwrap - organized the uv-meshes of all my parts
-saved the uvmap as a bitmap to be editted
-colored the uvmap in MSPaint (did a rough job, since i didn't want to waste my efforts if it didn't work)
-Put the uvmap material into lithunwrap - tested it in the preview (looked fine)
-rexported the 3ds from lithunwrap; opened it back up in gameSpace
-applied the texture to each individual part - looked ok


and now my problems start...

-after i applied my textures, i started to use obect union to bind them all together; for some reason, the uvmaps go out of whack
(What i mean by out of whack: before i 'union'ed them together, I selected all my mini-parts, and loaded up the built-in UV Editor - it looked the same as what I saw in lithunwrap. However, once they were all joined together into a single object, i noticed my textures were out of place a little, and upon opening up the uveditor, I saw some of original parts' uvmaps had extended or something, probably while it was melding them together)

What I thought might be a good solution was to actually group all the mini-groups in lithunwrap into a single group, and then export it as a single group(object). However, as far as i know, lithunwrap doesn't come with a help, and it's somewhat unsupported, due to the fact that its younger brother Ultimate Unwrap is more widely used....IN OTHER WORDS, i don't know how to join them into a single group...


any help on joining them together in lithunwrap, or better yet, prevent this mad uv growth? thanks!!!
#12
01/07/2005 (9:57 am)
If anyone's have problems with UV mapping, give U|V Cow a try(check out www.PrimitiveItch.com for details). It's much better than the current UV Editor in tS/gS, and it's been around for about 2-3 years.

Aside from that, my advice on booleans is that if you can model the geometry as easily, then model it and worry about UV's later. Booleans are not all that stable(in any application, as I hear it), and UV's will still be a pain in the butt when it comes to that phase. U|V Cow helps that a bit, but it's still a pain ;)

Just remember that when you use booleans, all the geometry and uv's get recalculated, so the changes in your textures after using booleans are because of that. UV's should be the last stage before animation, after you've made all your geometry changes.
#13
01/07/2005 (10:25 am)
@Josiah, here are my notes for LithUnwrap to put all the uv maps into one texture. But I'm going to check out U|V Cow.

I'm pretty sure that anytime you edit the meshes you're going to screw up your uv maps - especially if you're combining meshes. Like Ted explains better here, do the uv mapping last.

This gets into another discussion I've seen over if it's better to draw a complex model as a number of separate meshes or go to the work of combining them. I think the answer varies by game engine and probably model complexity but my take on it was to not worry about joining all of the component meshes into a single main mesh. For example, an antenna on a truck could just be left as a long thin cube that protrudes up from inside the truck body. You end up with fewer total polygons and the uv mapping is easier.


LithUnwrap Steps:
- save only components to be uv-mapped. Save as .cob file.
- load mesh, assign groups to first material which is the one bitmap texture
* unassign all groups, individually
* menu Select/Group mode
* menu Select/All to select all groups
* right-click first material (or appropriate) and select Assign
- arrange and scale uv as needed
- save uv bitmap
- save model as .lum and .cob
#14
01/07/2005 (11:55 am)
@Ted I've seen primitive itch's stuff before, and it looks rather neat =D unfortunately, i'm still a highschool student, so I can't really afford UV-Cow...

@Paul thanks! The only reason I'm joining them all together is that I think the dts exporter for gameSpace requires that you export only one shape at a time...unless I'm wrong, and I don't need to bind together my wings/stablizer/body/cockpit/etc.....


gonna go try your steps now


thanks everyone!

[edit]

hrmmms....well, I tried to export my model as separate parts, and it worked (with a little bit of tweaking to my names).....is this recommended?
#15
01/07/2005 (12:35 pm)
@Josiah: if you are using the version 2 of the Dark Industries DTS exxporter then you are wrong. You can export DTS shapes made from more than one mesh object. (this is how objects like the orcs crossbow are created) And each individual object can be animated. (scale, translation, rotation, etc.)

The only setup issue is to just make sure all of the mesh objects are in the start01 group and that they all have the same size value. (the number at the end of the mesh name that corresponds to you detail marker)
#16
01/07/2005 (12:39 pm)
Looks like you figured it out yourself. :)

there is nothing wrong with using multiple mesh objects in your DTS. In fact many shapes you might want to make with require you to do it that way.
#17
06/04/2006 (6:42 pm)
Im getting this error, changed all the textures in my map to the same one and checked its size was 256x256 and still getting this error =(