Logo by teamfresh - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. April 20, 2024, 12:18:48 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: slider  (Read 1005 times)
Description: How to change initial valuse of slider from other frag file ?
0 Members and 1 Guest are viewing this topic.
Adam Majewski
Fractal Lover
**
Posts: 221


WWW
« on: November 10, 2015, 05:45:59 PM »

Hi,

I use
/Examples/Include2D.frag
in my own  frag file.

Is it possible to change initial Zoom version in my frag file ?

Definition is :
uniform float Zoom; slider[0,1,100] NotLockable

but I would like to set Zoom to 0.78

How can I do it ?

TIA

Adam
Logged
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #1 on: November 11, 2015, 12:39:09 AM »

Hi Adam,

  Try changing:

  uniform float Zoom; slider[0,1,100] NotLockable

to:

uniform float Zoom; slider[0,.78,100] NotLockable

  The middle variable is the default value.  I'm not sure if the default preset overrides it if it is the first preset in the list of presets or not... if it does, then you'll have to change the value in the preset as well.
Logged

3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #2 on: November 11, 2015, 03:14:01 AM »

Yes, the default preset is used at load time to initialize everything, once this is done other presets only need to have the uniforms you want to change.
The minimum required uniforms are what is in a "keyframe" preset, FOV, Eye, Target, Up, the engine needs at least these things to get setup and start rendering.
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #3 on: November 11, 2015, 03:40:21 AM »

Strange- I tested loading something from scratch before I posted my reply to Adam, and the default did not load when I did a build (I have autobuild off).  

 I think it loaded the default preset for the Integer Bulb, even though I built something else.  

  Edit:  No, it loads the "default" settings (middle settings in uniform definitions) in the raytracer I'm using.  Maybe if my frag had a "provides XXX" or something? 
« Last Edit: November 11, 2015, 03:49:47 AM by M Benesi » Logged

3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #4 on: November 11, 2015, 04:49:59 AM »

I deleted all presets from Mandelbulb.frag and loaded that, it works, I thought there was a minimum requirement to start the engine  but it seems to initialize and render fine from the uniform defaults... I may have been under the wrong impression from back when I was adding spline path interface, just never tried since then.
so apparently, no presets is fine smiley this might be handy when sending a frag to another machine for remote rendering...

edit:i was referring to the preset named "Default"
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Adam Majewski
Fractal Lover
**
Posts: 221


WWW
« Reply #5 on: November 11, 2015, 09:20:18 AM »

First, goal of asking was :

can change default value of slider without changing the frag file in which this slider was defined .

( sorry if I was not clear )

What I have done :
 redefine slider in my own frag file :

 uniform float Zoom; slider[0,.78,10] NotLockable


It works , but then :
* I have 2 slider with the same name in different groups
* old slider is not working

It works but seems to be not the best solution
« Last Edit: November 11, 2015, 09:53:15 AM by Adam Majewski, Reason: spelling » Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #6 on: November 11, 2015, 09:34:37 AM »

Examples/Include/2D.frag, and other 2D frags, contain the line...
Code:
uniform float Zoom; slider[0,1,100] NotLockable
that is where you should make the change
this line should not be in your own frag unless you delete or comment out the zoom line in the 2D.frag you are using.
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Slider Mandelbulb3D Gallery lenord 0 613 Last post January 09, 2011, 05:49:36 PM
by lenord
Keyframe Interpolation Slider Feature Requests lukesleftleg 10 2691 Last post December 23, 2013, 09:46:31 AM
by lukesleftleg
The Ruins of the Slider's Eye Mandelbulb3D Gallery Benzopirate 0 815 Last post April 18, 2017, 05:32:54 AM
by Benzopirate

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.111 seconds with 25 queries. (Pretty URLs adds 0.006s, 2q)