This topic is 2 pages long:   1  2  |
Author Topic:   Something new
Lithium
Member
posted March 14, 2001 05:24 PM         
Updated the tool: http://www.geocities.com/uvmapper

What's new:
I removed the DX8 hardware requirement. All you need now is Windows to run it.
If preview mode is not available, you still will be able to load, edit, and
save UVs.

I also added an OpenGL renderer. It works like 3D exploration where you can
toggle between DX and GL while in preview mode. One thing I noticed, is that
OpenGL seems to run faster than DX on my machine, which was a surprise. If
you want to know if you are getting hardware-accelerated OpenGL, look at the
driver description under the About... menu. If you have an old 3D card,
OpenGL might use software-emulated rendering instead.

By default, both renderers use different coordinate systems, so the view will
change when toggling renderers, but I plan to use one system for both renderers
later on.

If you don't have DX 8 hardware support, you won't be able to load JPGs, PNGs,
or TGAs because I rely on a DX function to do that, but BMPs can still be loaded.
In the future, I may look into using a free graphics library to totally remove
DX dependence.

BTW, if anyone has an old Voodoo card, let me know. I dynamically load and
choose between 3 different OpenGL DLLs at runtime (3Dfx,SGI,MS), so it may
support V1/V2/Rush 3D cards as well.

[This message has been edited by Lithium (edited March 14, 2001).]

IP:

peeeto
Member
posted March 14, 2001 05:53 PM         
Lithium, you're too cool!

IP:

JVortex
Member
posted March 14, 2001 06:41 PM            
right on and woo and hoo and stuff! great program that just keeps getting better.

------------------
Let the rocks roll and the battle commence. BZ The RPG. Check out the site! (Under Heavy Construction)


IP:

JVortex
Member
posted March 14, 2001 11:52 PM            
Uh Oh... Found a glitch (or something anyhow)

While using the DirectX rendering everything works just fine and dandy, but when switching to the OpenGL the model is previewed backwards!

As far as I can tell everything is exactly mirrored, including the texture. I refer to it as a glitch because it doesnt really seem to be a problem, it's just rather odd.

on the positive side however the DX rendering seems to be smoother in this version, less choppy when rotating.

------------------
Let the rocks roll and the battle commence. BZ The RPG. Check out the site! (Under Heavy Construction)


IP:

Lithium
Member
posted March 15, 2001 12:26 AM         
Yep, DX is a left-handed coordinate system by default, and GL is a
right-handed coordinate system by default. I left them alone for now,
so you will see the views change when toggling renderers. The main
difference between the two is that the z-axis points in the opposite
direction.

The reason I left them alone for now is that I already tried to convert
one to the other, and it didn't come out the way I wanted. So, I left
them alone for now and I will try it again some time later.

BTW, which renderer is faster for you, GL or DX? Try loading up a model,
maximize your window, and rotate the view as fast as you can. For me,
GL beats DX, no contest. DX jitters, while GL is very smooth.

IP:

Rex R
Member
posted March 15, 2001 01:48 AM            
oh that explains the difference between TM and revolt(and zmod etc) tm uses right hand coordinate system

IP:

JVortex
Member
posted March 15, 2001 03:40 AM            
I just tried the rotating the render test and had the exact same results with both modes. both are smooth as can be regardless of how fast i fling the mouse around.
im running a 733 Mhz with 128 megs of RAM and a wimpy little 4 meg video card if it matters.

------------------
Let the rocks roll and the battle commence. BZ The RPG. Check out the site! (Under Heavy Construction)


IP:

Lithium
Member
posted March 15, 2001 02:05 PM         
Load the largest model you can find until something breaks.
Or if you don't have anything, try saving a high poly model, then merge
it into the program a couple times to bump up the poly count.

IP:

