Some basic questions

Started by Sky-High, March 06, 2013, 12:36:05 PM

Previous topic - Next topic

Sky-High

hey there,

Got some basic source and WWMT questions:

I have used following slots from my material:
diffuse, spec level, self-illumination, bump and reflection.

1. What element name should i pick for self illumination and reflection in render to texture?

2. When I want to implement my succesfully compiled model into csgo, do i need to provide the vmt and vtf's for clients to download(downloadstable) and do i need to precache them?

3. After exporting the vmt's and vtf's: for the VTF's i always have a double vtf, 1 that ends with .pwl.vtf and one .vtf. Whats the diffrence between these 2?

3. if the answer to question 2 is yes: do i need to add the pwl.vtf files to or is adding the .vtf files alone sufficient?

greets,
Sky-High

wallworm

I can't explain them all at the moment very deeply. For reference see the texture docs which I quickly updated just now to fix a few errors. I have updated the tool a lot though and the charts and docs are missing some information.

RTT doesn't do reflection (off the top of my head). I currently don't have an auto-export of a cubemap for a specific VMT but you could probably manually do it by making a small dimension sky with Sky Writer and then editing the VMT and moving the sky vtfs. I generally just use the SpecularMap in the Specular Level slot of the material to mask the intensity of reflections and check the Reflection checkbox in Material; the WW VMT exporter will then add "$envmap  env_cubemap" if you have the reflection map checkbox turned on... which then gets the reflection from the nearest cubemap in game.

For self illumination, you may try using the LightingMap.

One thing I do for self-illum is create bitmaps using this feature: Rendering > Render Surface Map > SelectionToBitmap . This way you can select faces on your geometry and create a mask for this.

For the VMTs and VTFs, the files do need to be included.

I do not know the specific reason for the PWL files. I think Gulli (K@rt) mentioned they might be for console games. In any event, the WW asset packing functions ignore those files. I usually delete them.

Sky-High

Quote from: wallworm on March 06, 2013, 03:18:19 PM
I can't explain them all at the moment very deeply. For reference see the texture docs which I quickly updated just now to fix a few errors. I have updated the tool a lot though and the charts and docs are missing some information.

RTT doesn't do reflection (off the top of my head). I currently don't have an auto-export of a cubemap for a specific VMT but you could probably manually do it by making a small dimension sky with Sky Writer and then editing the VMT and moving the sky vtfs. I generally just use the SpecularMap in the Specular Level slot of the material to mask the intensity of reflections and check the Reflection checkbox in Material; the WW VMT exporter will then add "$envmap  env_cubemap" if you have the reflection map checkbox turned on... which then gets the reflection from the nearest cubemap in game.
I've never used sky writer before, still need to get the hang of things in 3ds max, so il probably better go for the second way.
With the reflection slot checked, do i need to put a texture into that slot?

Quote
For self illumination, you may try using the LightingMap.

One thing I do for self-illum is create bitmaps using this feature: Rendering > Render Surface Map > SelectionToBitmap . This way you can select faces on your geometry and create a mask for this.
How does this work making a mask for self illum?
When i render surface map - selectiontobitmap of my complete model, the bitmap is completely overlapping and i think is useless like i have it now: http://img842.imageshack.us/img842/945/seltobmp.jpg

Quote
For the VMTs and VTFs, the files do need to be included.

I do not know the specific reason for the PWL files. I think Gulli (K@rt) mentioned they might be for console games. In any event, the WW asset packing functions ignore those files. I usually delete them.
what exactly are console games? :$
Will the ingame quality of the graphics be better witht he pwl files included in the game?

Sky-High

#3
After carefully following that tut for so many times i get this result for renderToTexture: http://img42.imageshack.us/img42/1339/rndrtotxtrresult.jpg

The problem is that it isnt flattened and if it is it will look like this wich is useless, giving no detail to the model : http://img824.imageshack.us/img824/4966/flattenmapsinglemat.jpg
this gives me an unacceptible endresult for the model.

boxmapped result: http://img202.imageshack.us/img202/1933/appuregoldboxmapped.jpg

the best result is without any unwrap and simply uv map the texture.
Does a model need to be unwrapped for source?

for the reflection part, i made a new selectiontobitmap and used that bitmap in the reflection slot,
then when i render i see this, is this normal or good quality? http://img194.imageshack.us/img194/4205/apwithreflmask.jpg

