Page 1 of 1

Blender and Red Eclipse pipeline

PostPosted: 15 Jan 2014, 22:12
by majki
Hiya there


I would like to toy around a little with Red Eclipse's engine and start with loading static map models. I got Blender and IQM exporter working properly, I've goofed around with edit mode in RE as well. Let's assume I have cube.iqm and cube.tga texture and I want to load it into RE. How should I approach it? I noticed, that RE uses clean files structure and has folder for models as well:
redeclipse-1.4/data/models

So - quick start guide? :)

I looked here http://redeclipse.net/wiki/Mapmodels but could not find easy start up instructions. I'm not scared of console of RE ofc.

I assume I should use iqmload command, but - what's next? Where cube.iqm and cube.tga should be placed? What path I should type? What with normal and specular maps?

Re: Blender and Red Eclipse pipeline

PostPosted: 16 Jan 2014, 01:47
by qreeves
If you can't infer it by looking at the setup of the models that are already included, then it is not suggested that you mess around with such things. Information on Cube 2 models can be found at http://sauerbraten.org/docs/models.html

Re: Blender and Red Eclipse pipeline

PostPosted: 16 Jan 2014, 10:56
by majki

Re: Blender and Red Eclipse pipeline

PostPosted: 16 Jan 2014, 14:20
by Sniper-Goth
I use a simpler method:
Make a new folder inside your data/models folder.
Paste the contents of your model (the .iqm/obj/md2 etc, the skin and the normals ) in it.
Make a iqm.cfg file for it.
I use pretty low number of configuration commands, but from my experience, mlscale 400 is cube's gridsize 1, mdlscale 800 is cube's gridsize 2 and so on.
Example of .cfg that i use:

iqmload nameofthemodel.iqm
iqmskin * skin.png skin_g.png 1 1 1
iqmenvmap * ""
iqmbumpmap * normals.png
iqmpitch 1
mdlspec 130
mdlscale 1000

PS: use skin_g.png and the numbers for the glowmap of the model, if you have one.

Now that everything is configured, go ingame editing, type /mmodel nameofthefolder , and it's done.

Re: Blender and Red Eclipse pipeline

PostPosted: 16 Jan 2014, 14:44
by majki
So my model is in /models/majki/blender

file name is blender.iqm. I have assigned textures to it named XYZ in Blender. Should I rename them in RE folders to match skin/normals nomenclature? Or should they be named as in Blender (XYZ)?

My iqm.cfg:

{l Code}: {l Select All Code}
iqmload blender.iqm
iqmskin * skin.png skin_g.png 1 1 1
iqmenvmap * ""
iqmbumpmap * normals.png
iqmpitch 1
mdlspec 130
mdlscale 1000


Result:
Image

In blender it's just a plane:

Image

Re: Blender and Red Eclipse pipeline

PostPosted: 16 Jan 2014, 14:57
by qreeves
In the map config file, try: mmodel "majki/blender"

Re: Blender and Red Eclipse pipeline

PostPosted: 16 Jan 2014, 15:15
by majki
Okay loads my plane. I got problems with glowing:
Image

I suspect some problems with shader-alike stuff.

Textures used:
http://i.imgur.com/LHo4XX0.png

Notice some text in console about blending?
Image


question:
iqmskin * skin.png skin_g.png 1 1 1

what's the difference between skin.png and skin_g.png ?

Re: Blender and Red Eclipse pipeline

PostPosted: 16 Jan 2014, 16:59
by Sniper-Goth
The G stands for Glow (Nowadays i preffer to call it just glow.png, instead of skin_g.png) . That's what you use when you have a glow in a certain part of the texture of the model. If you don't plan the model to have glow, no need to add it.

iqmload blender.iqm
iqmskin * skin.png
iqmenvmap * ""
iqmbumpmap * normals.png
iqmpitch 1
mdlspec 130
mdlscale 1000

Fixed it for you.

Photo examples of what it does basically. I should had explained better :p

Re: Blender and Red Eclipse pipeline

PostPosted: 16 Jan 2014, 17:08
by majki
We are almost home:

Image

I got just this big light stain to solve :)

Re: Blender and Red Eclipse pipeline

PostPosted: 16 Jan 2014, 17:20
by Sniper-Goth
Change the mdlspec. That changes the specular of the model. Try lower values like 10 or so.

Re: Blender and Red Eclipse pipeline

PostPosted: 16 Jan 2014, 17:24
by majki
Okay - what should I do to see bumpyness? Texture seems flat now. Is there something like calculating lightmap, but for calculating normal map?

Re: Blender and Red Eclipse pipeline

PostPosted: 16 Jan 2014, 17:30
by Sniper-Goth
That's something i've been trying to figure out myself also XD
I always try to normalize the texture to almost the maximum value in the image editor. That helps for me.

Re: Blender and Red Eclipse pipeline

PostPosted: 17 Jan 2014, 01:51
by qreeves
The link I gave you tells you what channels of each texture do what. You need to make your textures according to these rules.

*skin [Masks]: "The optional M sets a texture for spec (red channel)/glow (green channel) maps as above. If E is non-zero, then the blue channel of the masks is interpreted as a chrome map. E (maximum envmap intensity) and F (minimum envmap intensity, default: 0) are floating point values in the range of 0 to 1, and specify the range in which the envmapping intensity will vary based on a viewing angle (a Fresnel term that is maximal at glancing angles, minimal when viewed dead-on). The intensity, after scaled into this range, is then multiplied by the chrome map."

*bumpmap [Normals]: "S is the path to a diffuse skin texture which is used (if specified) instead of the skin supplied with the "md5skin" command only if the user's 3D card supports bumpmapping, otherwise the skin supplied with "md5skin" takes precedence and no bumpmapping is done. These two diffuse skins may be the same. However a diffuse skin intended for bumpmapping should generally have little to no directional shading baked into it, whereas flat diffuse skins (no bumpmapping) generally should, and this command allows you to provide a separate skin for the bumpmapping case. N is a normal map texture which is used to shade the supplied diffuse skin texture."

If you ask another question about a model command which is answered by the model reference, I will close this thread. I suggest you look at the existing model configurations, and decompose the textures to see how each channel is used. We are unable to teach you how to be an artist, there are far more appropriate places to do so.

Re: Blender and Red Eclipse pipeline

PostPosted: 22 Jan 2014, 12:40
by majki
Okay - one more question. what's the size of Cube2 grid compared to Blender's one? What grid size I should set in blender to make models that will fit nicely Cube2's grid system later?

Re: Blender and Red Eclipse pipeline

PostPosted: 23 Jan 2014, 18:28
by Calinou
To disable specularity completely: mdlspec -1

To change model scale: mdlscale N (default is 100)