JVortex
Member
posted March 15, 2001 04:32 PM            
Duh, of course i should do that with a larger model... ok, well i did. and i still have pretty much the same results. the DX is just a very little bit choppy and i think that the GL is a bit choppier than the DX. they are so close to the same its hard to tell tho.

Verticies: 22474
Polys: 21240

------------------
Let the rocks roll and the battle commence. BZ The RPG. Check out the site! (Under Heavy Construction)


IP:

Lithium
Member
posted March 16, 2001 06:33 PM         
Is anyone experiencing mirrored textures? I've noticed that some textures
are mirrored in DX or GL, depending on if you loaded if from file, or you
used some kind of uv mapping. If you use textures that have text written
on them, you can see these more easily. I'm looking into fixing it.
I don't know if this is just a visual bug, or if it affects the UVs that
are saved to file. I guess a simple solution for now is just flip them
if they are a problem.

IP:

Lithium
Member
posted March 16, 2001 10:48 PM         
Ok, this might be useful info. All mappings are created to be right-handed.
This is compatible with programs like Tread Marks, MilkShape3D, and LightWave.
So LUVs are writtenly correctly. What you see in preview mode with the DX
renderer is wrong. To see your model properly, you should probably use the
GL renderer for now.

Some games like Revolt, I think use a left-handed system, that's why
the texture looks correct when using a DX renderer. You can see the text
on the car written as it should. But in GL, the text looks mirrored, which
is wrong. So if you try to save a Revolt model to a OBJ file, and load it
into MilkShape3D for example, the texturing will probably look mirrored.

IP:

Lithium
Member
posted March 17, 2001 12:10 AM         
But then again, I'm not convinced that is entirely correct. Why should the
handedness of a coordinate system affect the uv mapping of a model?

Conversion from right to left coord. systems is just negating the z axis.
So, if the z component of the model's vertices are negated, then the model
will be flipped across the origin if it is centered at the origin. But the
texture coordinates will be mirrored incorrectly. So to get the texture
coordinates back to the right vertex, the x component has to be negated
as well to rotate the texture coords. around 180 degrees to get it back
to the right vertex. Or something like that.

Don't know if I should just leave it alone or not.

IP:

JVortex
Member
posted March 17, 2001 01:37 AM            
too technical for my blood...

------------------
Let the rocks roll and the battle commence. BZ The RPG. Check out the site! (Under Heavy Construction)


IP:

Lithium
Member
posted March 17, 2001 02:35 PM         
I guess there's one good thing about adding OpenGL. The program should be able
to run on WinNT I think. Which is something DirectX 8 can't do (I think .

IP:

peeeto
Member
posted March 18, 2001 10:38 PM         
Lithium: if you look at some of the default texture bitmaps in TreadMarks (like for the Dwarf tank), you'll see that test is written backwards on them as well - so, methinks your UnWrapper is working correctly, for TreadMarks anyways...

oh, and opengl works great on a 32-bit display.

users note: to make it easier to texture your models with text, flip the polys you want to write on horizontally first.

IP:

Lithium
Member
posted March 18, 2001 11:07 PM         
That's only in the DX renderer for you, right? If you use the OpenGL renderer,
they should be written correctly (not backwards). This is what Tread Marks uses.

IP:

peeeto
Member
posted March 19, 2001 08:55 AM         
i haven't used UnWrapper in a way that i can tell, Lithium...

but if you look at the file
C:\Program Files\Tread Marks\art\textures\tank25.bmp
you can see that the word "DWARF" is backwards (and upside-down).

note: i just noticed that the words "WOULD YOU LIKE A PIECE OF TOAST?" on the texture bitmap are not reversed - so i guess it just depends on how you set up your UV mapping... i'll have to re-check to see if you have to flip the polys in order to easily paint words on the textures...

BTW, the DX renderer renders a mirrored view of what you would see in the game TreadMarks. the opengl renderer renders it "correctly".

