Welcome to Fractal Forums

Fractal Software => Fragmentarium => Topic started by: Patryk Kizny on July 19, 2015, 11:16:45 AM




Title: 2D texture within 3D
Post by: Patryk Kizny on July 19, 2015, 11:16:45 AM
If I wanted to pull in a 2D texture to use as a background, how and where would be the best place to incorporate it within 3D+Kn2 raytracer?

Let's say I have a 1920x1080 background and I want it displayed 1-to-1 pixel-to-pixel underneath the content from the raytracer (say buffer/viewport size matches)? Is there any way to use a bitmap 'as is', pixel per pixel in the buffer?

I guess I'd need to integrate it somewhere in the #vertex section?

Thanks!


Title: Re: 2D texture within 3D
Post by: 3dickulus on July 19, 2015, 07:59:05 PM
you could look through the tutorials that come with Fragmentarium and find just about everything your are asking in the examples...
this is a shot of the IBL-Raytracer example,
TIP: before trying this one edit the tutorial frag and add the FULL PATH for the .hdr files ;)

EDIT: is what you are looking for "green screen" or "chroma-key" effect?


Title: Re: 2D texture within 3D
Post by: Patryk Kizny on July 23, 2015, 12:10:48 AM
I check the examples and tutorials, but just wasn't sure how to get a 2d texture behind the content. Already solved that at least roughly.
Now I got another problem that I believe is not possible to solve within what's currently available in frag.

I have implemented a workflow that allows me to track the live camera externally and put it into fragmentarium.
For some reason I am still having some camera mismatches so I wanted to pull in the background plates into frag for reference (if not rendering) to troubleshoot (if not use it for rendering finals).

So I need to dynamically load a texture based on the current frame number.
I have a sequence of bitmaps named "img000.jpg - img999.jpg" and I want to use a picture corresponding to current frame of the animation.
I understand I can only load texture via UI file widget, which won't allow me to modify anything on the fly nor will it accept any parametrization? If so, that does not look doable :/

Am I right?


Title: Re: 2D texture within 3D
Post by: 3dickulus on July 23, 2015, 12:50:48 AM
I'm not sure as I haven't played with the texture stuff but I will look at this, I had a raytracing program on my Amiga that allowed animated textures, a sequence of frames, that could be applied to the surface of a 3D object.


Title: Re: 2D texture within 3D
Post by: Patryk Kizny on July 23, 2015, 01:10:10 AM
Would be a great thing to have! Many thanks!