Gmax VT's out!

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Morrog

Post by Morrog »

I played around with the UV mapping in the .map file to see if I could figure out how to control it. It is indeed very odd.
Normally I'd think to see it as standard UV coords for each vertex, but it does not seem that that is so here. I even looked up the half-life specification for map files and that didn't match these map files (it matched their structure but not this UV mapping).

In any case. If you change the two 1s on each line for the object you want to modify to 0.5 you should get a UV mapping of 0, 0; 2, 2. i.e. tiling of 2.
If you change it to 0.1 it should be 10x tiling.
So:
# = 1 / tile
where tile is how many times you want it to tile and # is what you'll replace the 1s with.
I'm sure the first 1 is for X (U) an the second is for Y(V) so you can control it to do 2x on the horizontal and 4x on the vertical if you want.
I'm not sure about the numbers before those. I'm sure they control the offset or UV start, but I haven't played around with them to see. If I try to tweak them later and figure out what they do I'll make a post about my findings.
I hope that helps some people.
Stu L Tissimus
Posts: 48
Joined: Thu Jul 15, 2004 8:45 pm
Location: Manhattan
Contact:

Post by Stu L Tissimus »

Great tutorial, thanks a bunch. Level design always bugged me :D
Laptop: P-M 1.6GHz|1024MB PC2800|Mob.Radeon9700Pro|60GB

Desktop: A-XP 2400+|512MB PC3200|Radeon 9700 Pro|180GB
RayOfAsh
Posts: 56
Joined: Wed Dec 24, 2003 4:08 am
Location: San Diego
Contact:

Post by RayOfAsh »

This is INCREDIBLE! Im also using your Reno tutorials ^^.

I FOUND MY NEEW FAVORITE LEVEL EDITOR! GMax 8) . BYE BYE STUPID QUARK! MWUHAHAHAHAHA!

FREEDOM! :lol:

PS: The code is also good, very clean, and now I know how to use skybox's ^^. I was wondering how to compile a level to use them, I knew there would have to be an invisible wall, but I didnt know how to do it. Now I do ^^.

STICKY THIS!

Edit: Actually its a lot harder if you try to follow along. I have the latest version, and it doesnt want to snap to the grid, I enabled it and everything.
Image
kumppari
Posts: 1
Joined: Wed Aug 04, 2004 11:55 am

Post by kumppari »

Superb tutorial, thanks thanks thanks. 8)
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

hehehe! :D :D

thnx guys for the comments!!

I'm glad you find it useful. I also think it's a great alternative to create stuff for Irrlicht.

merry Xmas to everyone!!!
Image
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

Afecelis,
I D/Ld your tuts. :o Wow, big files. (thankfully I have dls)
First, they look and work great. Easy to follow.
Now, I'm on tut 2. I already had gmax 1.2 so that wasn't a problem. I extracted the folder Irrq3 and followed your instructions to add it to gmax. (even went over the entire tut a second time to make sure I did everything right)
It shows like it's supposed to next to help, but when I click on the link, I get the following error.

