COMING SOON! - D3D Ultra Shader with D3D passes
With Stan’s and Prodigy’s help and scripts, I’ve created an ultra shader for different passes I usually need to composite my images better, all rendered in realtime with the DirectX viewport of trueSpace.
Once I have the go ahead from Stan and Prodigy, I’d like to share these, along with my Normal Light setup and my AO light setup to go with the respective shader.
The shader and pass script will only work with Object Instances - which is in the Material Editor -> Advanced options.
Here is a preview of the upcoming passes, which will come in very handy with compositing special effects, controlling specular highlights, or adding AO without any render times.
Stan was kind enough to help me out with a script that would help me select all nodes I need to swith over the shaders - and Prodigy has had a Power DX Shader which I based the current D3D Ultra Shader off.
-Image or solid colour based textures and full UV control
-Ambience and Diffuse control
-Specular and Diffuse maps with full UV control
-Dual displacement maps: one with full UV control, positive and negative mutiplicity; and the other with positive and negative mutiplicity and tiling
-Fresnel based environment reflections, including transmission and full UV control
-Texture transparency with Alpha Test controls toggled with Bacteria Alpha transparency: plain and with texture (NEW! to Prodigy’s Power DX Shader)
-Pass ready: Beauty, Lambert (AO Light Rig ready), Normal (Normal Light Rig ready), Specular, Depth (with 100, 200, 400 and 800 depth distances)
-Create a Matte/Mask pass and shader settings.
-Test Passes and shaders on objects with multiple instances of the shader on the same object (or on a fix to do that)
-Clean up shader (to make it lighter and quicker to load, rename unintelligible items)
The downside with this is keeping an eye out on the material name (“D3D material”) and have it as an Object Instance. Another downside is you can’t render each pass automatically, one has to D3D render it one by one - but small price to pay at the speed each pass can be rendered.
I am looking forward to releasing these sets of scripts, shaders and light rigs soon.
Photo with 1 note
Working on a stone monument/carving for a D3D render. I followed a Blender tutorial, then decimated and baked some cavity, AO and normals. I then imported all those to my Pass development setup. I’m currently optimizing it with a good coding friend Stan. Kudos to him that soon I’ll have a pass script for my realtime renderer.
I have started to use Blender’s GLSL shader preview with Blender Game lighting setups, from what I’ve learnt to use. I have also tried out the BGE area light update/patch. You can see it’s reflection on the surface. I find it’s much better for those sort of specular highlights and gives me some control over specular systems. I also find that I can create some translucency realtime.I may do another online series if in Blender after trueSpace, as I can see it not there, but actively being developed and also free.
Realtime SSS translucency in GLSL - experimenting.
I have embarked on an obsessive frenzy to try implement a realtime fake SSS shader for the BGE - as I can’t download anything to help me with that, nor find any good tutorials. Why am I doing this? As I am a fan of trueSpace 7.61 beta 8’s (eol’d) DirectX shaders - including realtime fake SSS which are surprisingly really good - considering it’s DirectX9 now 5 years old. So I tried to reproduce it, scoured the internet for hours on end, and finally attempted to make my own version.
So this is a shader node tree for GLSL- as I am still new to learning GLSL logic or Python logic - and unfortunately doesn’t work with the BGE just yet….. but does work for Blenders OpenGl preview engine. Renders like 2 or 3 frames per second to file - but realtime in the viewport.
The basic concept was using the Local Normals on an inverted colour for an Fresnel (diffuse ramp of a material) mask to create two different biased fresnel translucence on surface only. One for the blood layer, and the other for the fat layer - sub-dermis and dermis.
I then combined them with a epidermis, and viola!
I also used a Dirty Vertex colour input to help blend in exaggerated SSS effects (could be hand painted) on the ears and some parts of the character, black being more translucent (which works from all angles, does not consider object occlusion.. yet). This is very useful for things like ears or fingers of flaps of skin, or even the tip of the nose.
Here is the shadertree I used.
Please feel free to request then play with it, post your examples, or advise as to how I can improve, do it better, or share your techniques - or how you used mine. Feel free! I really want to know how you guys do realtime fake SSS translucency - be it for sculpting, fast animations rendering for webseries, or anything.
-This shader does not require a list of lights (well not yet, I will have to see how “accurate” it is).
-This does not work in the BGE as of yet……
-I have yet to test it on objects that deform, as sculpted, or a number of other things - with many lights - multi layered textures on a model with UV’s, etc etc.
-I also need to learn how to use this whole thing as a node group to apply to other objects and scenes - create a mega realtime translucent node.
-I have yet to try color ramping the RGB values, which has a nice solid faux translucency to it, also to test a little more with the Multiply multi Multiply method.
And if anyone knows how to pull or nodify the faux SSS from the BG Candy version to Blender 2.70, that would be mint!
I was trying to replicate the following HLSL node shader code below. If someone could help me out with GLSL scripts or how to implement it into Blender Shader Nodes - and how to script it and use it.. I would.. love you till the end of days. If I could understand this, or get some hints as to how I can get Dot, Smoothstep and Lerp, Pow, Normalize and so forth within GLSL methods would be wonderful.
void NewFunction(in RtFloat3 LV, in RtFloat3 N, in RtFloat TransRampOff, in RtFloat4 TransSampler,
in RtFloat4 TransColBack, in RtFloat4 TransColOut,
in RtFloat TransMultiplier, in RtFloat4 TransColIn, in RtFloat shine,
in RtFloat4 specular, in RtFloat4 lightcolor, in RtFloat3 eye, out RtFloat4 result,
in RtFloat4 diffuse, in RtFloat amplifier, in RtFloat4 dif, in RtFloat bias,
in RtFloat power, in RtFloat scale, in RtFloat4 edgecolor)
//Translucent Lighting Model from Joel Styles
RtFloat DotLN = dot(LV,N);
RtFloat Translucence = smoothstep(-TransRampOff * (TransSampler),1.0,DotLN) - smoothstep(1,1,DotLN);
RtFloat4 Colorize = lerp(TransColBack, lerp(TransColOut * TransMultiplier,TransColIn,DotLN),Translucence);
RtFloat DiffuseCoef = max(0,0.75f*DotLN+amplifier);
RtFloat3 Reflection = normalize(2 * N * DotLN - LV);
RtFloat RdotV = max(dot(Reflection,eye),0);
RtFloat SchlickTerm = RdotV / (shine - (shine * RdotV) + RdotV);
RtFloat NdotV_fresnel = saturate(dot(eye,N));
RtFloat Fresnel = pow(NdotV_fresnel,power) * scale + bias;
RtFloat Saturate = saturate(Fresnel);
RtFloat4 ofresnel = lerp(edgecolor, dif, Saturate);
result = (dif * Colorize * DiffuseCoef + specular * SchlickTerm) * lightcolor;
result *= ofresnel;
result.a = diffuse.a;
All in all, hope you like it.
I’m based in Colombia, and well I have to support them. I quickly made this in a few hours to show my appreciation for a truely immersive experience.
I think transmedia can learn a lot from football and the world cup. It’s the whole surprise of the game, the thought and research one needs to know how the “story” might end, then the surprise twists to the umpteen dozens of factors that influence the game. You get involved with key players, their feelings and physical state, and if you want, even their personal lives you can learn about. There is a rich history, and sometimes breakthrough to places no-one has ever gone or been before - heroes and villians arrive, political struggles and other physical factors. There are pushes, archs (literally) and teams of protagonists and antagonists if done right. The fans and the crowd collectively support the “story” and really adds to the immersion to the story. People even go to lengths to try sway the game with “barras” and widespread involvement, ritual and habit, well.. that really shows that transmedia is more than just the medium how your story is portrayed and the choices your audience can make, but the emotions and the knowledge to back up your universe and storyline. It has to be well thought out, or really something that can outlive itself with individuals representing a whole, driven by the very members that make the story and who take part in it - getting as many involved with the story/outcome of it all… a long with many other thoughts.
I have a lot to think about - I think it’s probably one of the older and more successful “transmedia” entertainment systems out there - enough to be called a religion - and a lot can be learnt by it.
Games, emotional involvement, collective construction and motivation, storylines, unexpected twists, possiblity to be predictable, surprising, and involving - not to mention the multifaceted way it is presented - and how limiting and stylized yet diverse it’s universe is.
Those are.. key concepts to true transmedia… in my opinion.
Photoset with 6 notes
I think I’ll do a debriefing, cause I seriously didn’t put much time into this project, but I was happy with the results…
So first things first: my passes.
+a lens flare pass (bright spots to pass through post effects)
I wanted to add more depth to my depth pass, but due to the stage being a good 300 units behind, my depth shader only covered 100 units. I will have to either scale everything to size before running passes. Considering that, I build my character as huge.. so I have to keep scale in mind. I also assume it will make TS run a lot faster, it had a lot of trouble expanding and doing operations at a scale that size… I will have to run some tests.
I would also then create my trigger pass node, maybe try learn how to use different attributes so I can modify the switch script according to the root name, and yeah! I would prefer to run the script in Object mode, but then my shaders wouldn’t be portable via objects (for scene construction). But sometimes Scene wide materials really helps with modifying lots of elements.
So.. I might make…. or learn better material tagging.
I am also planning to colorize and save my own nodes to work with concerning shaders, matrix’s and the like. I like Softimage’s ICE system because it is context safe. More often than not I have no idea what the context is in the LE so I have no much clue as to how to create or do things.
I think the more I learn about ICE and could technically reproduce things in the LE - including particle systems and other geometry modifiers - without having to script too much..
Oh so much to learn, sometimes just working and modeling and pushing things around really calms the mind, but I do like the technical side of things also… so.. onwards.
More ideas, lots of work.. I’ll keep working on my shader system in my free time.
Next thing, my AO pass also needs to have things to scale, as I built the AO light pass system to a sphere dome, scaling the directional lights casting “rays” and shadows certainly didn’t scale well, so I got a terrible effect - plus the stadium wasn’t even in the dome…
I got a couple of seconds per frame rendered in HD, but considering the AA, I need to scale that up then compress it to get better samples (more than the video card can handle).
Another thing, I have to watch my hair system in TS. It is quick to chog my computer, regardless of the videocard. I found it ran smoother on a slower video card with my machines at work that run nearly 4 times the clock speed. So that really helps, the faster a computer is, the faster trueSpace is. Handy.
Also, if using hair system in TS, making a field would be handy to do it in sections - drop the quality the further away it is from the camera - or better yet, model with very low polies and scatter them using particles in the MS or in Blender and import and texture them within…
But for shrubs and patches of grass, the hair system is perfect - quick and to the point. I ripped off a “back scatter” material from sample scenes I have then used my own alpha mask and grass texture.
In blender, I used the composite nodes for the bloom, sheen, and lens flares (which I quickly drew in gimp).
The AO didn’t do much, but it just helped “pop” out some detail. I used two defocus nodes and color ramps to bring out a DOF in the fore and background (or else I’d just have one and not the other).
So… I didn’t really use my pass scripts that have been devoloping, thanks to many of you.. but I have developed some ideas and practicing. The idea is to create a super shader, one with Depth, AO ready shader, Normal and then the beauty aspects. I will also try create or copy a translucent aspect to it - maybe.
It will be my “one shader” fits all.
I’ll even try make it lighter with “delete un-used nodes” later on - like if you aren’t using translucency, constant, depth or AO, you can just delete them, lightening up your object. It’s a theory.
These are realtime directX passes, using an AO light rig (with 32 lights) and a white lambert/phong shader with no specular to work on Ambient Occlusion, then my normal pass (using HLSL normals) and negative light values for the oppossite (works for Normals in WorldSpace) and an RGB depth pass.. these all will come in handy in compositing to amp up the quality of the realtime renders, I just have to quickly do some light changing and world wide shader changing.
I plan to create a shader with these shaders already integrated, switched over by script, available dynamically to any object applied. But… I’m still learning to script in trueSpace to do that. Then the only thing left for me to do is to create a script to delete and load the light setup, and flick the global switch - then render to file.
Well.. that is the idea.
We will see how that goes.
Photo with 1 note
ARGH! Modeling! I am so slow in it! I need to practice more.
I also get so distracted with learning scripting and other things, including that I started my area light rig, but I’m guessing I’ll need a lot of lights to get a good area “ray” like realtime light. I will try use a technique similar to my AO rig, but a little more modest… hmm….
I am happy with the composition, and now I just need to add details and effects to get my final image. Tomorrow is the 3rd, so I’m going to try do my best to finish modeling there, then I will render off what I have on the 4th to try finish it.
Photo with 2 notes
Did some quick grass, learnt trueSpaces hair system inside out. It’s SLOOOOOW.. but it works. it’s great for quickly whipping up vegetation with cards, I’ve found. I made a green grass with translucency using the hair thing, then screencaptured it with windows then into Gimp to make an alpha, then used it with another grass shader I found that came with TS and then used my own grass shader. I made the field in a triangle shape according to the camera. If TS had culling, that would be AWESOME.. i wonder what it would take to develop these things.
I can see TS with the LE to be quite adapt to more development, using scripts from game engines and the like ported into trueSpace.. but I’m not coder, and the nodes are not clear enough.. but maybe oneday it will work. I think I will slowly improve TS over time, but considering how slow it can be sometimes (well for my dual core) I wonder how viable it really is for quick webseries or the like.. but i think it’s still got lots of juice to squeeze out.
Anyway, now just have to build a quick stadium with yellow figurines in the background, some grafitti particles raining down, and then the final composite and some lighting effects to get it all sorted.. I have two days. Yah.. fun…. !!!
I really need to work on my area light, I’m tired of having large specular spots on all my lights that i use, I can only distribute large areas of lights if I use many lights… so I have to make a rig.
Anyway, thinking out loud here……
Photoset with 2 notes
Made this soccer ball and little Colombian team to show my support to the fandom of the world cup and Colombia. I also wanted to see how quickly I could whip this up even with all the work I do. I am also trying to use some new techniques for compositing and realtime rendering from trueSpace to Blender to the final image.
Decided that I found something.. since my country in the Fifa World Cup is doing.. well… surprisingly - for the first time in world history getting into the quarterfinals - well… thought to show my support, show something spangled in that regard, but towards my own country, well one of them: Colombia.
I am far from over, I will have to quickly model a stadium, some quick lights, lens flares, and shiny things to make it spangeled, and a pasture.. but I think I’ll do that tomorrow, oh, and make a cool mouth rig/control system.
Quickly rig.. ok.. I don’t think I’ll make it, oh what the hell, it will be worth a try.
I modeled the soccer ball in geometry, actually, it’s a cool rig, bit.. not quite how I want it, but it works. I used Gimp Insane Bump to help get the textures, also the AO from Blender Baking…. Not bad for a realtime shader I think, I can make some cool nifty things. Now to study and understand my translucent shaders better.
I also have decided to do my AO passes seperate than having them in the scene with the Beauty pass. I think I can have some cool lighting effts with the 32 odd lights I use for the AO used elsewhere on another pass.
I still haven’t finished my Pass Changing script, but slowly but surely I am making a better shader. I am using Prodigies realtime shader as a base - I think I will add fresnel to it. My translucency shaders, I have 4 to study and choose from, some are better than others.. but it would be cool to somehow port those HLSL bricks to GLSL for blender later on oneday.. but we will see.. I am by far not there yet - and. .I am too busy.
There is one good thing with software that doesn’t update over the years is that you get used to it, and know it, and you can use it very well, and how ever you want. You won’t have to rehaul your methods relearning new techniques - and you can hone in on your artistic skills. There is a small pleasure to that. But choosing who you’d like to grow old with is a challenge, but choosing TS for some pleasurable projects with a game-engine viewport is certainly well worth the trouble. The 5 year old software never ceases to amaze me a little here or there, and any of the newer larger software packages out there who are struggling to develop and push the industry.. I’ll get to you eventually.. but meanwhile, my little affair with this little software is certainly satisfying.
Page 1 of 9