Baking GI to textures in 3d software Created 10 years ago2014-05-24 16:36:57 UTC by Takyon Takyon

Created 10 years ago2014-05-24 16:36:57 UTC by Takyon Takyon

Posted 10 years ago2014-05-24 16:36:57 UTC Post #319515
Hello,

I want to be able to create my maps in a 3d software like Blender or Cinema 4D and bake GI light on to the textures, to then create a .WAD with these textures and then apply them to a identical mesh in Hammer. The problem I'm having is to:

A. Get the mesh from from cinema 4D/Blender over to Hammer

B. Get the UV-map for the combined mesh in the 3d software over to Hammer in order to make it easier to apply my Baked textures. I usually bake the whole map onto one big texture for the whole map and in order for the texture to be applied correctly to the whole map in hammer I would need that same UV-map that I created in the 3d software.

This could open up for some serious lighting work without the engine having to calculate a single light (except maybe some dynamic lighting), how would I go about doing it?
Posted 10 years ago2014-05-24 17:42:31 UTC Post #319516
I'm not able to help you, but this post made be curious.

How would you use baked textures in Goldsource without any sort of engine lighting? Your purpose is to not make the "engine" calculate any lights, but the fact is that it doesn't, the lighting is calculated by the radiosity program.
One solution is to have some sort of minimum ambient white lighting, but that defeats you purpose. The second solution is to not run the radiosity at all, but that means a full-lit map. This might work, but... it seems like too much hassle.
What is the catch here?
Striker StrikerI forgot to check the oil pressure
Posted 10 years ago2014-05-24 18:11:14 UTC Post #319517
My purpose isn't really to make the engine not calculate any light, rather using the 3d software to calculate all the lighting and leave the radiosity program out of it. Worked in previous tests by simply not putting any lights in the level and not run the radiosity program, which I guess is a full lit map.

The reason why I want to use the 3d software rather than any of the radiosity programs available for Hammer is simply to create more accurate lighting.
Posted 10 years ago2014-05-24 18:21:45 UTC Post #319518
Can be done, Bruce showed me a baked light example, can't tell the difference except for a very nasty thing, all models will be either pitch black or full bright because lighting is gs for models is taken from the floor where they are standing.

Ive wanted to do that some time ago its just not practical in gs the way models are lit. In source however...
rufee rufeeSledge fanboy
Posted 10 years ago2014-05-24 18:35:39 UTC Post #319519
That won't be a problem in my case since i'm only interested in making maps for one player and no other types of models like AI. The gunmodels would probably get weirdly lit, but that's not much of a problem in my case.
Posted 10 years ago2014-05-24 20:03:34 UTC Post #319522
Then its pretty easy, make your own textures with lighting baked on them apply and you are done. Importing geometry into hammer could be a problem though, you need to convert you meshes into CSG and a hammer acceptable format, if you manage to do that then comes the compile issue, since the compilers don't like curved and meshy geometries much you might end up with crap looking things i can't describe (had an image somewhere).
Maybe a new sledge version might support importing from 3D editor formats someday :)
rufee rufeeSledge fanboy
Posted 10 years ago2014-05-25 00:32:48 UTC Post #319525
Another thing to note is that the Radiosity simulator included in Vluzacn's Half-Life Tools is actually really accurate and good looking - if you use that and then have a low texture scale (with appropriate high-res textures to match it) you can get really good results!

Hammer doesn't really do UV mapping quite the same way as, well, any modelling package I can think of, and to bake lighting in that way instead of doing lightmaps would require quite a lot of very similar textures, which would greatly reduce performance, increase load times and file size, and maybe even prevent the map from compiling properly, depending on just how many you use.

I can't really think of a proper way to do this the way you want, but I wish you best of luck in finding one, if Vluzacn's tools aren't up to what you want!
Notewell NotewellGIASFELFEBREHBER
Posted 10 years ago2014-05-25 09:57:03 UTC Post #319529
rufee: It's not quiet that simple if I'm not missing some texture apply feature in Hammer. For example, say that I created this rather simple object and lit it with GI in my 3d software: http://i.imgur.com/rh7l37v.png

I then bake the whole object and end up with a baked texture that looks like this: http://i.imgur.com/4f9zEsw.png

Just applying the texture to the same geometry in Hammer would not work since there's no UV-map options in Hammer that I know about. The manual way around it would be to create a baked texture for each face of the object and then apply them to the faces separately in Hammer, but that would take ages.

