Jump to content


Photo

Dragofer's Stuff

ships

124 replies to this topic

#51 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPip
  • 4733 posts

Posted 24 May 2015 - 04:28 AM

Regarding the material files posted, in one you wrote noselfshadow and in the other noselfshadows. Maybe the latter is wrong and causing the issues with the material not smoothing.


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#52 Dragofer

Dragofer

    Modeler

  • Member
  • PipPip
  • 426 posts

Posted 24 May 2015 - 09:12 AM

Regarding the material files posted, in one you wrote noselfshadow and in the other noselfshadows. Maybe the latter is wrong and causing the issues with the material not smoothing.

 

Thanks for pointing this out, but there is an explanation for the typo - I had replaced the original noselfshadows line with noshadows, and then for this post typed the noselfshadow(s) back in again to show the original material shader. It's an oversight, sorry.

 

About the smoothing issues, I'd like to try to use an earlier version of Blender with the .lwo exporter, and if that doesn't work just use .ase. The earlier Blender version might come in handy there too if the .ase exporters don't get updated very often.

 

The way it is now, the exporter doesn't function properly if it makes .lwo files that can't be opened in Lightwave.

 

 

 

 

I used the plugins for Modo made by past id's artist, Seneca, he made them to export models from modo for Doom 3, so perhaps that is why it all worked smoothly. ;D

 

I can always appreciate a pun ;)


Edited by Dragofer, 24 May 2015 - 09:14 AM.

  • HMart likes this

#53 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35809 posts

Posted 09 June 2015 - 06:58 PM

About the smoothing issues, I'd like to try to use an earlier version of Blender with the .lwo exporter, and if that doesn't work just use .ase. The earlier Blender version might come in handy there too if the .ase exporters don't get updated very often.

 

 

Any luck with this?  Those light models are excellent and I'd love to add them to the mod.


  • Bikerdude likes this
Posted Image

#54 Dragofer

Dragofer

    Modeler

  • Member
  • PipPip
  • 426 posts

Posted 11 June 2015 - 10:26 AM

*
POPULAR


Any luck with this?  Those light models are excellent and I'd love to add them to the mod.

 

Yes, going back to Blender 2.70a did the trick for making smoothed .lwo models (current Version is 2.74). The interface looks identical to that of the newest version so it's simple to just use 2.70a from now on. Springheel, I've made a test torus here - could you try and see if it opens normally in Lightwave please?

 

 

The remaining problem is that my existing models made in Blender 2.74 still won't smooth when exported via 2.70a. Now I'm trying to find a way to turn a 2.74 file into a 2.70a file. If it doesn't work, recreating those lamps from scratch is no problem, but I have another carriage model that would be a lot of work to remake. In a pinch I could just make new renderbump versions of materials, but hopefully there's a cleaner solution.

 

Spoiler

  • Bikerdude, nbohr1more, Goldwell and 2 others like this

#55 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1332 posts

Posted 11 June 2015 - 11:21 AM

Thats an excellent carriage model...

A few notes on your list:

 

UVs - If I understood correctly, putting the whole carriage inside a 1024 texture might be too little, you should consider having the model made of different meshes with their own independent texture.

 

Normal map - indeed, there are a few plugins or even software that convert images into normal maps. Most of the times, its quite sufficient. What wont work however is when you have a diffuse image with projected shadows that are too visible, because those shadowed volumes will be translated into recessed areas and they will look wrong. Sometimes it pays to edit the images manually before converting. See this article: http://www.katsbits....s-or-images.php

 

Highpoly - Usually, you only use this feature when you actually start the model from a highpoly version, sculpting it somewehre. You then use the highpoly as a base for topology where you create the low poly version (or by decimating), and it also serves as a your normal map source. If you start with a low poly model, you could also use it as a base for making a highpoly version for normal mapping purposes, but that seems overkill, and not needed in this case IMO, since its a "scenery" item and not something the player will be using up close, which would justify the extra work. Most of the little details like bolts and stuff could simply be drawn on the texturing phase.

 

Collision - Definitely not a "moveable", unless you plan on having it fall from a cliff or something? Im not sure if a collision model is needed.

 

Shadow - Exactly, you can probably even ignore most of those linear decorative or structural elements and concentrate on remaking the main body of the carriage as simpler geometries textured with the shadow material. I would probably keep the wheels as they are, but ignore the rest of the metal work and see how it looks, chances are players wont miss those shadows at all.

 

Very good work.


Edited by RPGista, 11 June 2015 - 11:23 AM.

  • Dragofer likes this

