alexei.garbuzenko Posted October 31, 2011 Share Posted October 31, 2011 I'm wondering is there a way to display custom background and a sun at the same time? My experiments shows that sun is disabled when 'Background' state is enabled for sky material. 1 Link to comment
ulf.schroeter Posted November 4, 2011 Share Posted November 4, 2011 You could try to modifying core/shaders/default/skies/fragment_sphere_ambient.shader code to combine sun/sky scattering color with background cube texture cube based by mixing both componenten based on background texture alpha component (final color = (1 - background A) * scattering color + background A * background RGB) Link to comment
alexei.garbuzenko Posted November 4, 2011 Author Share Posted November 4, 2011 You could try to modifying core/shaders/default/skies/fragment_sphere_ambient.shader code to combine sun/sky scattering color with background cube texture cube based by mixing both componenten based on background texture alpha component (final color = (1 - background A) * scattering color + background A * background RGB) I already did it, more than a year ago, but I'm asking for a solution that does not require modification of core shaders cause those are sometimes changed without any update scripts, documentation or even changelog notices. Link to comment
ulf.schroeter Posted November 4, 2011 Share Posted November 4, 2011 Hm, then UNIGINE feature suggestions might be a better place... Link to comment
manguste Posted November 17, 2011 Share Posted November 17, 2011 Care to share the modified shader with us to speed it up? :) Link to comment
alexei.garbuzenko Posted November 17, 2011 Author Share Posted November 17, 2011 Care to share the modified shader with us to speed it up? B) That was not a modified scattering shader, but complete replacement for PS 2.0 hardware based on year 2009 shaders. It supports gradient background with clouds and own sun rendering in single ambient pass (meaning it looked great and was really cheap with scattering disabled). It can be easily modified to replace all gradient stuff with single texture fetch: half3 back = texCUBE(s_texture_4,IN.texcoord_5).xyz; p.s. world light direction should be also passed to that material. d3d9.zip Link to comment
manguste Posted November 23, 2011 Share Posted November 23, 2011 Thank you for posting it! Frustum promised to take a look at your implementation when he's done with Tracker system. Link to comment
alexei.garbuzenko Posted November 23, 2011 Author Share Posted November 23, 2011 Actually, that shader is of poor quality and does not use Scattering Sun color, size, etc. parameters. Think of it as a proof of concept that we can have cheap sun effect rendered in ambient pass over the sky dome. Link to comment
manguste Posted November 23, 2011 Share Posted November 23, 2011 Yep, we got that part :) Link to comment
brett.morris Posted December 5, 2011 Share Posted December 5, 2011 Are there any plans in the near future for providing a system for stars that works withing the existing environment / scattering system? We looking into stars at the moment and any suggestions would be helpful. Link to comment
watchvombat Posted December 7, 2011 Share Posted December 7, 2011 Hi, we are planning some improvements (in somewhat 2-3 months), I can't say or promise anything specific about stars, but we will keep this in mind. Link to comment
powerspeed_de Posted July 29, 2013 Share Posted July 29, 2013 как сделать, чтобы солнце было видно вместе с skybox how to make the sun visible with skybox Link to comment
nat.harrold Posted August 1, 2013 Share Posted August 1, 2013 как сделать, чтобы солнце было видно вместе с skybox how to make the sun visible with skybox <material name="example_sky_dome" parent="mesh_base"> <options depth_mask="0" cast_shadow="0" receive_shadow="0" cast_world_shadow="0" receive_world_shadow="0" receive_translucent="0"/> <state name="volumetric">1</state> <state name="deferred">0</state> <state name="light_spot">0</state> <state name="light_omni">0</state> <state name="light_proj">0</state> <state name="light_world">0</state> <texture name="emission">textures/insert_your_sky_dome_here_d.dds</texture> <parameter name="environment_scale">0</parameter> <parameter name="emission_scale">1.1</parameter> <parameter name="glow_scale">1</parameter> </material> Is this what you mean? Link to comment
powerspeed_de Posted August 1, 2013 Share Posted August 1, 2013 please see video lhttp://www.youtube.com/watch?v=XXh1CYhgPu0&feature=youtu.be Link to comment
nat.harrold Posted August 2, 2013 Share Posted August 2, 2013 I see your problem, though I can't replicate problem here. My sun stays visible with the same settings. We have used a different method for the skydome in the past - (it is surprising what unigine sneaks into the UI over the years - will try this method you use more - the double layering is nice effect) The method we have used (and the one that goes with the material I suggested previously), is for a mesh hemisphere of a large radius - (It also works without a cubemap). I can see some benefits to method you use now. Does the problem in your video happen if you swap the custom background texture for some default textures? Link to comment
Recommended Posts