Runtime Error: Filein: Can't open file: $scripts\glb2\glbuilderv2_22gmax.ms
Any idea what would cause this? I'm not a programmer, just a builder who's learning.
Thanks for the great tuts, and I look forward to your responce. (oh, after attempting to open this, I read this thread and added the 3 new files, those still didn't work.)
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

@MikeR:

your error is in the instalation of the glb tools, right?

be careful since max-gmax scripts are very sensitive to any other scripts you have installed or run on your system. I'd recommend uninstalling gmax, registry cleaning any trace of it on your pc, and reinstalling Gmax. Then follow the GLB tools installation tutorial. I myself have had that error not with GLB but with other scripts I've tried to run and usually uninstalling and reinstalling has solved it. Gmax script gets broken specially with scripts that run at startup like mesh file importers-exporters.

let me know if it helped.
sjcomp
Posts: 1
Joined: Mon Dec 27, 2004 5:44 pm
Contact:

Post by sjcomp »

Wonderful tutorial! Thanks a lot. Just wanted to show appriciation for your time!
Regards,
Alexander. http://sjcomp.com
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

thnx!!! :D

it's very courteous of you. It was apleasure to create them and it makes me very happy to know it helped out.

:D
Morrog
Posts: 58
Joined: Mon Dec 13, 2004 5:13 am

Post by Morrog »

I figured out the UV stuff completely.

At the end of each polygon are 5 values.
The first and second are the offsets. They must be multiples of 16. i.e. 16, 32, 48, 64, -16, -32, etc.
The 3rd value is the rotation on the texture. This is likely ignored, because I can't think of a way to convert that into UV corrds (because this is converted to UV coords either when the BSP is created or when Irrlicht imports the file).
the last two values are scale, they work the way I explained earlier. The bigger the value the bigger the texture is scaled. So, let's say your texture fits your polygon exactly. If you do a scale of "4 4" then you'll only see the first 1/4 of the texture on the polygon now.

Textures are automatically repeated. This is very handy because you can stretch a wall without worrying about the texture getting messed up.

BTW I've stopped using GMax :( I'm now using Quark. The main reason being that, AFAIK, the UV coords in GMax don't get exported to the MAP file, which is a HUGE problem. Plus GMax doesn't allow entities, obviously. Oh and the lights aren't correct. All this ends up with a bunch of work outside of GMax and in SciTE being done. In Quark, I can fix the textures, add entities, add perfect lights, everything, all without touching the map file. And yes, you can use Quark without having Quake 3. All you do is "File->Save map as file" and then save it as a MAP file. Then you use the q3map2build tool afecelis found and away you go :)
Side note: Entities aren't really useful by themselves, since Irrlicht doesn't do anything with them. I'm currently using a seperate file to put my entities in, stored in XML format for easy loading. In time, however, I'll make a program to export the entities right out of the MAP file and into my XML file.
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

:oops: Ok, after re installing gmax several times, I realised I was doing one little thing wrong. I was copying the whole folder, instead of just the inside folder. :oops: It's working great now. Thanks.
I agree with Morrog. You did a great job with the tuts. :)
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
Guest

Post by Guest »

wow afecelis very very nice work

im very new to programming (apprentice atm) and im completly new to irrlicht. i watched several times on the project page and downloaded the source but i dont understand it because we are very slow in leraning OOP. But thanks to your tuts i got again interested in irrlicht. and due to my hobby, 3d modelling, your tuts were great.

first, you modeled without that GLB tool, thats good to show newbies how to work with max. but as games are low poly thingys, you could have deleted many quads which are invisible. and also imho edit poly is more effective for game modelling (well u can change always so it irrelevant)

secondly, very good and clean code. i think im understanding now a bit more. it doesnt work with my devcpp (as u mentioned sumtin about the dll) but i can read the code.

THANKS VERY MUCH and keep it up!!
Ingurum
Posts: 5
Joined: Sun Jan 02, 2005 5:46 pm
Location: Switzerland
Contact:

Post by Ingurum »

that was me btw ^^
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

whoa! many comments, thnx guys!

I was away for new years eve but now I'm back. I'm glad you guys find it useful and take the work I did further. The more tools we got to work, the better.

@Morrog: great work on your research on the UVmapping values in the map format. I'm also aware that changing hundreds or even thousands of values in a map file to change uvmapping is a pain so your alternative is also a good work-around (the Quark-Q3map2build stuff). BTW, your XML reader sounds pretty interesting, let us know of any updates on it!!!

@Ignurum: thnx, and welcome back. I'm glad you found my code easy to follow. To be honest, it's made up of everyone who has helped me out in the forums!!! :D :D but I'm glad it made things easier; that's the way I understood things better so I just added my notes.

happy new year guys! Hopefully this year I'll be able to re-take my C++ learning process and keep on creating stuff with Irrlicht.
Ingurum
Posts: 5
Joined: Sun Jan 02, 2005 5:46 pm
Location: Switzerland
Contact:

Post by Ingurum »

I really appreciate your effort u put in the tuts! and looking forward for more tuts :D

ah btw do unwrapped models work or are only tiled possible?

would love to see a tut bout character implemantation in irr, with a gmax tut ^^
Post Reply