SteveL Posted May 24, 2015 Report Posted May 24, 2015 That's right. We already have some nice glass that fakes refraction by using a simple low res cubemap. The difference from real refractions is not noticeable under most circumstances. sorry Merry for the branching, as soon as someone posts something usable I promise to start a new thread 1 Quote
Airship Ballet Posted May 25, 2015 Author Report Posted May 25, 2015 I super don't mind. Quote Releases Quinn Co Part 1 Hey Merry, how's your next mission coming along?
nbohr1more Posted May 25, 2015 Report Posted May 25, 2015 Ignore the depth problems... We can have nice glass that works well in 99% of settings without having to solve those problems, and mappers can avoid the other 1% of settings. You know better than anyone else what the best is out there What's on offer? We can use GLSL shaders for transparent surfaces and/or different blend modes without any major engine changes. The last time I checked, the best glass shader was still the old rthdribl demo: https://dl.dropboxusercontent.com/u/17706561/rthdribl_1_2.zip If you're looking for out-there stuff, it seems some Russian has done a pretty nifty caustics demo: http://translate.google.com/translate?hl=en&ie=UTF8&langpair=auto|en&rurl=translate.google.com&tbb=1&u=http://www.uraldev.ru/articles/id/39/page/2 but I haven't found a good example of what Springheel is looking for "milky glass"... Quote Please visit TDM's IndieDB site and help promote the mod: http://www.indiedb.com/mods/the-dark-mod (Yeah, shameless promotion... but traffic is traffic folks...)
Springheel Posted May 25, 2015 Report Posted May 25, 2015 It's not about making them milky, it's about making the glass look like it's actually solid glass. This is the hourglass glass texture applied to a bottle model. I don't find that convincing at all--it looks like a ghost bottle rather than real glass. You almost can't see them in the second shot. There's also no sense of shape--they appear completely flat. Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps
rich_is_bored Posted May 25, 2015 Report Posted May 25, 2015 Those screenshots don't look glass like because you're only handling refraction while reflection is virtually absent. I'm not sure if this is addressable via the current build of the engine but I can say that you need a dynamic cubemap that can be referenced via material shader. You need to be able to reference an image map like _scratch but this image needs to be an average of cubemaps compiled based on neighboring info_location entities. Half-live 2 does something like this. Each location has a cubemap associated with it. As you approach one or the other the neighboring environment maps are weighted into an average. If you get really fancy you can even apply parallax effects to make the reflection appear more true to life. The only downside to this approach is the cubemap is static. If you turn lights on/off that status will not be reflected in the cubemap. No Ai will be reflected. No effects. No nothing. You could probably account for this but it would incur a performance penalty. All in all it's good enough without those extra details but we could add them as time marches forward. Quote ModWiki
Gestas Posted May 25, 2015 Report Posted May 25, 2015 Looks like only the outside of the bottle has geometry. It needs an inside layer too. A really bright specular map might help too. Half life way worked fine because you couldn't turn out the lights Quote
SteveL Posted May 25, 2015 Report Posted May 25, 2015 It's not about making them milky, it's about making the glass look like it's actually solid glass. This is the hourglass glass texture applied to a bottle model. I don't find that convincing at all--it looks like a ghost bottle rather than real glass. You almost can't see them in the second shot. There's also no sense of shape--they appear completely flat. Our current glass shader is a post-process effect that ignores the shape of the object. It just distorts what's behind a bit to let the viewer know there's slightly warped glass in the way, and adds a bit of colour. It works well enough for flat glass panes, but it fails completely on curved surfaces, and it has no concept of thickness or multiple layers. Your pics show the problem well. It looks like bottle shapes have been cut out of a flat pane of glass. I'm wondering how to represent the changing thickness of the bottle so it looks like a rounded bottle and not a flat cut-out of a boittle. Ray tracing to get it right is obviously out of reach for a game engine. Rich's suggestion of an environmental cube map for each location is probably the only way we could get the blue light of the sea coming through the upper surface of the bottle like you see in the original picture. We have a cheapy version of that in our current glass shaders. It uses the same grey cubemap for every pane but it does look very effective when used right. Shadows and caustics are another matter. They need to affect surfaces other than the bottle itself, so they can't be done in the glass shader and would definitely need engine support. The shadow experiments we've been messing with for 2.04 would lend themselves to modelling semi-transparent shadows and caustics. In the experimental branch, we've replaced the on/off shadow stencil for each light with an alpha mask that can hold other values and attentuates the light effect. Caustics could be done quite accurately as anti-shadows: areas of "shadow" that intensify rather than decrease the light effect. To start with, let's think about what we can do through the glass shader alone. Quote
Popular Post Obsttorte Posted May 25, 2015 Popular Post Report Posted May 25, 2015 You need to give the glass texture a bumpmap. The bottle on the right uses the texture textures/darkmod/glass/clear_warp, as used by the hourglass and in Springheels shots above. The left one uses a custom texture, which is the same as clear_warp but with this line added: bumpmap _flat This allows the light to interact with the surface and gives a suitable representation of the geometrical shape. 5 Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
SteveL Posted May 25, 2015 Report Posted May 25, 2015 @Obsttorte: nice one! That's rather exciting. It means I have something new to go and study about how light interactions are drawn. I thought I knew that you couldn't have both light and transparency (other than 50% screen-door-style translucency) because light interactions are drawn only where the scene depth equals the depth buffer. Clearly not right. I wonder if that's how Arcturus' water ripples get to reflect light too? Quote
Obsttorte Posted May 25, 2015 Report Posted May 25, 2015 It was the first thing that came to my mind. More of a wild guess, to be honest. But it worked out pretty well Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
Gestas Posted May 25, 2015 Report Posted May 25, 2015 looks much better but still needs inside geo. Quote
Tudor Posted May 28, 2015 Report Posted May 28, 2015 Displacement or refraction or what you want to call it tends to come with some depth issues, how would a couple of these on a shelf look? Quote
Bikerdude Posted May 28, 2015 Report Posted May 28, 2015 looks much better but still needs inside geo.@Springheel, could you make some bottle models and then use Obs method so we can see what it looks like..? Quote
Springheel Posted May 28, 2015 Report Posted May 28, 2015 You mean adding an inside to them? Yes, it would be interesting to see what happens there. Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps
Springheel Posted May 30, 2015 Report Posted May 30, 2015 I've uploaded kitchen/wine_bottlle_clear. Feel free to experiment with it. Right now it is textured with bc_flaskglass, which doesn't quite work. Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps
Airship Ballet Posted August 15, 2015 Author Report Posted August 15, 2015 Added a bunch of custom paintings to the OP! 3 Quote Releases Quinn Co Part 1 Hey Merry, how's your next mission coming along?
VanishedOne Posted August 15, 2015 Report Posted August 15, 2015 (edited) This'll be very useful (though merrypainting35 is a duplicate of carravagio1 apart from the frame, merrypainting08 is incorrectly declared in the .mtr as a duplicate of merrypainting06, merrypainting21(, _m, _l) is declared twice in the .mtr, and merrypainting09 is declared twice in the .skin). Edited August 15, 2015 by VanishedOne Quote Some things I'm repeatedly thinking about... - louder scream when you're dying
Gast Posted August 15, 2015 Report Posted August 15, 2015 Very impressive assets and audio here, nice job. Quote
Airship Ballet Posted August 15, 2015 Author Report Posted August 15, 2015 Thanks!This'll be very useful (though merrypainting35 is a duplicate of carravagio1 apart from the frame, merrypainting08 is incorrectly declared in the .mtr as a duplicate of merrypainting06, merrypainting21(, _m, _l) is declared twice in the .mtr, and merrypainting09 is declared twice in the .skin).Thanks Hawkeye! I'm here to talk to you about the Avengers Initiative now that I've fixed all that. 1 Quote Releases Quinn Co Part 1 Hey Merry, how's your next mission coming along?
Anderson Posted August 15, 2015 Report Posted August 15, 2015 Added a bunch of custom paintings to the OP! It's amazing! Quote "I really perceive that vanity about which most men merely prate — the vanity of the human or temporal life. I live continually in a reverie of the future. I have no faith in human perfectibility. I think that human exertion will have no appreciable effect upon humanity. Man is now only more active — not more happy — nor more wise, than he was 6000 years ago. The result will never vary — and to suppose that it will, is to suppose that the foregone man has lived in vain — that the foregone time is but the rudiment of the future — that the myriads who have perished have not been upon equal footing with ourselves — nor are we with our posterity. I cannot agree to lose sight of man the individual, in man the mass." - 2 July 1844 letter to James Russell Lowell from Edgar Allan Poe.
grayman Posted August 15, 2015 Report Posted August 15, 2015 My Lord, where was I back in April? Just stumbled across this thread. Maybe too deep in doing taxes. Absolutely marvelous stuff, Merry! Thanks! Quote
Dunedain19 Posted August 16, 2015 Report Posted August 16, 2015 The new paintings are wonderful! Quote
Airship Ballet Posted August 16, 2015 Author Report Posted August 16, 2015 Thanks guys! I call this one Lacklustre Still Life (big food dump coming some time in September) 2 Quote Releases Quinn Co Part 1 Hey Merry, how's your next mission coming along?
VanishedOne Posted August 16, 2015 Report Posted August 16, 2015 Sorry about this, but I've more painting trouble to report.I suspect the problem in the second and fourth images (which occurs when Ambient Rendering is set to Simple) is coming from the use of models/darkmod/props/textures/painting03_d, though I haven't tested. { if ( parm11 > 0 ) blend gl_dst_color, gl_one map _white rgb 0.40 * parm11 } { if ( parm11 > 0 ) blend add map models/darkmod/props/textures/painting03_d rgb 0.15 * parm11 } // TDM Ambient Method Related { if (global5 == 1) blend add map models/darkmod/props/textures/painting03_d scale 1, 1 red global2 green global3 blue global4 } { if (global5 == 2) blend add program ambientEnvironment.vfp vertexParm 0 1, 1, 1, 1 // UV Scales for Diffuse and Bump vertexParm 1 1, 1, 1, 1 // (X,Y) UV Scale for specular vertexParm 2 global2, global3, global4, 1 fragmentMap 0 cubeMap env/gen1 fragmentMap 1 models/darkmod/props/textures/painting01_local // Bump fragmentMap 2 models/darkmod/props/textures/painting03_d // Diffuse fragmentMap 3 models/darkmod/props/textures/painting01_s // Specular } } The first, third and fifth images' missing textures I think are due to paintings from 48 onwards including only _l and _m image files, e.g. merrypainting48_d.tga doesn't exist, and the console reports being unable to load it. (Though my screenshots actually use the models/darkmod/decorative/wall/painting01_l.lwo model. Weirdly, I also got different results - 1st and 3rd vs. 5th image- depending on whether I unpacked the files.) Again, I haven't actually tested this. Also, I found another error in the skin file: it has merrypainting50l instead of merrypainting50_l. Have a nice day. Quote Some things I'm repeatedly thinking about... - louder scream when you're dying
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.