[Bf-cycles] Changing image filename at runtime?

Mohamed Sakr 3dsakr at gmail.com
Mon May 13 10:41:30 CEST 2019


Hey,

this code works for me.
case 1://orthographic
{
cam->type = CAMERA_ORTHOGRAPHIC;

if (zoom <= 0.f)
break;

        float xaspect = (horizontal) ? aspect_ratio : 1.f;
        float yaspect = (horizontal && aspect_ratio != 0.f) ? 1.f : 1.f /
aspect_ratio;

float aspect_ = (aspect_ratio_viewport > aspect_ratio) ? ((aspect_ratio <
1.f) ? 1.f : aspect_ratio) : ((aspect_ratio < 1.f) ? aspect_ratio_viewport
/ aspect_ratio : aspect_ratio_viewport);

xaspect = xaspect * 10.30f / (zoom * aspect_ * 2.0f);
yaspect = yaspect * 10.30f / (zoom * aspect_ * 2.0f);

cam->viewplane.left = -xaspect;
cam->viewplane.right = xaspect;
cam->viewplane.bottom = -yaspect;
cam->viewplane.top = yaspect;
        }

cheers,
Mohamed Sakr


On Mon, May 13, 2019 at 7:39 AM Santosh Singh <santoshmca.giit at gmail.com>
wrote:

