Gmax VT's out!
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.
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.
-
- Posts: 48
- Joined: Thu Jul 15, 2004 8:45 pm
- Location: Manhattan
- Contact:
This is INCREDIBLE! Im also using your Reno tutorials ^^.
I FOUND MY NEEW FAVORITE LEVEL EDITOR! GMax . BYE BYE STUPID QUARK! MWUHAHAHAHAHA!
FREEDOM!
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.
I FOUND MY NEEW FAVORITE LEVEL EDITOR! GMax . BYE BYE STUPID QUARK! MWUHAHAHAHAHA!
FREEDOM!
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.
Afecelis,
I D/Ld your tuts. 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.)
I D/Ld your tuts. 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.)
@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.
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.
Wonderful tutorial! Thanks a lot. Just wanted to show appriciation for your time!
Regards,
Alexander. http://sjcomp.com
Alexander. http://sjcomp.com
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.
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.
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. It's working great now. Thanks.
I agree with Morrog. You did a great job with the tuts.
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
Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
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!!
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!!
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!!! 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.
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!!! 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.