Level making, building reusable assets.

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Level making, building reusable assets.

Post by serengeor »

I want to make some reusable assets for my game, something like Brainsaw has in his "Stunt Marble Racers" game.
So I taught I could do a model for every asset and export it to .x or .obj format.
Also to texture them I would use UV mapping.
Then I would load them up in for example irrEdit and build a level from them.

This should work out I think?

Oh and what about alignment of textures? when UV mapping some objects sometimes I have to stretch out the textures in order to place them correctly, but then the objects wouldn't align well, any tips or tutorials on that would be welcomed :wink:
Working on game: Marrbles (Currently stopped).
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

Tips... not much, actually, keep the texture amount to a minimum, you can use multiple textures on an object, but that translates into multiple drawcalls.

In a nutshell: 1 meshbuffer = 1 material = 1 drawcall. So, it is a good idea to merge all the objects of the same type (i.e. the copies of a single object) into a large mesh. When i mean material, i mean the set of textures and shader together, not only the shader. If you change a texture, that is another material.

Perhaps, you could create a scene in irrEdit which had all the copies of the assets on their own, so you can edit them at any moment, but that in runtime, the copied objects were merged into a single large mesh to gain time.

with regard to the texture alignment i don't understand what you mean when you say that you have to stretch the textures.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Mel wrote: with regard to the texture alignment i don't understand what you mean when you say that you have to stretch the textures.
Well lets say I want grass to cover top of each asset(straight road,corners, etc.), sand for the bottom, and for sides I would use texture that has grass on top and sand on the bottom , what I did is unwrapped every object and put up a texture on them, but every object is different in size, and faces of one object get smaller when unwrapped, so when I save it for editing with gimp I have to scale my grass texture unevenly because of uneven unwrapping.
So when those objects connected in irrEdit you can really see the difference.
Working on game: Marrbles (Currently stopped).
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

I think i get it more or less... i don't know. There are many mapping tricks. You can use several textures when you need to adjust diferent texture resolutions and sizes. In MAX you can use real world size for the mapping coordinates. (you can't unwrap them after, though)

If you are merging diferent pieces, the simplest way so you can avoid texture mapping misalignments is to use, for example, a fixed size piece of terrain, which has the textures aligned correctly, and on top of that, build more assets, like roads, paths, or other stuff which are also aligned on their own, so you can merge them, and everything lies in place. Like a tile based engine. in the 2D games.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

hm, one more thing.
I'm using blender, do I need multiple vertex groups in order to apply multiple materials to one object? I tried just assigning materials to faces, and it worked in blender but no texture showed up in mesh viewer when I exported it to .3ds or .x
Working on game: Marrbles (Currently stopped).
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Post by 3DModelerMan »

For lining up the textures. Just set your grid sizes to power of two numbers. That way you know the proportions when you make the textures.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

3DModelerMan wrote:For lining up the textures. Just set your grid sizes to power of two numbers. That way you know the proportions when you make the textures.
What, where?
Sorry I'm new to modeling so I really have very low experience with blender :/
Working on game: Marrbles (Currently stopped).
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Post by 3DModelerMan »

I mean set the grid size in photoshop or gimp or whatever you use to a power of two number, like 64x64, or 128x128. And set the grid size of your modeling software to a power of two also, then you can match up models and textures easier.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

3DModelerMan wrote:I mean set the grid size in photoshop or gimp or whatever you use to a power of two number, like 64x64, or 128x128. And set the grid size of your modeling software to a power of two also, then you can match up models and textures easier.
Oh.
Well I'll try work it out somehow, thank you for your suggestions :wink:

EDIT: Ok I think I've learnt how to use UV mapping in blender thanks guys, my textures now align well in irrEdit:
Image
tough my modeling skills aren't so good, but still :)
Now I can use these to make levels instead of cube nodes :D
Working on game: Marrbles (Currently stopped).
Post Reply