> Hello Mr. Sakr,
>
> I am using the perspective camera view into cycles standalone and its
> working fine with zoom in or zoom out(using w and s input into interactive
> mode from keyboard).
>
> When i am trying to use orthograph camera view, i am getting problem with
> zoom in and out. There is no changes at viewport.
>
>  Please guide me how to make working zoom factor into cycles standalone
> with orthograph camera view. i am using the below xml data for the camera
> view.
> *<!-- Camera  -->*
> * <transform matrix = "1.000000 0.000000 -0.000000 0.000000 0.000000
> 1.000000 -0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 -0.000000
> 1.500000 -3.700000 1.000000">*
> * <camera width="800" height="500" type="orthograph"/>*
> * </transform>*
>
> I saw into blender with ortho view there is one option "Orthographic
> Scale", how to use into cycles standalone.
> Please help me to solve my problem.
>
> On Wed, May 1, 2019 at 6:16 AM Santosh Singh <santoshmca.giit at gmail.com>
> wrote:
>
>> Thanks dear.
>> I will check.
>>
>> On Wed, 1 May, 2019, 12:25 AM Mohamed Sakr, <3dsakr at gmail.com> wrote:
>>
>>> this is not something that I can help you with, it is plain code, all
>>> the exporter is done under Cycles/Blender/ folder, check mesh.cpp and
>>> object.cpp, they got the code for motion
>>>
>>> On Tue, Apr 30, 2019 at 6:17 AM Santosh Singh <santoshmca.giit at gmail.com>
>>> wrote:
>>>
>>>> Hello Mr. Sakr.
>>>>
>>>> I checked into blender cycles render, there is one property related
>>>> "insert keyframes" to Transform.
>>>>
>>>> I want same output frame by frame what keyframes are generating into
>>>> blender.
>>>>
>>>> is this feature available int cycles standalone application. How to get
>>>> render output  frame by frame with updated mesh(position data) into cycles.
>>>>
>>>> Please help me.
>>>>
>>>> On Mon, Apr 29, 2019 at 2:39 PM Santosh Singh <
>>>> santoshmca.giit at gmail.com> wrote:
>>>>
>>>>> Thanks Dear,
>>>>> Its motion steps with updated mesh details  (like walk ).
>>>>> Let me try with above suggestions.If i will face any problem then i
>>>>> will discuss with you.
>>>>>
>>>>> On Mon, Apr 29, 2019 at 2:35 PM Mohamed Sakr <3dsakr at gmail.com> wrote:
>>>>>
>>>>>> do you mean motion blur? you need to set the motion blur flags in
>>>>>> integrator, and fill the mesh/object motion steps, add motion blur
>>>>>> attribute (STD_Motion or something).
>>>>>>
>>>>>> On Mon, Apr 29, 2019 at 9:58 AM Santosh Singh <
>>>>>> santoshmca.giit at gmail.com> wrote:
>>>>>>
>>>>>>> Hello Mr. Sakr,
>>>>>>>
>>>>>>> How i will use animation into cycles standalone.
>>>>>>>
>>>>>>> Please guide me.
>>>>>>>
>>>>>>> On Fri, Apr 12, 2019 at 9:46 PM F Escobar <
>>>>>>> materialesescobar at hotmail.es> wrote:
>>>>>>>
>>>>>>>> Thank you but it didn't work for me neither :(
>>>>>>>> ------------------------------
>>>>>>>> *De:* Bf-cycles <bf-cycles-bounces at blender.org> en nombre de
>>>>>>>> Mohamed Sakr <3dsakr at gmail.com>
>>>>>>>> *Enviado:* viernes, 12 de abril de 2019 12:59
>>>>>>>> *Para:* Discussion list to assist Cycles render engine developers
>>>>>>>> *Asunto:* Re: [Bf-cycles] Changing image filename at runtime?
>>>>>>>>
>>>>>>>> if (pd->filename && pd->builtin_data) //you may not need
>>>>>>>> builtin_data
>>>>>>>> {
>>>>>>>> _scene->image_manager->tag_reload_image(
>>>>>>>> pd->filename.c_str(),
>>>>>>>> pd->builtin_data,
>>>>>>>> pd->interpolation,
>>>>>>>> EXTENSION_CLIP,
>>>>>>>> true);
>>>>>>>>                }
>>>>>>>>
>>>>>>>> On Fri, Apr 12, 2019 at 7:53 AM F Escobar <
>>>>>>>> materialesescobar at hotmail.es> wrote:
>>>>>>>>
>>>>>>>> ---
>>>>>>>> you may need to do image_manager->tag_update(scene), probably the
>>>>>>>> same for shader_manager
>>>>>>>> ---
>>>>>>>>
>>>>>>>> I supposed that too but unfortunatly image_manager has no
>>>>>>>> tag_update(scene)
>>>>>>>>
>>>>>>>> Regards, F.
>>>>>>>> ------------------------------
>>>>>>>> *De:* Bf-cycles <bf-cycles-bounces at blender.org> en nombre de
>>>>>>>> Mohamed Sakr <3dsakr at gmail.com>
>>>>>>>> *Enviado:* jueves, 11 de abril de 2019 14:59
>>>>>>>> *Para:* Discussion list to assist Cycles render engine developers
>>>>>>>> *Asunto:* Re: [Bf-cycles] Changing image filename at runtime?
>>>>>>>>
>>>>>>>> you may need to do image_manager->tag_update(scene), probably the
>>>>>>>> same for shader_manager
>>>>>>>>
>>>>>>>> On Thu, Apr 11, 2019 at 1:30 PM F Escobar <
>>>>>>>> materialesescobar at hotmail.es> wrote:
>>>>>>>>
>>>>>>>> I'm trying to change the image I'm using for scene illumination but
>>>>>>>> besides I can rotate it properly changing the filename seems to have no
>>>>>>>> effect.
>>>>>>>>
>>>>>>>> Any tip on this? thank you in advance!
>>>>>>>> _______________________________________________
>>>>>>>> Bf-cycles mailing list
>>>>>>>> Bf-cycles at blender.org
>>>>>>>> https://lists.blender.org/mailman/listinfo/bf-cycles
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Bf-cycles mailing list
>>>>>>>> Bf-cycles at blender.org
>>>>>>>> https://lists.blender.org/mailman/listinfo/bf-cycles
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Bf-cycles mailing list
>>>>>>>> Bf-cycles at blender.org
>>>>>>>> https://lists.blender.org/mailman/listinfo/bf-cycles
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Thanks & Regards
>>>>>>>  Santosh Kumar Singh
>>>>>>>   Software Engineer
>>>>>>> _______________________________________________
>>>>>>> Bf-cycles mailing list
>>>>>>> Bf-cycles at blender.org
>>>>>>> https://lists.blender.org/mailman/listinfo/bf-cycles
>>>>>>>
>>>>>> _______________________________________________
>>>>>> Bf-cycles mailing list
>>>>>> Bf-cycles at blender.org
>>>>>> https://lists.blender.org/mailman/listinfo/bf-cycles
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks & Regards
>>>>>  Santosh Kumar Singh
>>>>>   Software Engineer
>>>>>
>>>>
>>>>
>>>> --
>>>> Thanks & Regards
>>>>  Santosh Kumar Singh
>>>>   Software Engineer
>>>> _______________________________________________
>>>> Bf-cycles mailing list
>>>> Bf-cycles at blender.org
>>>> https://lists.blender.org/mailman/listinfo/bf-cycles
>>>>
>>> _______________________________________________
>>> Bf-cycles mailing list
>>> Bf-cycles at blender.org
>>> https://lists.blender.org/mailman/listinfo/bf-cycles
>>>
>>
>
> --
> Thanks & Regards
>  Santosh Kumar Singh
>   Software Engineer
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> https://lists.blender.org/mailman/listinfo/bf-cycles
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-cycles/attachments/20190513/64152c42/attachment.htm>


More information about the Bf-cycles mailing list