JefMOD: Thank you, I'll have a look at that radiosity program. Also thanks for the clarifications regarding UV maps, one way I can think of around this is to make a small portion of a corridor, bake GI to the faces and then edit the texture in photoshop to make it seamless, allowing for multiple iterations of that same portion of corridor.
Posted 10 years ago2014-05-25 13:19:36 UTC Post #319532
Like this?
User posted image
User posted image
I experimented with this a lot in the old days of the 6D project. You can't really go all 3D package for it. However, you can make your structure in Hammer and export to .DXF then bring that into your 3D program. You also can't do the whole map. It works best in smaller sections that are easily controlled. You can then texture and broadly light the geometry and extract the textures and place them into a wad, then apply the wad textures to the original geometry in hammer. I would stay away from direct lighting since it could be drawn anywhere. GI and AO stuff works wonders for this. For the direct and ambient lighting, a little bit in hammer and with the RAD goes a looong way.
Rimrook RimrookSince 2003
Posted 10 years ago2014-05-25 16:11:32 UTC Post #319534
That is pretty much the only way, there is no UV map for hammer. It can be done, its just not practical.
rufee rufeeSledge fanboy
Posted 10 years ago2014-05-25 18:24:40 UTC Post #319541
Rimrook, that's a very nice looking map. Where is it from? And thanks for the .DXF tip, will be very handy.

A cheap way of creating an AO looking effect that I just thought of is creating black-transparent gradient decal and apply them in corners, haven't messed around with decals at all yet though so i'm not sure if it's possible.
Posted 10 years ago2014-05-26 00:07:51 UTC Post #319554
Its from and old mod that didn't go anywhere.

It's cheaper to use textures for that still. The latest builds of RAD are really good and even though AO is nice and all, using only AO looks pillowy and fake.

May I ask why you want this? Are you more comfortable texturing in a 3D software? Normally people want crossover stuff tend to want better geometry and construction tools.
Rimrook RimrookSince 2003
Posted 10 years ago2014-05-26 08:36:57 UTC Post #319555
Mainly just to give more control and allow for heavier setttings when it comes to lighting, but I find modelling alot easier in Blender and Cinema 4D as well.

I'm pretty impressed by Vluzacn's RAD program however so baking GI to the textures by external means might be unnecessary.
Posted 10 years ago2014-05-26 15:28:29 UTC Post #319566
You should check out Sledge since it can import .OBJ files and they turn into a pretty decent tetrahedron mesh.

EDIT: yeah like this. No errors too.
User posted image
I think us 3D software guys eventually wander into the crossover stuff from time to time. I know I have and I'm quite pleased that our very own Penguinboy made it a little easier for us.
Rimrook RimrookSince 2003
Posted 10 years ago2014-05-26 18:28:52 UTC Post #319568
I'm beginning to grow quiet fond of Jackhammer but I'll take a look at Sledge, could be usefull for .obj to .rmf conversion at the very least. Another tool that works for cinema 4d is this: https://code.google.com/p/c4dqmapex/
Converts mesh to q3 .map formats which I'm able to open and compile in Jackhammer, although I've only made a couple tests on simple primitives.
Posted 10 years ago2014-05-27 05:29:48 UTC Post #319573
Wow such pretty Rimrook!

I want to try JackHammker too, but the fact it isn't open source(Is that still the case, Idk?) i don't like.. Still, very intriguing!
Captain Terror Captain Terrorwhen a man loves a woman
Posted 10 years ago2014-05-28 14:38:34 UTC Post #319581
Hmm, I'm either doing something wrong or I'm simply trying something that the compiler can't handle in any shape or form. Here's an .OBJ with the mesh i'm trying to compile: https://www.dropbox.com/s/zd2ta7r48f78kbp/SplineHull.obj

It's pretty big so it might need scaling before opening it in Sledge, all faces are quads. Will obviously require some other kind of "encapsulation" before compiling, but I didn't include that as I'm not sure how to do it the correct way with this mesh.

Any ideas? Or does any one have another method of doing what i'm trying to do? Basically create a long(!) curvy hallway with the use of splines and sweep nurbs in other 3d software.

Edit: Or in sledge for that matter, the "torus" and "arch" default brushes almost does what I want them too, the problem is that there's no option for start and end radius, which means you can't make flat horizontal spirals.
Posted 10 years ago2014-05-28 16:10:05 UTC Post #319583
You could scale the vertexes inward as it goes along.

When I import objs from 3ds max, the mesh in sledge is exactly 100x bigger. I export with with a smaller vertex scale of 0.01 to make it match with sledge. That's for 3ds, i suggest making a 8x8x8 cube and exporting it and seeing how big it is in sledge, then export with an adjusted vertex scale as needed. It takes just a moment to find the difference.
Rimrook RimrookSince 2003
Posted 10 years ago2014-05-29 19:46:35 UTC Post #319599
I'm still having problems compiling hexagon tube walls, they usually compiles when inside an "airtight" box but they become very leaky in general. Here's what it's suposed to look like:
User posted image
But this is what it ends up looking like:
User posted image
(used square tube in these examples just to be able to compile the correct way. Red is the "void".)

This is with imported .obj meshes. I suspect that it's the conversion to tetrahedron mesh that causes the issues in this these instances. An option to keep the original mesh on import would be great, since sledge normally can compile this kind of mesh created via the torus and the arch presets without any problem.
You must be logged in to post a response.