#56 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35809 posts

Posted 11 June 2015 - 03:22 PM

could you try and see if it opens normally in Lightwave please?

 

 

Unfortunately it doesn't.  Maybe my version of LW is too old?  I don't know.


Posted Image

#57 Dunedain19

Dunedain19

    Member

  • Member
  • PipPip
  • 211 posts

Posted 23 August 2015 - 07:51 PM

Just wondering if the smoothing issue with the gas lights ever got resolved?

 

If so, was a light entity prefab created for them?



#58 Dragofer

Dragofer

    Modeler

  • Member
  • PipPip
  • 426 posts

Posted 02 September 2015 - 05:05 PM

Just wondering if the smoothing issue with the gas lights ever got resolved?

 

If so, was a light entity prefab created for them?

 

The setup of reverting to a slightly older version of Blender (2.70) and using exporters made with TDM in mind was promising because it produced properly smoothed test objects like a metal sphere and torus. But when I made a new copy of one of those lamps from scratch in Blender 2.70 it had the same smoothing problem again: metal is flat, glass is smoothed. There must be a problem with how I've set up the lamp at some point while modelling it.

 

On a sidenote, I've seen now that even the old setup in Blender 2.74 is capable of making properly smoothed test objects, so it's unclear whether reverting to 2.70 was needed.

 

 

I'd very much appreciate if someone else who uses Blender tried to export what I have. This package has both the original and the remade .blend files, the .lwo exporter that I use (also .ase) and an already exported .lwo model:

https://www.dropbox....relamp.rar?dl=0


Edited by Dragofer, 02 September 2015 - 05:06 PM.


#59 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 7288 posts

Posted 02 September 2015 - 08:17 PM

I'm no modeller but Xcen wrote-up an excellent guide on using Blender to fix normals for LWO models.

Maybe this would help:

 

http://wiki.thedarkm..._Vertex_Normals


Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#60 Xcen

Xcen

    Member

  • Member
  • PipPip
  • 80 posts

Posted 03 September 2015 - 05:04 AM

The problem with my guide was that I used Blender 2.75a which isn't fully compatible with the exporter.
 
You can't export the shadow and collision meshes with it.
 
Here is a revised version:
 
I switched back to Blender 2.70a and the steps to add a shadow and collision mesh start at 28 and end with step 39.
 
1. I use Blender 2.70a with default settings. Nothing changed. Like a clean install. I started from your first uploaded .lwo model.
2. Start Blender.
3. In the top left click on "File" and go to "User_Preferences"
4. Go to "Add-ons" -> "Import-Export" -> and activate "Import-Export: Import LightWave Objects"
5. Download this exporter: http://www.blenderar...-export-project
6. In the "User-Preferences" -> "Add-ons" go to "Install from File...", install the exporter and make sure it is activated.
7. In the top right is a window named "Outliner" where you can see a "Camera", "Cube" and "Lamp" entity.
8. Right-click on the names ("Camera", "Cube" and "Lamp") and delete them.
9. Go to "File" -> "Import" -> "LightWave Object (.lwo)" and load your model.
10. In the top right "Outliner" window left-click on your model. Now you should see an orange outline on your model. If not press key 'a' to select your model.
11. Check that you are in "Object Mode". Near the bottom of your window to the right of a "Object" menu you can select a mode (Object, Edit, Sculpt, Vertex, Weight and Texture).
12. On the left side go to "Tools" -> "Edit" -> "Shading" and select "Smooth".
13. Now press key 'tab' or click "Object Mode" near the bottom of your window and change it to "Edit Mode". When changing to edit mode you can see every triangle/quad hightlighted in orange. If not hit 'a'
14. Press 'a' to deselect your model.
15. Near the bottom of your window check a box (a cube with an orange line) named "Edge select".
16. If you right-click on an edge you can select it. Press and hold 'shift' while you right-click and select some edges that you want to split.
17. With the edges selected press 'ctrl' and 'e' to open the "Edges" menu and select "Mark Sharp". Now you should see a cyan line (and some orange sparkling through). If you want to unmark an edge go to "Edges" -> "Clear Sharp".
18. Change back to "Object Mode" with 'tab' and then press 'a' to deselect your model.
19. On the right side below the "Outliner" is the "Properties" window. Sometimes you need to rescale the window to make all entities visible. Just left-click on the border and drag.
20. Select the wrench icon to open the "Modifiers". Go to "Add Modifier" and select "Edge Split" in the second column.
21. Uncheck "Edge Angle" and make sure "Sharp Edges" is activated. Don't hit "Apply" yet.
22. Now the previously marked edges look sharp. But the modifier isn't applied yet. You only see what you will get when you apply the "Edge Split" modifier.
23. Press 'tab' to switch back into "Edit Mode" and select all edges ('shift' + right-click for selection and 'ctrl'+'e' -> "Mark Sharp" to mark for splitting)
24. When every edge is marked for splitting go back into object mode (press 'tab') and hit "Apply" in "Properties" -> "Modifiers" -> "Edge Split". Make sure only "Sharp Edges" is checked.
25. If your model isn't triangulated go to "Edit Mode" (hit 'tab'), select everything (hit 'a') and press 'ctrl'+'f' to go to the "Faces" menu and select "Triangulate Faces".
26. To change the name of the material go to "Properties" on the right side and go to "Materials".
27. Below the list on the top is a field where you can enter or edit the name. Change it to the name of your material in the ".mtr" and hit 'enter'. Now you should see the new name in the list on the top.