Lithium, if you wanted to add this option for support of different-handed coordinate systems (and you worked the bugs out), maybe you could include the option to switch from RHS to LHS coordinate systems. then i guess for RHS coordinate systems, the opengl default system is OK and DX view would have to be mirrored, and visa-versa for LHS coord. system.

IP:

Kaeto
Member
posted March 19, 2001 09:04 AM            
Lithium - I don't know about DX8, but under OGL, shouldn't it be simply a matter of using a scale matrix that inverts the mesh in the right direction, and telling OGL to cull frontfaces? That way, all your model data is left alone, you're just changing a few OpenGL states.

IP:

Lithium
Member
posted March 19, 2001 07:10 PM         
I'm going to leave it alone for now. I'll let the user decide what they want.

IP:

peeeto
Member
posted March 19, 2001 08:12 PM         
hey Lithium - is the .ini file supposed to store the options i set?

i turn off the grid & axes every time, but they are back after i quit & run UnWrapper the next time...

i don't think that the background color is stored, either...

IP:

JVortex
Member
posted March 19, 2001 09:01 PM            
i have noticed that as well, the grid is great, but shouldt have to shut it off every time. i was also wondering, do you have any plans for adding in a MRU list?

------------------
Let the rocks roll and the battle commence. BZ The RPG. Check out the site! (Under Heavy Construction)


IP:

Lithium
Member
posted March 19, 2001 10:41 PM         
Ah, finally something easy to do requested.

The ini file only stores a couple options, and all the options listed under
the Preview Mode are not saved, but could be easily added. And a MRU list
could easily be added as well.

And I did notice that the GL renderer background does not change its
color, but I recently fixed it.

Kaeto:
I think I know what you are referring to and I could try it.

From a OpenGL FAQ:

9.150 Can I make OpenGL use a left-handed coordinate space?

OpenGL doesn't have a mode switch to change from right- to
left-handed coordinates. However, you can easily obtain a
left-handed coordinate system by multiplying a negative Z scale
onto the ModelView matrix. For example:


glMatrixMode (GL_MODELVIEW);
glLoadIdentity ();
glScalef (1., 1., -1.);
/* multiply view transforms as usual... */ Camera
/* multiply model transforms as usual... */ World

[This message has been edited by Lithium (edited March 19, 2001).]

IP:

JVortex
Member
posted March 20, 2001 03:13 AM            
glad to know it was something easy. heres another one for ya. the collapse and expand features are great except for one thing. i apparently didnt understand how they worked before i used them. i layered my barious bits then colapsed and stuck them over on the side. when i was all done and ready to start placing the selection groups i discovered that i couldnt expand them, all that happened was they jumped back into the middle of the screen... i was very sad. how exactly does the expand and colapse work? or is this a glitch?

------------------
Let the rocks roll and the battle commence. BZ The RPG. Check out the site! (Under Heavy Construction)


IP:

Lithium
Member
posted March 20, 2001 02:44 PM         
Yep, that's how they work. If you want to work on parts of your model,
while leaving other parts alone, then one option is to separate your
model into groups (using your 3D modeler) and hide them in UnWrapper so
they are not visible.

As for collapse/expand, these are cool functions. Collapse/expand are
just scaling functions. Expand scales the selection to its maximium,
UV coords. 0,0 to 1,1, and collapse scales the selection to a point.

You could also use collapse to weld UV coordinates together. But once
you have collapsed all points into one point, then there is no way to
get them back unless you Undo it, or apply a new UV mapping.

IP:

JVortex
Member
posted March 21, 2001 04:12 PM            
oh, ok, well thats what i thought they would do, but they didnt work that way. collapse worked fine but expand would only move the collapsed point to the middle of the screen. i was also working aon a large model however, something like 3,000 pollies or so. i wondered if that might be y i couldnt expand them. dont know.

------------------
Let the rocks roll and the battle commence. BZ The RPG. Check out the site! (Under Heavy Construction)


IP:

This topic is 2 pages long:   1  2