Due to the modo thread, I quickly added a texture painter to luxinia's resource viewer. You can paint into any texture loaded (very basic painting). The main benefit is that you can work with real-time shaders texture matrices in teh materials and so on. Saving to files is supported for TGA and JPG.
painting into the normalmap
more info here
http://luxinia.de/forum/viewtopic.php?t=106
I wont have time to do nicer features within the next 2 months, so no time for real improvements. but anyway maybe it's useful already.
Replies
the shader system allows a some hardcoded options, but also use of custom vertex/pixel shaders, hence no real limits, so yes you can do object space normal maps, too. It's oldschool ascii stuff, like q3 shader stuff, but some day a graphical editor will come, too.
edit
some more info,
the painting currently bleeds over texture seams, hence it makes most sense only for terrain stuff (that is what Eric needed afaik).
in march I want to redo it a bit, and give more control: like masking uv chunks (you can select connected uv elements and only within them is being painted); projective painting; faster painting; more blendmodes (additive, modulate, not only decal); painting into the 2D image (zoom,pan... of the 2d view); until then this more or less serves as a quick sample/test
you will find it here http://luxinia.de/forum/viewtopic.php?p=463#463
did a testrun with a setup you wanted. (no lightmap applied hence full white).
To answer the question from the other thread: to get luxinias modelviewer loaded you must start with
"luxinia.exe -v" (just make a shortcut or so). Best is you throw your stuff into a dummyproject directory (projects/test) and set it as project directory either before the viewer is started or within it
"luxinia.exe -p projects/test -v" would do it before.
by the way the sample does not use separated texcoords, but in the shader you could just add "texcoord X;" to a Texture Stage. It's coder's numbering so UVW channel 1 in max is texcoord 0
For some reason Texture 3 (the multiplied lightmap) is being flipped on its V axis.
Fixed this by adding texscale (1,-1,1); to the MTL, then pressing Reset Materials. Nice feature.
Is there a hotkey to toggle fullscreen? Mouse is stuck within the window (for good reason I see). Maybe a hotkey to toggle mouse focus (we use backspace)?
The 'B' hotkey for paint mode is great, also being able to use right- and middle-mouse to translate the camera while in Paint mode.
Definitely a useful tool. Thank you so much for coding it up. Will be donating to your paypal soon CB!
about the mouse, it's a general problem with the library we use for event handling, friend will fix it some day
oh yeah a toggle fullscreen button is missing, meanwhile you could do console (F1) and enter "window.fullscreen(true) window.update()" you can also change window resolution that way (once you enter window you will see a list of possible commands to the right). ugly to use console but I forgot about an option for it..
glad it's useful in its simple state already
When I choose Land = USA, I get "Geben Sie einen Betrag größer als Null ein."
I can't read German.
Bug 1. Yes, the TGA is flipped (vertically) in the preview window. It is a 24bit uncompressed TGA saved by XNView.
Another couple bugs, minor things I can work around...
Bug 2. I've assigned a Multi/Sub-Object material to the terrain. Two IDs, each with an empty diffuse Bitmap, one named terrain.mtl and the other named road.mtl.
Terrain.mtl is the example you provided, but the 2nd ID's Road.mtl and 1tex.shd I created myself (probably wrong!):
<font class="small">Code:</font><hr /><pre>
luxinia_Material_v100
Shader{
SHD "1tex.shd";
}
Texture:0{
TEX "road.tga";
texscale (1,1,1);
}
luxinia_Shader_v300
Technique:VID_ARB_V{
Texture{
TEX "Texture:0";
}
}
Technique:VID_DEFAULT{
Texture{
TEX "Texture:0";
}
}
</pre><hr />
I looked for an example shader with a single colormap in it, so I edited \luxinia\projects\demos\shaders\litparticles.shd since it seemed the closest to what I needed.
Anyhow the problem is, the 2 material IDs come in separated in the viewer. The materials look correct, but mat ID2 (road and coastline) is separated from mat ID1 (land).
3rd bug is when I attempt to view a 2x2 TGA. I'm using this image in the road.mtl. As soon as I choose the 2x2 image from the bitmap dropdown list, Luxinia freezes. Divide by zero?
1) ah good what I expected, some tga format issue, will debug it some day
2) the shader is okay, however when you just assign a single texture you dont need a material at all, you can just straight assign the jpg whatever as diffuse map in max (just make sure the mapname matches the filename, normally this is done by default on export, but when you already gave the map a name containg a "." it is interpreted as filename)
the reason they are moved worries me more, I will test it, likely is I screwed something up in the export with multi-materials, as I hardly ever used them. as workaround dont use multi-materials and detach yourself.
3) edit: fixed it
---
a question about the normalmap shader you want (since I need to actually write the vertex/pixel shaders by hand now, I need more info).
as I mentioned only texcoord 0 will have correct tangentspace. (make sure to check the option on export)
assuming the following
texcoord 0 = tiles (color & normal)
texcoord 1 = mask, emissivemap
do both tiletexture use the same texture matrix (same scalings) ?
If I'm using the material texscale params to tile each colormap (7.5,7.5,1), doesn't that mean I could adjust each of their normalmaps to use the same tilings? How do I tell Luxinia which Max uv channel to use? AFAIK, I'm only using the first one for everything.
Is is possible your shader might prevent me from using different tiling amts for each normalmap? I'm thinking of other terrain pieces where the two bitmaps are not tiling the same amounts.
<font class="small">Code:</font><hr /><pre>
Texture{
..
texcoord 1; # would use UV channel : 2 of max, default is 0 > 1 in max
..
}
</pre><hr />
about the scaling thing, I will just use texture matrix for both tiles individually, but not for emissive and mask, it is msotly an optimization issue. You wont need to specify the scalings for the normalmaps, they will just use the same their colormap had.
the multi-material thing is definetely broken (even worse for my test), comes from not testing these things too often, as most data is exported from cinema4d by friend.
dont expect this to be fixed soon by me, as it probably is a larger bughunt.
---
I updated the tutorial on the luxinia forum
here is a sample shot (put a yellow dot into one tile to show off its different normalmap).
The shader contains one tweakable for how strong the normals should be.
the shader now assume uv channel:1 for the tiles
and channel:2 for the mask/colormap
...
out of curiosity why do you need multiple uv coords ? do you relax the "inner uvs" of a terrain chunk ?
Terrain is divided into tiles. The detail diffusemaps/normalmaps have to tile evenly across the surface, so neighboring tiles will be seamless. The multiply colormap and the mask are not tiled, they fill the whole UV space, but since they have discontinuous color on opposite sides, I have to pad the edges with 4 pixels all around, then shrink their UV set down .98,.98, to prohibit them from sampling their opposite sides. Make sense?
Our coders are dealing with other, more pressing things these days. Might be a little while before I get more shader support, so I have to make do with what I have.