after applying the baked material to my model it looks like this (much better imo): http://img812.imageshack.us/img812/6916/appuregold.jpg

gonna export it like this to see what it gives ingame


wallworm

The key here is to learn how to unwrap your models. In order for any bitmap to properly texture a model, the mapping must be correct.

The flattened image that the RTT automatically generated is poor... but you can still get better auto unwrap results by adding your own UnWrap UVW modifier, going to face sub-element mode in the modifier, selecting all faces and then choose Mapping > Flatten Mapping. Choose different angles in the flatten mapping dialog to see some results.

The best thing, however, is to learn to Unwrap the models manually--especially with complex geoemtry.

And to answer the question, yes, the models in Source need to have texture mapping. Whether that mapping is from an unwrap or from box/planar, etc... is dependant on the nature of your model.

For the masking of the reflection, I'd put the bitmap into the Specular Level slot... as this will export into game as the envmapmask that way.

Sky-High

#5
Ok got it.
its good to know that a unwrap uvw is not always nescesary.
Maybe you should make a tutorial on the diffrent kinds of mapping for the more advanced/complex models/geomitry?

For the way i did the texturing now gives me this when loaded into the game:
- http://img11.imageshack.us/img11/6916/appuregold.jpg
http://img842.imageshack.us/img842/8797/appg2.jpg

a previous attempt (with the gold texture in reflection and self illumination slot) looks much better to be honost. I notice that its alot of trying and testing to tweek what the final result ingame looks like.
- http://steamcommunity.com/sharedfiles/filedetails/?id=131102142
- http://steamcommunity.com/sharedfiles/filedetails/?id=131101999

Sky-High

#6
New questions,

1.)  When i have textured my model using mental ray in it, will these effects also export to source?

2.) And lets say i want to make a lightsource and put it around my model, something like this for example: http://faqsmedia.ign.com/faqs/image/article/113/1134829/powerup_2x.jpg
If when i place the light like that, will wwmt also export these effects to make it work with source engine?

3.) Can WWMT export vtf's and vmt's for a material with mental ray? Trying that now but seem to fail all the time.

Steam was running & folders where created but still fails to export

wallworm

Using Mental Ray as your renderer is fine but Mental Ray Materials are not supported*.

The only truly valid Material is a Standard Material. But the following can also be used:

Blend - Where both input materials are Standard Materials
Shell - Where the Baked Material is a Standard or Multi/Sub-Object material
Multi/Sub-Object - Where the input materials are Standard materials or Shell or Multi/Sub-Object Materials that apply to this and above rules
DirectX Shader - Where the Render Material is a Standard, Shell or Multi/Sub-Object with the rules above.

Again, the only materials that export a VMT and create VTFs is a Standard (with the exception of a Blend that will create a WorldVertexTransition material and a tooltexture).

You can use Mental Ray materials for your source of Render To Texture. It's just that the output of that RTT must be a standard material.

Hopefully that answers the question.

Sky-High

Quote from: wallworm on March 17, 2013, 10:07:55 AM
Using Mental Ray as your renderer is fine but Mental Ray Materials are not supported*.

You can use Mental Ray materials for your source of Render To Texture. It's just that the output of that RTT must be a standard material.

so the effects from the mental ray material would not be visible ingame? the applied mater to the model cant be the mental ray material but the baked version of the mental ray material?

wallworm

Quote from: Sky-High on March 23, 2013, 08:17:35 PM
so the effects from the mental ray material would not be visible ingame? the applied mater to the model cant be the mental ray material but the baked version of the mental ray material?

Correct. There is no real 1:1 relationship between any Max material and those in Source. What I've done in Wall Worm is to map the shared textures and a few other settings that are equivalent between a Standard Material and Source materials.

You have to remember that many material effects you see inside 3ds Max are very resource intense. Max is designed to render out scenes and not play in realtime. Source, on the other hand, is a stripped down 3D environment meant to run quickly and in real-time. Source (and any game engine) is likely not going to have all the material options you find in programs like Max.

That being said, if you know how to code in the Source SDK, you could create your own Source Shader that does more things than those that ship with Source.

Sky-High

I see, thats defenitly beyond my skills since i can't even bring a downloaded model into the game properly.
Maybe you should make a video on that and i will bring the compiled model into the game with my code for example?

Would defenitly be a helpfull tutorial i think

SMF spam blocked by CleanTalk