Smooth shaded vertex-lit shader - how?


(G0-Gerbil) #21

well eachg shroom currently has around 36 polygons (12 sided, top and bottom surfaces of the top, and the stem is a cone with the tip buried in the top gflat bit).
I don’t mind high polygon counts where it matters - the 6 sided ones looked decidedly crap once I realised I needed them to be a lot bigger or there was no point in having them.

But the problem is still to make them smooth shaded :confused:


(Detoeni) #22

You still not got the small ones to work?

Im compiling me map atm, once its done I can make up a few diffrent types if you like, it wont take me long.

Here’s one I made earlier.


(CooperHawkes) #23

tried myself and got these two (the right one has insane polycount ;-)):

download my crappy map sources + ase here (sorry, I was too lazy to add min/maxcoords):
http://www.vis.uni-stuttgart.de/~rose/stuff/maps/mushrooms.zip
both mushrooms are based on the same source map… I just changed the subdivisions… yeah, I know, you don’t like it… I do :stuck_out_tongue_winking_eye: It simply allows you to create various levels of details very fast. The only bad thing is the high polycount of the bottom side of the hat :-/


(Detoeni) #24

Been having fun here, my mushy worked fine, untill I put a second one in that cast a shadow on the fist. Then it looked a lot like Gerbils pics above.

So I added this shader:

textures/mushy/orange_a
{
qer_editorimage textures/mushy/orange_1.tga
q3map_nonplanar
q3map_shadeangle 120
surfaceparm nomarks
surfaceparm pointlight
implicitMap textures/mushy/orange_1.tga
}

and got:

edit
Done somemore testing

Add:

q3map_lightmapSampleOffset 4//or 8

if using strong direct lighting.


(G0-Gerbil) #25

Heh I’ll go over everythjing later on today, thanks for your help guys - didn’t realise shrooms would get you all so enthusiastic!
With this I hope to have the caves wrapped up today if I get the time \o/


(G0-Gerbil) #26

cooperhawks - is that texture available to use? :slight_smile: I just knocked up some in photoshop quickly because I thought ‘they are small, no-one will really care’ but everytime I use 'em they get bigger :slight_smile:
To both - you are creating them as patch meshes and converting to ASE then I assume? That’s the route I’ll go down now methinks.
I don’t expect particularly reasonable shading on the stems, because the tip is embedded in the cap, and the base will probably be in the floor = no light = black, but the cap should look fine indeed.


(G0-Gerbil) #27

If you had made them from smp’s, collapsed down to single and dubbel poly’s, which are then welded with bobs tools and set the textures using “cap”. This would mean all the curves are welded, and the texture is projected from one direction. This would give you the three smooth groups that you need and make them light right.
I re-read this one Detoeni, and I can’t really make head nor tails of it. I don’t use bobtoolz and I have no idea what an SMP is specifically? :slight_smile:


(G0-Gerbil) #28

Hmmm can’t seem to lower that subdivision - even with:

[EDIT] doh - that’s because the parameter is not -subdivisions but -subdivision.
Why doesn’t q3map2 have a spell-checker? :smiley:

Anyway, going to try like this, it looks more promising going over the shroom ASE file in a text editor, they are all grouped nicely.


(CooperHawkes) #29

I just used
textures/temperate_sd/rocky_sand.tga

… well it should be used for terrain, but I think it does a good job as mushroom surface, too :wink:
(EDIT: it seems that you use the same or a similar texture in your caves… so maybe choosing this texture for the mushroom wasn’t my best idea ever ;-))

and my mushy stems need some work… too straight… so you need to put a little effort in them… or just use Detoenis nice fungi =-)

v51, I do so

BTW: in case you want to convert an ase to md3: I usually build the ase from brushes, then i put the ase in an empty map and build another ase out of this… why this two stage ase-ing? the first ase contains many uncoupled surfaces which are welded automatically in the second ase compile. This way I find it easier to handle them in MD3Compile


(CooperHawkes) #30

oops… I am sorry for the inconvenience :frowning: I was quite sure about the “s” :-/

and I guess Detoeni wanted to type SPM (simple patch mesh)

BTW: your crystals are friggin’ awesome!


(G0-Gerbil) #31

No the ‘doh’ was mine, as soon as it didn’t work I should have searched for it on here, would have told me in a minute!
Am about to try out the SMP version now :slight_smile:


(Detoeni) #32

umm spm,er… yes…oops,sorry

bobstools are all on the third tool bar in radiant. two red arrows ponting inwards is weld patchs.


(G0-Gerbil) #33

BTW maybe I misunderstood about ‘subdivision’ - it appears it’s not a ‘fixed’ amount but dynamic. Naturally a subdivision of 2 will produce twice the detail of subdivision 1 but subdivision 1 doesn’t create a constant subdivision - eg my stem has half the polies of the cap.
Oh well, I live and learn - and apologies to Detoeni since above I stated he and I shared the same ‘correct’ point of view. Mine is wrong and he probably knew this beforehand!


(G0-Gerbil) #34

bobstools
Am I the only one who reads that and either thinks bob has toadstools, or he had to supply a specimen for the doctor? :wink:


(G0-Gerbil) #35

OK smooth shrooms are a go!
Thaniks everyone for your help, much appreciated. Funny how much that flat shading annoyed me - I’d rather have deleted them all than keep them in like that…


(CooperHawkes) #36

subdivision is some sort of error measurement… subdivision 4 means: subdivide the plain face if the maximum distance to the curved / smooth surface is more than 4 units (or something like that)… therefore the number of polys is increasing with lower subdivison values (i.e. lower error bounds) as you must subdivide more often to stay inside the smaller error offset to the smooth patch surface.

this said the result will depend on the size of your structure… if you build a huge cylinder it will be subdivided more often than a small cylinder (when using the same subdivision or error setting).

(I made some minor changes to my last two posts… just want to make sure, you catch them ;-))


(CooperHawkes) #37

now that you mention it… :eek3:
the digibob will hate us for this comment :bash:


(G0-Gerbil) #38

:smiley:

Anyway thought I’d show progress. The 'shrooms have been put to bed (in design at least - possibly I’ll stick more in the map) and look pretty nice I think, so here’s a few pics:


I did use ‘your’ texture in the end cooperhawkes, but tweaked it slightly (basically removed most of the shading to make it a bit flatter), so nice one on that :slight_smile:

Again, thanks guys - it’s annoying to be a perfectionist and be held up by something seemingly so obvious (and indeed it was, but that just makes me more silly for not realizing myself what the prob was!). Credit to you both going in the readme for the final release (due soon now thankfully).

More in the other screenshot thread here: http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=11308


(Jaquboss) #39

Dreamy map , crystals must look great in motion ( if it isnt gimmick but stage with tcGen environment )
BTW: , that will make posts better readable and less spammy…