28. To add a shadow and collision mesh to your model hit 'a' to deselect everything and 'tab' if you are not in "Object Mode" or select it on the bottom of your "3D View" window.
29. When in "Object Mode" press 'shift'+'a' to open the "Add" menu go to "Mesh" and select a mesh type to use as a shadow mesh.
30. Now there is a second object in the "Outliner" window on the top right.
31. Smoothing, edge splitting or a proper and clean uv map aren't necessary for shadow and collision meshes.
32. If you are still in "Object Mode" hit 'tab' to switch to "Edit Mode" and select the "Shading / UVs" on the far left. Go to "UVs" and select "Unwrap" and "Unwrap". Alternatively you can hit 'u' to enter the "UV Mapping" menu and select 'Unwrap'.
33. To see your uv map go to the bottom left of your "3D View" window and drag the window to the right. Now you get a second "3D View" window to the left of your "3D View".
34. Click on the cube symbol on the bottom left of your new window and switch to to "UV/Image Editor" mode.
35. Now you can see your uv map. If not hit 'tab' and switch to "Edit Mode" and 'a' to select everything.

36. To add a material go to "Properties" on the right and go to "Materials" and "New".

37. Change the name of the material to something from the "tdm_textures_base01\materials\tdm_collision.mtr" for the collision mesh. For a shadow mesh use "textures/common/shadow" or "textures/common/shadow2".

38. Shadow and collision meshes need to be triangulated too. Go to "Edit Mode" ('tab') press 'ctrl'+'f' to open the "Faces" menu and select "Triangulate Faces".

 

39. If you have more then one object you need to export them to one layer. To do this switch to "Object Mode" ('tab') and select the objects in the "Outliner" window (top right) with 'shift'+'LMB'. To merge them 'ctrl'+'j'. Click on the plus symbol on the left of your objects name in the "Outliner" window and again on the next plus. Now there should be the name of your texture, collision and shadow materials.
 
40. For export make sure you are in "Object Mode" (hit 'tab').
41. Go to "File" -> "Export" -> "Lightwave (.lwo)".
42. On the bottom left there is a "LwoExport" window.
43. Check "Smoothed". Actiavate "idTech compatible". And uncheck "Recalculate Normals". If there is something inverted ingame make sure to uncheck this one.
44. "LwoExport" in the top right.


Edited by Xcen, 03 September 2015 - 05:05 AM.

  • nbohr1more and Gast like this

#61 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1562 posts

Posted 03 September 2015 - 06:41 AM

The problem with my guide was that I used Blender 2.75a which isn't fully compatible with the exporter.
 
You can't export the shadow and collision meshes with it.

I'm using Blender 2.75a and it works. In order to export models with multiple materials try joining all the objects (ctrl+j) before export. Make sure you have:

noshadows
noselfshadow

in your proper material so that only mesh with shadow material will cast shadows.


It's only a model... /// My channel on YouTube /// CGtrader , Turbosquid


#62 Dragofer

Dragofer

    Modeler

  • Member
  • PipPip
  • 426 posts

Posted 03 September 2015 - 09:29 AM

Here is a revised version:

 

Great, this worked exactly as it should. Thanks for posting this here Xcen.

 

Now to setup the new custom light entities. The wiki as far as I can find doesn't seem to have something about setting up new lamp entities, but the existing lamp definitions describe the spawnargs well already.


Edited by Dragofer, 03 September 2015 - 09:29 AM.


#63 Dragofer

Dragofer

    Modeler

  • Member
  • PipPip
  • 426 posts

Posted 06 September 2015 - 06:01 PM

*
POPULAR

Here are the finished sphere lamps:
Dropbox
 
What's in this package: smoothed models in .lwo format with gold, silver and brass skins, and a steampunk skin that uses a different UV map so it has its own model. They are all available as lamp entities.
 
You will find them in:
Create model -> models -> darkmod -> lights -> non-extinguishable -> sphere_wall
Create entity -> darkmod -> lights -> model lights, static -> switchable -> electric -> indoor -> sphere_wall
 
The light bulbs can be recoloured with _color - the standard appearance is white. I think the tdm_glare_lamp_01 particle goes very well with a white or yellow bulb.
 
Christmas lamps
vXlAkom.jpg

Steampunk skin
O4LODGo.png

More technical details:

Spoiler

 


Edited by Dragofer, 10 September 2015 - 04:42 PM.

  • PsymH, nbohr1more, Dunedain19 and 4 others like this

#64 Dragofer

Dragofer

    Modeler

  • Member
  • PipPip
  • 426 posts

Posted 10 September 2015 - 04:40 PM

*
POPULAR

Next up

The stagecoach in model format. Using the stagecoach is more straightforward and no longer increases the map’s number of patches by close to 1000, which would be noticeable in loading and dmap times. It also allows for skins.

 

Download:

Dropbox

 

What’s in this package:
•Models: complete stagecoach with or without interior, also front and rear wheel models, left & right door models, and a version each of those stagecoaches without wheels attached (i.e. if the stagecoach lost a wheel)
•Skins: seats in 4 colours or leather for the stagecoach with interior. Windows as default unlit or colorme for the stagecoach without interior in case the default windows should be darker.
•Prefabs: stagecoach with or without interior, setup with doors or windows as I’d have intended them. Also 2 unlit candles inside the lanterns.
•Materials: noshadows versions of dark_rough, beam_rusty_victorian and the 4 armchair skins. I’ve put the first 2 where the other model textures are to avoid adding clutter to the wood and metal textures menus.

 

You'll find them at:

Create model -> darkmod -> misc -> carriages

 

 

HyLaHkb.png

 

 

More technical details:

Spoiler

  • Bikerdude, Goldwell, Anderson and 2 others like this

#65 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17835 posts

Posted 10 September 2015 - 07:06 PM

So... I put into a test map and I spotted the following -

  • rains (or what ever the connections from the coach to the horses are called) for the horses
  • interior lights.
  • and the seat is 8 units to high for Ai (coachman) to sit down.
  • I see you have used a mixture of non-shadows and shadow casting wood through-out, it would be simpler to use non-shadow through-out and then make make a low-poly shadowmesh for each of the models.
  • all the hidden faces on all of the models should be caulk/nodraw, as this cuts down on the tris-count in-game.
  • imho, the glass on the outside lights should be clear.

Overall very impressive though :-)

 



#66 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35809 posts

Posted 10 September 2015 - 07:17 PM

all the hidden faces on all of the models should be caulk/nodraw, as this cuts down on the tris-count in-game.

 

 

 

There is zero point in adding caulk or nodraw textures to models...if the tris aren't important, just delete them (although there's not much point in that unless we're talking hundreds of polys in savings).


Posted Image

#67 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17835 posts

Posted 11 September 2015 - 05:15 AM

There is zero point in adding caulk or nodraw textures to models, although there's not much point in that unless we're talking hundreds of polys in savings.

On a complex model like this, I think there would be. Also moving forward this is a habit all mappers & modelers should get into doing.



#68 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35809 posts

Posted 11 September 2015 - 07:49 AM

Also moving forward this is a habit all mappers & modelers should get into doing.

 

 

We've already established that it doesn't have any effect while mapping.  From the wiki:

 

Every now and then, caulking rises up debates, whether or not it is useful or not. The basic question is, whether or not it is beneficial to spend a lot of time caulking and how much caulk is required to get a solid impact on fps rate. Recent tests performed by Sotha (Link) gave the following results.

Caulking a medium complex scene with tens of windows and other objects (Knighton Manor start) did NOT have any effect on fps counts. Caulking did save roughly 1000 tris, but this is not sufficient to cause any fps improvement. The main benefit of caulking was the decrease of memory usage: 1000 saved tris saved 0.6MB of memory.

Testing indicated that on a rather high-end computer increase of 23000 tris, 75 draws and 2500 shdw reduced the fps count by two. If a window consists of 5 brushes and the wall facing surfaces are caulked, this saves 5 surfaces and thus 10 tris per window. This would mean that 2300 windows should be caulked to get an improvement of 2fps. Basically this shows that caulking does not have much impact on modern hardware. However, on an older piece of hardware the amount of caulking needed for performance effect is lower, but even in this case it should be remembered that 1000 tris is roughly 20% of a single AI character.

 

 

The same basic rules would apply for modelling.  If you have an extra 100 polys that you don't need on a model like the stagecoach, it's not going to matter in the slightest, unless you plan to have at least 10 of them in the same scene.  Sure, in general, it's more neat and tidy to get rid of the extra polys, but that takes time and energy that could be spent elsewhere.  I'd much rather have 3 good models with a few extra polys than 2 good models that are perfectly optimized.

 

Shadow meshes are FAR more significant when it comes to increased performance, and I'd rather mappers put their energy there.


Posted Image

#69 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17835 posts

Posted 11 September 2015 - 09:13 AM

Shadow meshes are FAR more significant when it comes to increased performance, and I'd rather mappers put their energy there.

Ah fair enough, so shadow mesh suggestion it is then.



#70 Dragofer

Dragofer

    Modeler

  • Member
  • PipPip
  • 426 posts

Posted 11 September 2015 - 12:43 PM

Great, I appreciate that you looked so closely at it. I also do like that testmap, much more going on there than in mine.

[*]reins for the horses

If attaching AI horses to the stagecoach, I'm not sure what to do if the player shoos away the horses - maybe the reins should fall off? Things would be much easier if all players always played by the rules.

[*]interior lights.

Yes that would be good to have by default, especially considering your testmap was fine with lights all over the coach - I'm guessing you made them noshadows, small radius and bright_square (the light texture with less dropoff)

[*]the seat is 8 units to high for Ai (coachman) to sit down.

I like how you've put someone up there :P What will he do if he ever wants to get down?

[*]imho, the glass on the outside lights should be clear.

Do you mean clearer, less opaque? At the moment they share a transparent glass texture with the chassis windows.
[/list]

It should work to allow AIs to enter and sit inside the stagecoach. Imagine seeing the lord arriving and stepping out of his stagecoach to take up affairs at his estate. Or spotting a noble from afar through the window of his stagecoach, travelling through the streets of the city. Kind of like a crow.

The elevator system could be a place to look for a way to transport AIs. The stagecoach would stop - if it stops - inside fitting monsterclip brushes. Then the map would have to prevent that the player alerts/shoots an arrow/gets in the way, physically or with objectives.

Edited by Dragofer, 11 September 2015 - 12:50 PM.


#71 Dragofer

Dragofer

    Modeler

  • Member
  • PipPip
  • 426 posts

Posted 11 September 2015 - 12:53 PM

Regarding optimising, I used standard textures for parts which were already simple enough to be a shadowmesh, and for parts where it would've been difficult to make a shadowmesh that uses significantly fewer tris.

Examples are the undercarriage beams and the curved body panels of the stagecoach with an interior. The closed stagecoach on the other hand allowed for a very simple shadowmesh, so most of the shadow tris there are from the wheels.

I've mostly used patches to make the coach so there was less potential for hidden faces than with brushes. If a patch beam is on top of something else I used SteveL's patch splitter to get rid of the hidden side. When converting the stagecoach to a closed version I deleted any faces that could only be seen from inside - much easier with the patch splitter. I did spend some time caulking unseen faces in the sidelanterns because they're made mostly of brushes - very fiddly and could've been avoided by making those out of patches too.

That's what I've done, though I'm always interested to hear of other ways to approach optimising.

Edited by Dragofer, 11 September 2015 - 01:01 PM.


#72 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17835 posts

Posted 11 September 2015 - 04:45 PM

That's what I've done, though I'm always interested to hear of other ways to approach optimising.

Grand, well all thats left then is -

  • some horse raines.
  • lower the coachmans seat by 8 units
  • add 2 interior lights.
  • and some steps for the player/Ai to get in/out of the coach.


#73 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35809 posts

Posted 11 September 2015 - 08:04 PM

Why would there be interior lights?  Is that common in old coaches?    It seems like the kind of thing mappers could add themselves if they wanted.


Posted Image

#74 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17835 posts

Posted 12 September 2015 - 03:58 AM

Why would there be interior lights?  Is that common in old coaches?   

yep, and this is confirmed by the fact Dragofer added exterior lights.



#75 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35809 posts

Posted 12 September 2015 - 07:49 AM

Exterior lights are quite common.  I've browsed through a lot of images and haven't seen any kind of interior lights.  What would they look like?


Posted Image



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users